4 Replies Latest reply on Jan 10, 2010 11:21 PM by Ganesh Gowtham

    JBPM4 in an Enterprise Environment

    None Ya Newbie

      I have been working with JBPM4 for a while now and have a perfectly usable installation of it running but would like to utilize some of the j2ee features (EJB Timers and the EJB Command Executor) and can't seem to find any documentation on setting this up. Currently I am using JBPM 4.1 but could upgrade if it would resolve some of the problems that I am running into.


      Just as a little back ground the structure of the Enterprise application I am working with uses jBPM4 embeded in the ear


        |--jbpm4 enterprise jar

        |--jbpm4 service archive (this is on jboss)

         --other j2ee components of the application


      I have looked through the source code and picked around as best I could to see that there are settings for using the EJBs provided but thing I try and do seems to get the EJBs working.


      First there is a "target" attribute on the timer-session wire binding, but this reference what appears to be a non-existant class (org.jbpm.enterprise.internal.ejb.EnterpriseTimerSession).


      I also tried replacing the timer-session binding with the ejb-timer-session binding, and although the ejb is clearly in the jndi tree on the jboss server, jbpm is throwing the following exception when trying to initialize the EjbTimerSession:

      org.jbpm.pvm.internal.wire.WireException: couldn't initialize object 'org.jbpm.enterprise.internal.ejb.EjbTimerSession': couldn't lookup 'java:comp/env/ejb/LocalTimer' from the initial context


      If anyone can provide me any assistance on getting JBPM4 set up to utilize the provided EJBs I would really appriciate it.

        • 1. Re: JBPM4 in an Enterprise Environment
          Ronald van Kuijk Master
          could you, without fully upgrading your (production?) environment test if this still occurs with 4.3?
          • 2. Re: JBPM4 in an Enterprise Environment
            None Ya Newbie

            Thanks for the response,


            The application is not yet in a production environment.  It was in QA that we discovered a problem with jboss freezing when the job executor was attempting to process existing timer jobs, at start up. After some research this does not appear to be an issue with jBPM but is exacerbated by the load produced by jBPM.  We believed this could be in part due to the JobExecutor spawning threads rather than utilizing the j2ee components to handle the multithreading aspect.  It was at this point that I discovered that the default jboss install (or the jbpg config from the jboss install) does not seem to utilize the j2ee components, event though it installs them. Either way I would like to be able to utilize the j2ee components. Since I couldn't find a reference on how to utilize the installed enterprise beans I had to dig through the code to figure it out.


            So to answer your question, I have upgraded to 4.3 but have not been able to test the j2EE configuration yet. I really was hoping to find some guidance as to what is the correct way to integrate the j2ee components (Timers and CommandExecutor) since the code implies one way (target="ejb") which appears to having some missing components, and the other way (ejb-timer-sesion, etc.) does not appear to be working with our configuration (again not that the jbpm.sar and jbpm-enterprise.jar are included in an ear, and not stand alone deployments).


            My most recent though was that having the sar and ejbs inside an ear was causing some problem with the jndi look, so I wanted to know if anyone knew of this issue coming up in the past and if there is a solution.


            One thing to note, and I don't think this is an issue, but I should point it out. I do not currently have the jBPM deployer operating (again trying to just have a single ear deployment) so the jbpm-enterprise.jar is not being processed by the jbpm deployer, but I can't imagine that is a problem as I beleive the jbpm deployer is for the deployment of .bar archives.


            So I will attempt to see how things run under jBPM 4.3, since I was finally able to get our app running using it (had to update some custom configurations used for unit tests). I didn't see anything in 4.3 that would reslove the jndi lookup issue (but I'm not really sure as jBPM hides the NamingException that is the root of the issue.), but I will give it a try.


            Thanks again for the time and assistance.

            • 3. Re: JBPM4 in an Enterprise Environment
              Ronald van Kuijk Master

              There are known issues where the jndi name is not 'correct', but that is on e.g. Weblogic servers and not on JBoss AS (which I think from the first post you are running).


              I've not used the enterprise timers myself, just the jobscheduler. From my experience (and that of others) it has not been a cause of a high serverload. The number of threads is limited. So it might be one (or more) of your jobs that put a high load on the server.


              In addition to the code itself, there are enterprise tests afaik in the source , maybe those can help as well.


              Sorry I can't be of anymore help.

              • 4. Re: JBPM4 in an Enterprise Environment
                Ganesh Gowtham Newbie

                Dear All


                I have issue in deploying JBPM4 .1 in Webloic 10.3


                I Had changed all confiuration files including hibernate files , weblogic xml, JMS files also I had created the Datasource and update respective xmls .


                In JBPM 4.1 we have

                • gwt-console-server.war
                • jbpm-console.war
                • jbpm-enterprise-beans.jar


                I am wondering How can i deploy these files in weblogic ?


                A) jbpm-enterprise-beans.jar is EJB module and rest 2 are war ,Do i need to create the EAR file with these 3 archives and deploy ?

                B) Do i need deploye jbpm-enterprise-beans.jar as EJB and rest 2 applications as sepearte WAR ?


                Please suggest whether i need to follow method (A) or (B) , if you have anmy remarks in my idea .


                Please let me know ur view on how to deploy apps .


                Thanks in Advance


                Ganesh Gowtham