Announcement Announcement Module
Collapse
No announcement yet.
Releasing Context Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Releasing Context

    Hi,

    I would like to know if there is a way to release the spring context once created. The scenario is as follows:

    1. Launch App
    2. Application loads the FlexXMLApplicationContext in the init method
    3. User logs in and many of the instantiated objects are used
    4. User logs out

    I want to be able to release the FlexXMLApplicationContext and release all of singletons originally created. Then, I want to reload the FlexXMLApplicationContext so that it recreates the singletons.

    If I remove the event handlers from the application context, set the context to null and then recreate the context, it displays the instantiation messages twice.... like:

    5/6/2009 15:40:33.537 [INFO] SpringActionScript.FlexXMLApplicationContext Loading XML object definitions from [resource/application-context.xml]
    5/6/2009 15:40:33.537 [INFO] SpringActionScript.FlexXMLApplicationContext Loading XML object definitions from [resource/application-context.xml]
    5/6/2009 15:40:33.696 [INFO] SpringActionScript.FlexXMLApplicationContext Loading properties file from [resource/application-context-properties.txt]
    5/6/2009 15:40:33.696 [INFO] SpringActionScript.FlexXMLApplicationContext Loading properties file from [resource/application-context-properties.txt]
    5/6/2009 15:40:33.721 [INFO] SpringActionScript.FlexXMLApplicationContext Pre-instantiating singletons [clientAdmin,clientLayoutHandler,channelSet,remoteA uthService,remoteObject,_remoteAuthService,remoteZ ipcodeService,zipcodeRemoteService,__methodInvocat ion1,_remoteZipcodeService,regularAMFChannel,clien tLayoutUI,authenticationService] in [object FlexXMLApplicationContext]
    5/6/2009 15:40:33.721 [INFO] SpringActionScript.FlexXMLApplicationContext Pre-instantiating singletons [clientAdmin,clientLayoutHandler,channelSet,remoteA uthService,remoteObject,_remoteAuthService,remoteZ ipcodeService,zipcodeRemoteService,__methodInvocat ion1,_remoteZipcodeService,regularAMFChannel,clien tLayoutUI,authenticationService] in [object FlexXMLApplicationContext]

    You'll notice that it shows the loading of the context twice, loading from the property files, etc. If I log in and log out again, it shows it three time, etc.

    Is this a problem with the messages or is there a static variable somewhere that needs to be cleared?

    Thanks for your help.

    Tom

  • #2
    smells like a bug...

    Hi there,

    I have a feeling you're dealing with a bug here. Please file a report in the JIRA system (http://jira.springframework.org/brow...ACTIONSCRIPTAS), that way the issue can be addressed as soon as possible.

    thanks,

    Roland

    Comment

    Working...
    X