4 Replies Latest reply on Aug 29, 2013 4:41 PM by Al Koch

    How do I change the port # associated with the jBPM server?

    Al Koch Newbie

      Hello,

       

      From the evaluation sample (in the jBPM 5.4 Full Installer), in the ProcessTest.java source we have humanTaskHandler.setPort(5153);  How can I configure the jBPM server to use a different port?

       

      Thank you.

      Al

        • 1. Re: How do I change the port # associated with the jBPM server?
          Jiri Svitak Novice

          Just edit the file

          ${JBOSS_AS_DIR}/standalone/deployments/jbpm-human-task-war-5.4.0.Final-EE6.war/WEB-INF/web.xml

          and there you can configure a different HornetQ port for listening.

           

          HTH

          • 2. Re: How do I change the port # associated with the jBPM server?
            Al Koch Newbie

            Hi Jiri,

             

            Thank you for your reply.  I've located the XML file and have two questions:

             

            1)  If the following is the correct location to modify, why is no Port specified here?  In particular, where is the Port 5153 that is used in the jBPM evaluation sample code I showed in my post coming from?

            <init-param>

            <param-name>hornetq.port</param-name>

            <param-value/>

            </init-param>

            The question about where Port 5153 is being defined is important.  This is because I have discovered that if I install and launch a server that is more recent than the version 7.1.1 that is installed by the JBPM full installer, the JBPM server does not respond on port 5153 anymore.  That is, the version of JBoss that is installed by the JBPM installer seems to automatically listen on Port 5153 even though this is not in the XML file you mentioned.  Later servers don't seem to be listing on this port any longer.  So, do you know where the default port 5153 is actually being set?

            2) In an attempt to become better able to answer my own questions, can I ask how you knew this?  I realize that this may be a hard question to answer but I am wondering if this could be found in some "User guide" or docs somewhere?

             

            Thanks again,

            Al

            • 3. Re: How do I change the port # associated with the jBPM server?
              Jiri Svitak Novice

              Hi Al,

              "why is no Port specified here?" - Because the default value is hardcoded elsewhere and setting up a value in web.xml should be enough to override that default value. You can also read about default ports from the docs:

              http://docs.jboss.org/jbpm/v5.4/userguide/ch.human-tasks.html#d0e5589

               

              Sorry, but I am confused by your description. What is a more recent server? Port 5153 is defined and used by standalone human task service .war, this is not set in Jboss AS. Have you checked if the service started correctly, when it's not listening? Have you listed opened ports?

               

              Remember there is also an option to implement own human task service using the provided APIs and use it embedded in your application.

               

              Jiri

              1 of 1 people found this helpful
              • 4. Re: How do I change the port # associated with the jBPM server?
                Al Koch Newbie

                Hi Jiri,

                 

                Again, thanks for your reply.

                 

                I am new to JBoss and jBPM and am working hard to understand the architecture.  You should be confused by my description because I was confused when I wrote the question!  What I am observing is that when I launched the "jboss-as-7.1.1.Final" server which deploys the six jBPM war files I can then run the evaluation sample in the debugger in Eclipse Kepler and the sample application connects to port 5153 and the sample works.  However if I repeat this process using either of the two later servers (jboss-as-8.0.0.Alpha1-SNAPSHOT (7.2) or wildfly-8.0.0.Beta1-SNAPSHOT) I get an error message in the Kepler debugger stating that a connection cannot be made on port 5153 ("Could not connect task client: on ip: 127.0.0.1 - port: 5153").  Since the six jBPM war files are identical in all three of these test cases that suggested to me that the port number was defaulting to different values with the latter two servers.  That's why I posed the question the way that I did but that did confuse me because I was surprised that the port number would be specified in the JBoss server itself (which you are pointing out, of course, is not the case).  But, why then, do the jBPM files fail with "can't connect to port" when we change JBoss servers?

                 

                You ask if the "service started correctly" for the latter two servers and I think that it is.  In these two cases I use the JBoss Administrator console and I confirm that jbpm-human-task-war.war is shown as deployed.  Is this the correct test?  Also, can you tell me how I should "list opened ports"?

                 

                Finally, I tried your suggestion for changing the port in the web.xml but I have a problem.  I changed the port in the web.xml in a "deployed/exploded" folder but I am discovering that on each launch of the JBoss server JBoss "redeploys" the six jBPM war files and then runs with that new set of deployed files.  That means, of course, that my changes in the web.xml file (made in the "prior" deployment folder) are ignored.  Can you tell me why JBoss does this when there's been no changes to the war files?  Is there a way this can be prevented?

                 

                Thanks,

                Al