3 Replies Latest reply on Feb 26, 2009 9:52 AM by Willem Jiang

    Fuse ESB - Transaction

    Charles Moulliard Newbie

      Hi,

       

       

      Can someone provide more info about what the OSGI bundle transaction of Fuse ESB 4.0 can do ? Is it a transaction manager ? Can we use it in comibination with Camel or DB to handle commit/rollback ?

       

      Regards,

       

      Charles Moulliard

      SOA Architect

      Xpectis

        • 1. Re: Fuse ESB - Transaction
          Adrian Trenaman Newbie

          Yes, the 'transaction' feature installs the Geronimo transaction manager, along with some spring support. Looking at the contents of the feature, you see:

           

               <feature name="transaction">
                <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
                <bundle>mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>
                <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
                <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl/1.0.1-1_1</bundle>
                <bundle>mvn:org.apache.geronimo.components/geronimo-transaction/2.2-r634076</bundle>
                <bundle>mvn:org.apache.geronimo.components/geronimo-connector/2.2-r634076</bundle>
                <bundle>mvn:org.springframework/spring-tx/2.5.5</bundle>
                <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jencks/2.1_1</bundle>
                <bundle>mvn:org.apache.servicemix.transaction/org.apache.servicemix.transaction/4.0.0.4-fuse</bundle>
                </feature>

          When you install the 'transaction' feature, all those bundles get installed. Moreover, a transaction manager is registered as an OSGi service. You can verify this by doing a list-services on the 'Apache ServiceMix Features :: Transaction' bundle

           

          servicemix> osgi list | utils grep Transaction
            37 Active[   50|http://fusesource.com/forums/] Geronimo TxManager :: Transaction (2.2.0.r634076)
            41 Active[   50|http://fusesource.com/forums/] Apache ServiceMix Features :: Transaction (4.0.0.fuse)
                servicemix> osgi list-services 41
                Apache ServiceMix Features :: Transaction (41) provides:
          -----

          Bundle-SymbolicName = org.apache.servicemix.transaction
                Bundle-Version = 4.0.0.fuse
                objectClass = javax.transaction.TransactionManager, org.apache.geronimo.transaction.manager.RecoverableTransactionManager, org.springframework.transaction.PlatformTransactionManager
                org.springframework.osgi.bean.name = transactionManager
                service.id = 72

          Most importantly, you can now to an OSGi service lookup in your application using the SpringDM goodness to get a handle on this TransactionManager, and then use that in your Camel or JDBC routes.

           

          Edited by: adrian.trenaman on Feb 26, 2009 9:18 AM - fixed formatting

          • 2. Re: Fuse ESB - Transaction
            Charles Moulliard Newbie

            Many thanks for your reply.

             

            By the way, I would like to thank you for the quality of the webinar of monday this week. Congratulations.

             

            Additonal questions :

             

            1) JNDI Support

             

            Is it planned to have in a next version of Fuse ESB 4.0 support for jndi in order to register our JDBC driver through a JNDI datasource by example?

             

            e.g.

             

             

             

            2) Strategy concerning Camel and CXF

             

            Camel proposes a component camel-cxf (http://cwiki.apache.org/CAMEL/cxf.html) integrating CXF. I have looked up to the documentation and the examples proposed in the folder examples but I don't see this kind of example in Fuse ESB.

             

            Questions :

            - Is it a bad architectural design to use CXF though Camel top of Fuse ESB 4.x platform ?

            - Is the approach of the example cxf-camel-nmr better (jaws endpoint against cxf endpoint of camel)?

             

            regards,

             

            charles

            • 3. Re: Fuse ESB - Transaction
              Willem Jiang Master

              Hi Charles,

               

              Just a quick answer for your question about Camel and CXF in Fuse ESB.

               

              Since we provides two types integration (through  Camel transport of CXF or camel-cxf endpoint ) between Camel and CXF. As the examples which you see, you could setup the JAXWS endpoint on the top of Camel, or use camel-cxf endpoint to implement the Webservice consuming or producing.

               

              The architectural design really depends on your requirement.

               

              If you want to reuse the camel components such as file ,  mail etc to implement a new transport of CXF , you could choice to setup the JAXWS endpoint on the top of Camel.

              If you just want to leverage CXF to talk with some Webservice endpoint, I think camel-cxf endpoint is your best choice.

               

              Cheers,

               

              Willem