4 Replies Latest reply on Mar 12, 2013 9:56 AM by salaboy21

    Ability to configure jBPM in persistence.xml

      Hello,

      I'm using jBPM 3.3.1 with Seam 2.2.0, JSF 1.2 and Richfaces 3.3.1.

      I would like to ask about the following:
      is it possible to use jBPM without hibernate.cfg.xml file? I mean, can I  configure everything in persistence.xml?
      Currently I'm using both files:
      - hibernate.cfg.xml for jBPM table mappings + some core hibernate properties
      - persistence.xml for other JPA classes

      Staying with hibernate.cfg.xml only is an option, be we would prefer to  stay with persistence.xml only.


      The second question is about startup jBPM configuration processing.  After Tomcat startup jBPM loads process definitions. It results in some
      database entries. How can we achieve processing this definitions only  the first time and than if this definitions are present just skip it?
      This causes some problems with process resuming (I have multiple the  same process definitions after subsequent Tomcat startups).


      Kind regards

      Marcin

        • 1. Re: Ability to configure jBPM in persistence.xml
          kukeltje

          Marcin,

           

          I currently is not possible out of the box to have jBPM work with JPA. It be done by e.g. changing to using e.g. annotations or a persistence.xml file, but that is probably not all. So unfortunately for the moment it is hibernate (or you have to spend some time on it yourself, we are interested you know ;-)

           

          Btw, is there a specific reason to not wanting to have two config files? Most likely jBPM will have it's own persistence.xml file don't you think so, maybe even it's own datasource so it is replacing one file for another. Or do you want to ditch hibernate complete in favour op TopLink, OracleLink EclipseLink or some other framework :-)

           

          Regarding your second question (next time post it in a new topic please, easer to find then for others based on the subject.

           

          jBPM does not deploy processdefinitions on it's own. Yes it is done trough the jBPM api but that has to be triggered somewhere (e.g. Seam) so find the source of what is triggering the deployment and fix it there.

          • 2. Re: Ability to configure jBPM in persistence.xml

            Thanks for your response Ronald!

             

            kukeltje wrote:

             

            Btw, is there a specific reason to not wanting to have two config files? Most likely jBPM will have it's own persistence.xml file don't you think so, maybe even it's own datasource so it is replacing one file for another. Or do you want to ditch hibernate complete in favour op TopLink, OracleLink EclipseLink or some other framework :-)

            I use Hibernate and plan to use it in the future, but wanted to use it as a JPA provider to be able for example (in theory - there are a few problems with JSF and Seam) to run my app on Google Apps Engine.

            Two config files are ok, but it increase startup time what is especially onerous during development. I will think about a read need to be provider independent.

             

            kukeltje wrote:

             

            jBPM does not deploy processdefinitions on it's own. Yes it is done trough the jBPM api but that has to be triggered somewhere (e.g. Seam) so find the source of what is triggering the deployment and fix it there.

            Ok, I will try track it down on Seam side.

            • 3. Re: Ability to configure jBPM in persistence.xml
              nasirnaseem

              Is it possible  now to use JBPM with eclipse link instead of hibernate.?

              • 4. Re: Ability to configure jBPM in persistence.xml
                salaboy21

                Yes it should be possible, we are using JPA2, so you just need to change the provider, try it out and let us know if you have troubles