1 Reply Latest reply on Oct 10, 2006 2:10 PM by aBill

    How to control how Remote Objects are created or shutdown

      Hello all...
      I am new to FDS and I would like your expert opinion on how to control remote object creation and destruction !!!

      Is there a server configuration or a recommended method to:
      1.- Specify to FDS the constructor parameters of a Remote java Object upon startup?
      2.- Specify to FDS the method/parameters to shutdown the Remote java Object before FDS shutdown ?
        • 1. Re: How to control how Remote Objects are created or shutdown

          After discussed with some engineers, I learnt that there is a Spring framework which you can spend time on.
          I am not familiar with Spring, but I am told that:
          "For spring, each component is defined in an XML file. It has tags which let you set properties on the component. So the component would be constructed by Spring, spring would set its properties, then spring would return it to the spring flex factory which would return it to the destination. Spring probably also has a shutdown method which gets called that is tied to the container. This is all up on the adobe component exchange with an example that uses it so feel free to check that out or just send a pointer to the customer. Spring supports two scopes of components – one per application and one per invocation (i.e. a new instance is returned for each call). "

          Without Spring, you can use FlexFactory feature. Implement your Factory class which have reference to ConfigMap, then you can use the properties in your destination's configuration to construct your remote object. When your factory create it, you can add it as session destroy event listener, but this is only work for session scope. I think you are looking for application scope solution. I cannot think of any FDS feature can do the shutdown. The legacy RemoteObject can use servlet, but fds2.0 doesn't have this support. Otherwise, it can take advantage of the servlet's destroy.

          William Chan