4 Replies Latest reply on Oct 27, 2011 4:27 AM by mylos78

    Using MySQL (or other database) with jBPM5

    mylos78

      Hi all,

      I'm evaluating to port an existing jBPM3 Web application to jBPM5, however I have some doubts: the first one is related to data persistence.

      In the documentation it's stated to add a persistence.xml file to your application, however I couldn't find this file in the jbpm 5 admin consoles, just a datasource deployed named testDS1-ds.xml.

       

      Also, how does the jBPM engine understand that the persistence.xml provided in my Web application is the one used by the jBPM 5 engine ? ( I guess it needs to be named "org.jbpm.persistence.jpa") ?

       

      Thanks a lot for your help

      Mylos

        • 1. Re: Using MySQL (or other database) with jBPM5
          swiderski.maciej

          Mylos Kathos wrote:

           

          In the documentation it's stated to add a persistence.xml file to your application, however I couldn't find this file in the jbpm 5 admin consoles, just a datasource deployed named testDS1-ds.xml.

          I don't remember exactly where installer puts but my first guess would be that is should be in the console server package (for instance jbpm-gwt-console-server-war/WEB-INF/classes/META-INF).

           


          Mylos Kathos wrote:

          Also, how does the jBPM engine understand that the persistence.xml provided in my Web application is the one used by the jBPM 5 engine ? ( I guess it needs to be named "org.jbpm.persistence.jpa") ?

          Yes, you're right. Persistence unit is resolved by name while creating entity manager factory by jBPM console.

           

          HTH

          • 2. Re: Using MySQL (or other database) with jBPM5
            mylos78

            Hello Maciej,

            thank you very much for your reply. I managed to find persistence.xml using your suggestion. One last thing: under jbpm-gwt-console-server-war/WEB-INF/classes/META-INF there is both hibernate.cfg.xml and persistence.xml. Do I have to replicate the connection settings in hibernate.cfg.xml or it's just necessary to use persistence.xml ?

            Thanks a lot

            Mylos

            • 3. Re: Using MySQL (or other database) with jBPM5
              swiderski.maciej

              yes, you need to modify both files. hibernate.cfg.xml file is dedicated for retrieving process log information (bam module)

              • 4. Re: Using MySQL (or other database) with jBPM5
                mylos78

                Thanks again !