Results 1 to 3 of 3

Thread: Error: IoC conatiner is already initialized

  1. #1
    Join Date
    Sep 2008
    Posts
    4

    Default 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. #2
    Join Date
    Sep 2008
    Posts
    4

    Default

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

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

  3. #3
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    407

    Default 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)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •