-
May 6th, 2009, 05:51 PM
#1
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
-
May 11th, 2009, 02:15 AM
#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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules