4 Replies Latest reply on Jun 5, 2011 4:49 AM by frankee787

    jBPM 5.0 and Hibernate

    sujee

      Hi,

      I'm a newbie to jBPM.

      We have a product which uses Hibernate(Not JPA) and Spring for persistent layer implementation. I'd like to re-implement existing custom BPM implementation using jBPM 5.0. According jBPM 5.0 documentation, it supports only JPA. On the other hand, It is not possible to convert product Hibernate implementation to JPA due to its size and other factors. Kindly clarify following questions.

       

       

      1) Is there a way to use Hibernate in jBPM 5.0 without using JPA?

      2) If there is a way, What about transaction? Is it possible to execute jBPM executions and application logic under same Spring transaction?

      3) If Hibernate not supported, any other alternatives/workaround?

       

       

      Thank you.

        • 1. jBPM 5.0 and Hibernate
          sujee

          Hi All,

          Kindly someone clarify this.

           

          Thank you.

          • 2. jBPM 5.0 and Hibernate
            krisverlaenen

            The default persistence implementation uses JPA, where Hibernate can for example be used as the underlying persistence framework.  So you can combine jBPM 5.0 persistence with an existing hibernate solution.  If you really want to avoid using JPA altogether and use Hibernate directly, you could plug in your own persistence, where you replace the invocations to JPA in the implementation with direct invocation of the Hibernate equivalent.

             

            Regarding transactions, jBPM 5.0 uses a pluggable mechanism here as well, where by default we use JTA but we also have a Spring implementation (as Spring doesn't provide access to the JTA transaction manager).

             

            Kris

            • 3. jBPM 5.0 and Hibernate
              sujee

              Thank you Kris.

              • 4. Re: jBPM 5.0 and Hibernate
                frankee787

                Could you point me out into where I can find some test cases/examples where in which jBPM5 executions and application logic executions are  under same Spring transaction?

                 

                I am trying to achieve this in the Client side along with calls to client.claim(...) or client.complete(...). My client is a Mina client and that is why I am confused as to how this will work.