Announcement Announcement Module
Collapse
No announcement yet.
Error: IoC conatiner is already initialized Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error: IoC conatiner is already initialized

    Hi,

    I have been using Spring AS with PureMVC recently. Here's how I initialize the context inside a popup control:

    Code:
    _facade = ApplicationFacade.getInstance( this.getModuleKey(), 
    	"resources/context/applicationContext.xml" );
    _facade.addEventListener(Event.COMPLETE, startupModule);
    _facade.initializeIocContainer(null);
    The first time when I open the control, everything works fine. However, when I try opening it again, I hit an error mentioned in the title.

    Error: IoC conatiner is already initialized
    I traced the source and found it's thrown from this line:

    Code:
    _facade.initializeIocContainer(null);
    I guess it's probably due to the improper termination of the IoC container. Can anyone tell me the right way of doing this? Or is there a method to check whether the container has been initialized so that I don't have to initialize it again?

    Thanks

  • #2
    Just figure it out by myself. The removeCore method is the correct one to terminate the ioc container.

    Code:
    _facade.removeCore(this.getModuleKey());

    Comment


    • #3
      phew...

      Hey there,

      I'm very glad you managed to solve this on your own since the PureMVC extensions are the one area of Spring Actionscript that I know the least about.
      Good to hear you're back on track!

      cheers,

      Roland

      (Oh, and thanks for posting your solution here as well, any kind of info is welcomed)

      Comment

      Working...
      X