2 Replies Latest reply on Jul 5, 2012 10:22 AM by jwgrein

    Switchyard bean service lifecycle

    jwgrein

      What is the default lifecycle for a bean service in Switch Yard?

       

      When using SOA-P 5.1 and annotated POJO's the default was per pipeline (essentially application) and I'm curious if it is the same with bean services.

       

      Thanks

       

      --Joe Grein

        • 1. Re: Switchyard bean service lifecycle
          kcbabo

          Hey Joe,

           

          The default for bean services will be @ApplicationScoped, which means one instance per service.


          The default for beans used in a Camel route (equivalent to action classes in JBoss ESB) is one instance per invocation.  You can add @ApplicationScoped to the bean definition to get one instance per service.

           

          I think that covers it all. :-)

           

          cheers,

          keith

          • 2. Re: Switchyard bean service lifecycle
            jwgrein

            Thanks Keith, that gives me exactly what I need to help reduce any headaches in a future ESB to Switchyard migration. 

             

            --Joe Grein