3 Replies Latest reply on Sep 21, 2009 9:49 AM by kukeltje

    Can JBPM manages more than one datasource?

    jbosspnet

      Hi all,
      I have installed JBPM 3.2.3 (with datasource hypersonic) on JBoss 4.2.3.GA.
      My goal is to have only one instance of JBPM under JBoss to manage more than one client, each with a different database (every database contains
      the JBPM_* tables and client specific tables).
      Can I deploy process archive containing the file processdefinition.xml (and others like gpd.xml, etc.) and files like jbpm.cfg.xml and
      hibernate.cfg.xml referring to the client specific datasource (already deployed in JBOSS? or can I specify it in some other way, for example in the same
      archive)?

        • 1. Re: Can JBPM manages more than one datasource?
          kukeltje

          no, sorry.

          • 2. Re: Can JBPM manages more than one datasource?
            jbosspnet

            I try to change approach.

            Suppose I do not install JBPM in JBOSS (so I do not have the folder "jbpm" under the Jboss deploy directory but more important I have no dependicies with a datasource) and all the JBPM clients are web applications that can use a different datasource, deployed in JBOSS by the usual *-ds.xml file.

            If now I deploy an ear file (to enclose both web application and a custom version of jbpm-enterprise that not only refers to the JNDI name defined in the datasource already deployed but also allows the access to the JBPM EJBs (namely CommandServiceBean, TimerServiceBean, etc.)), with the correct JBPM configuration (jbpm.cfg.xml and hibernate.cfg.xml file, the last refers to the same JNDI datasource name), every process that I will deploy (by jbpmContext.deployProcessDefinition method) or every process instance that I will create (processDefinitio.createProcessInstance method) in the web application, will refer to the correct JBPM database.

            Is it correct?

            Are there any problems about this approach (for example the deploy of another ear, the access to the JBPM EJBs or something else)?

            Regards.

            • 3. Re: Can JBPM manages more than one datasource?
              kukeltje

              this should work.