I have some difficulties in unloading modules.
Accordingly to the multimodule example project in the SVN I created an application (load-application) which is able to load modules.
The testmodule has it's own application context in which the presentation model for testmodule is defined. The inside used service references to a service configured in the load-application. The injection works well, my module is able to use the service.
My load-application is designed to have only one module loaded. Therefore it is necessary to unload the currently loaded module before the next module is loaded.
I think I did something wrong because it seems the unloading is not working properly. I added an event listener ModuleEvent.UNLOAD for the currently loaded module before I call the unload method.
The event listener method is called. If I now reload the testmodule I get an error
for the presentation model used in the testmodule.
Error: Can't find an autowired candidate: Unsatisfied dependency in object
The first load is successful so I suppose the unload is not done completely and the application context of the testmodule is reinstantiated even though the old context still exists.
Is there any example what to do to unload a loaded SAS module savely? Any suggestions?