2 Replies Latest reply on Nov 14, 2013 4:00 AM by striplight

    Prototype instance wired by blueprint?

    striplight

      Blueprint supports the prototype scope. If you have an instance of that type in your class, BP can wire that in.

       

      But in our scenario we don't want to wire it as an instance, we want to wire it as a local variable in a service method. To create a stateful delegate strategy.

       

      This strategy itself references singletons such as DAOs, but it is a prototype - as the process being orchestrated by the strategy has state.

       

      In spring I could do this in the following way:

       

      public void complexService() {

           StrategyClass localDelegate = context.getBean("complexTaskHandler");

           localDelegate.doYourThing();

      }

       

      But I can't see a way to do this in Fuse.

       

      Can someone point me to some examples?

       

      Thanks, Chris