Results 1 to 4 of 4

Thread: Modular applications and stage processors

  1. #1
    Join Date
    Dec 2010
    Posts
    5

    Default Modular applications and stage processors

    Hi,

    I'm trying to figure out how to create a modular Flex application using spring actionscript and have a few questions.

    My application has an app context containing common services and each module has a child context with the application's context as parent.

    Based on your multiple-modules sample and BasicSASModule, I can get this to work, as long as I only have an autowiring stage processor in the module's contexts but not in the application's context (like in your sample).

    However, when I do add the stage processor in the app's context, so I can autowire outside of modules as well, then I run into errors when the modules get autowired. E.g.:
    Error: Can't autowire property by name: Unsatisfied dependency in object [null] for property [niftyService]

    It seems both the app's stage processor and the module's processor are tried for the autowiring and the app's processor throws the error because it doesn't know the object.

    Am I supposed to only use autowiring in modules?
    Can I set things up differently to make autowiring in both app and modules possible?

    Cheers,

    Glenn

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

    Default

    Hey Glen,

    do you set the Autowire policy like this?

    Code:
    FlexStageProcessorRegistry.getInstance().modulePolicy=ModulePolicy.IGNORE;
    By default SpringAS will try to wire modules, by setting this property like this it'll leave the wiring to the module's context.

    Hope that helps,

    cheers,

    Roland

  3. #3
    Join Date
    Dec 2010
    Posts
    5

    Default

    That helped, thanks

  4. #4

    Default

    Hi Glenn,

    you could have a look at http://forum.springsource.org/showthread.php?t=99467 .

    I have created a SASModuleLoader (SpringActionscript)ModuleLoader which is able to load modules with an own context into the context of a master application.

    Maybe this is useful for you.

    Regards,
    Christoph

Posting Permissions

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