1 Reply Latest reply on Mar 25, 2008 12:37 AM by

    blaze-ds persistence object

    riesvantwisk
      Hey All,

      I need to have a object persistence in memory and available for all connected clients.
      How should I go ahead and do this?

      I was thinking to create a class with a static variable and store/load this using a session, me hoping that the static variable is the same for all connected clients. But I am not sure if this is the right approach, is it??

      If not... what would be the right appreach?

      Preferred I need to have this accessible in a adapter using messeging aswell using remoting.

      any ideas, samples, pointers?

      Ries


        • 1. Re: blaze-ds persistence object
          I think you can define the object that you need to make available to all connected clients as a BlazeDS destination with the application scope. Here is an example:

          <destination id="SampleEmployeeRO">
          <properties>
          <source>samples.explorer.EmployeeManager</source>
          <scope>application</scope>
          </properties>
          </destination>

          Here is a link to the doc:
          http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=rpc_config_2.html#2 60036
          The scope ... "Indicates whether the object is available in the request scope, the application scope, or the session scope. Objects in the request scope are stateless. Objects in the application scope are available to the web application that contains the object. Objects in the session scope are available to the entire client session."

          - Mykola


          The valid values are request, application, and session. The default value is request.