2 Replies Latest reply on Jul 2, 2011 1:15 AM by duvy06

    Generated super class

    duvy06

      Hi all,

       

      Still with the memory problem (see : http://forums.adobe.com/thread/798092?tstart=0) I find a working version on a Web server from testdrive_deploy-app (employee used in tutorials)

       

      I notice a quite big difference within the 2 generated super class.

       

      Here is the start from employee

       

      /**

      * This is a generated class and is not intended for modfication.  To customize behavior

      * of this service wrapper you may modify the generated sub-class of this class - EmployeeService.as.

      */

      package services.employeeservice

      {

      import com.adobe.fiber.core.model_internal;

      import com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper;

      import com.adobe.serializers.utility.TypeUtility;

      import mx.rpc.AbstractOperation;

      import mx.rpc.AsyncToken;

      import mx.rpc.remoting.Operation;

      import mx.rpc.remoting.RemoteObject;

      import valueObjects.Department;

      import valueObjects.Employee;

       

      import mx.collections.ItemResponder;

      import com.adobe.fiber.valueobjects.AvailablePropertyIterator;

       

      [ExcludeClass]

      internal class _Super_EmployeeService extends com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper

      {     

       

          // Constructor

          public function _Super_EmployeeService()

       

       

      And here is the newly generated class

       

      /**

      * This is a generated class and is not intended for modfication.  To customize behavior

      * of this service wrapper you may modify the generated sub-class of this class - SitecarsService.as.

      */

      package services.sitecarsservice

      {

      import com.adobe.fiber.core.model_internal;

      import com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper;

      import com.adobe.serializers.utility.TypeUtility;

      import mx.data.ItemReference;

      import mx.data.ManagedAssociation;

      import mx.data.ManagedOperation;

      import mx.data.ManagedQuery;

      import mx.data.RPCDataManager;

      import mx.rpc.AbstractOperation;

      import mx.rpc.AsyncToken;

      import mx.rpc.remoting.Operation;

      import mx.rpc.remoting.RemoteObject;

      import valueObjects.Site_cars;

       

      import mx.collections.ItemResponder;

      import com.adobe.fiber.valueobjects.AvailablePropertyIterator;

       

      [ExcludeClass]

      internal class _Super_SitecarsService extends com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper

      {     

          private var _site_carsRPCDataManager : mx.data.RPCDataManager;

          private var managersArray : Array = new Array();

       

          public const DATA_MANAGER_SITE_CARS : String = "Site_cars";        

       

          public function getDataManager(dataManagerName:String) : mx.data.RPCDataManager

          {

              switch (dataManagerName)

              {

                   case (DATA_MANAGER_SITE_CARS):

                      return _site_carsRPCDataManager;     

                  default:

                      return null;

              }

          }

       

          /**

           * Commit all of the pending changes for this DataService, as well as all of the pending changes of all DataServices

           * sharing the same DataStore.  By default, a DataService shares the same DataStore with other DataServices if they have

           * managed association properties and share the same set of channels.

           *

           * @see mx.data.DataManager

           * @see mx.data.DataStore

           *

           * @param itemsOrCollections:Array This is an optional parameter which defaults to null when

           *  you want to commit all pending changes.  If you want to commit a subset of the pending

           *  changes use this argument to specify a list of managed ListCollectionView instances

           *  and/or managed items.  ListCollectionView objects are most typically ArrayCollections

           *  you have provided to your fill method.  The items appropriate for this method are

           *  any managed version of the item.  These are any items you retrieve from getItem, createItem

           *  or using the getItemAt method from a managed collection.  Only changes for the

           *  items defined by any of the values in this array will be committed.

           *

           * @param cascadeCommit if true, also commit changes made to any associated

           *  items supplied in this list.

           *

           *  @return AsyncToken that is returned in <code>call</code> property of

           *  either the <code>ResultEvent.RESULT</code> or in the

           *  <code>FaultEvent.FAULT</code>.

           *  Custom data can be attached to this object and inspected later

           *  during the event handling phase.  If no changes have been made

           *  to the relevant items, null is returned instead of an AsyncToken.

           */

          public function commit(itemsOrCollections:Array=null, cascadeCommit:Boolean=false):mx.rpc.AsyncToken

          {

               return _site_carsRPCDataManager.dataStore.commit(itemsOrCollections, cascadeCommit);

          }

       

          /**

           *  Reverts all pending (uncommitted) changes for this DataService, as well as all of the pending changes of all DataServics

           *  sharing the same DataStore.  By default, a DataService shares the same DataStore with other DataServices if they have

           * managed association properties and share the same set of channels.

           *

           * @see mx.data.DataManager

           * @see mx.data.DataStore

           *

           *  @return true if any changes were reverted.

           * 

           */

          public function revertChanges():Boolean

          {

              return _site_carsRPCDataManager.dataStore.revertChanges();

          }   

       

          // Constructor

          public function _Super_SitecarsService()

       

      Super class in my application as a lot more feature compared to the emmployee one. My knowledge of Flex are not far enough to identifiy the consequences of thoses differences :-((

       

      Questions :

      1. Is it possible that it cause a big memory allocation request ?

      2. Does it means I activate new feature or default build options has been changed from the time employee was build.

       

      Thanks for your help

        • 1. Re: Generated super class
          bibiki

          hey there. I c none has answer yet. I was wondering if you found any solution to the problem you had? I am having the same issue, perhaps, if you've solved your problem you could help me too. thanks.

          • 2. Re: Generated super class
            duvy06 Level 1

            Hi bibiki,

            Yes I solve my problem and in my case I should adjust table/fields definition : only text or varchar and no blob of any kind.

            Apparently, when blob is used, allocation of memory is going bad.

             

            Hope it help ;-)

             

            Message was edited by: duvy06