5 Replies Latest reply on Jun 25, 2008 10:42 AM by v.tesin

    Integrate JPA with JBPM-JPDL3.2.2


      I am trying to integrate JBPM-jpdl3.2.2 version with Spring and JPA transaction in my application. I was successfull in spring integration but not with JPA transaction. Is there any documentation that is available that can help me in doing this integration.


        • 1. Re: Integrate JPA with JBPM-JPDL3.2.2

          Hi.. i´m also intrested in this kind of integration, can you share to us your designs and your goals? I think this could be a great improvement in the next versions...
          Also i was thinking a lot in do a plug-in like to pvm for this integration with spring for configurations and JPA for persistence...
          If someone know a right forum to discuss this kind of things.. please let me know..

          • 2. Re: Integrate JPA with JBPM-JPDL3.2.2

            Hmmm, Actual issue i have is We already have an application running using JPA and annotation driven hibernate classes. Now we need to plugin the JPDL to the existing application and use the exist transaction.
            I get an exception org.hibernate.HibernateException: No CurrentSessionContext configured! when i try to call getCurrentSession() on the sessionfactory object. Not sure what is missing here.
            Appreciate your help on this

            • 3. Re: Integrate JPA with JBPM-JPDL3.2.2

              mmm I see.. probably you must inject your JPA session inside the CurrentSession i think you have a setCurrentSession that you can use to do this..
              Let me know if you can do this..

              • 4. Re: Integrate JPA with JBPM-JPDL3.2.2

                Thanks, I am using the setsession to make this integration work. like
                jbpmContext = jbpmConfiguration.createJbpmContext();

                Now the session object is handling all the database activities for me. The session is getting opened and also closed automatically by my transaction manager configured thru spring.
                I may need some info for the scenario below:

                Actual problem now when i try to close the context using jbpmContext.close() jbpm tries to close the session associated with the context. as the session was automatically closed when i moved out of my method and trying to close the jbpmconext later after doing some business logic.
                couple of ways i have in my mind,but not sure if this si right.
                1) should we close the jbpm context after every action we do and create a new one later,will it not affect the performance.
                2) Should we not close the jbpmconext in this scenario, Will there be any problems in keeping the context's in the stack which are of no use.


                • 5. Re: Integrate JPA with JBPM-JPDL3.2.2


                  We have spring + hibernate + flex application which uses spring's AOP support to manage transactions and sessions. So far everything is working fine.

                  Now we're adding jBMP support but we want to use JPA's transactions in order to minimize configuration redundancy.

                  I was looking to integrate jBPM and JPA but it seems that it can't be done easily trough the spring configuration, yet.

                  Does anyone has some experience with this kind of setup?