Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: FlexXMLApplicationContext.dispose() disposes too much?

  1. #11
    Join Date
    Dec 2010
    Posts
    5

    Default

    Looks like I'm running in the same little problems Christoph is encountering, so I'll add my thoughts (for what they are worth).

    When you set ModulePolicy.IGNORE, everything will work fine in modules that load their own context and define their own AutowiringStageProcessor. You can perfectly autowire objects from both the application and module's contexts.

    In a module that only needs objects from the application's context and doesn't define its own module context, you will not be able to autowire because the application's AutowiringStageProcessor is ignoring modules. To make this work you have to define a context for the module that only contains an AutowiringStageProcessor and load that.

    Nothing wrong here, just a bit hard to get your head around when you're just starting with modules. An extra ModulePolicy might help, but I don't have a patch ready

  2. #12

    Default

    Hi Roland,

    thanks for your help! I did what you suggested and changed the autowiring policy to ignore for the main application. After that it started to work, I only had to fix some bugs in my SASModuleLoader and the UnloadableSASModule.

    But finally it worked. I updated my demo application in the SVN and on my webserver.

    @Glenn: in my implementation of ModuleLoader / Module the module always has a own context. If no context is defined by the developer, a default empty context is created.

    In general I'm still not sure if I really understood what ModulePolicy.IGNORE and ModulePolicy.AUTOWIRE really means and I would agree Glenn that it is not intuitive to use modules in combination with SpringActionscript.
    But I have no good idea how to teach a StageProcessor which object has to be autowired and which not.

    I wish you a merry Christmas and a happy new year!
    Christoph

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

    Default

    Hey guys,

    indeed the module policies need some work apparently. I'm gonna have to think hard about this one though.
    Maybe the flexStageProcessorRegistry first needs to check if a context has been registered for a specific module, and if so, let the module's context go about its business. If there is no context registered it should just try to wire it, if the specified module is in a separate application domain it'll just fail silently.

    I'll try and come up with a better solution, any help or suggestions are always appreciated.

    cheers,

    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
  •