-
1. Re: JNDI-Lookups for the ProcessEngine in Tomcat
sebastian.s Sep 11, 2009 1:57 AM (in response to sebastian.s)Nobody? Maybe you could give a statement on this, Joram? I would be very grateful. And if it is possible but there is some work to do I will see if I can help with this.
-
2. Re: JNDI-Lookups for the ProcessEngine in Tomcat
kukeltje Sep 11, 2009 3:53 AM (in response to sebastian.s)does the console work? afaik it also uses a jndi lookup (but not sure)
-
3. Re: JNDI-Lookups for the ProcessEngine in Tomcat
sebastian.s Sep 12, 2009 9:59 AM (in response to sebastian.s)I encountered no problems using the console.
-
4. Re: JNDI-Lookups for the ProcessEngine in Tomcat
jbarrez Sep 12, 2009 10:23 AM (in response to sebastian.s)The ProcessEngine on Tomcat is not bound to JNDI (there is no way to write in the JNDI tree of Tomcat, which is possible in JBoss). A solution to this could be to register the process engine in the jndi tree by modifying the Tomcat config. But that's not a path we want to take, since we want to simplify the Process Engine lookup in the future (ie not through JNDI)
The Tomcat integration just gets a default process engine by calling Configuration.getProcessEngine(). This will oncstruct a ProcessEngine using a jbpm.cfg.xml on the classpath (which is actually in a jar in /lib folder of Tomcat). People who want to use the same ProcessEngine, must just call this same method. -
5. Re: JNDI-Lookups for the ProcessEngine in Tomcat
sebastian.s Sep 12, 2009 4:33 PM (in response to sebastian.s)Hello Joram,
thank you for your answer. I tried to do this but I did not succeed. Might be too my lack of knowledge about JDNI. For me it is not important to use JDNI but to access the same which is running.
So if I want to access the process engine instance running in Tomcat I do it by using the static method Configuration.getProcessEngine() ?? This works in jBPM 4.1 or is this planned for future releases? If it does not work like this how does the console appplication access the engine?
Have a nice weekend!
Sebastian -
6. Re: JNDI-Lookups for the ProcessEngine in Tomcat
sebastian.s Sep 12, 2009 5:40 PM (in response to sebastian.s)I tried it by using Configuration.getProcessEngine() in a webservice running on the same Tomcat server but I am getting an exception:
java.lang.NoClassDefFoundError: Could not initialize class org.jbpm.pvm.internal.env.JbpmConfigurationParser
-
7. Re: JNDI-Lookups for the ProcessEngine in Tomcat
jbarrez Sep 13, 2009 3:06 PM (in response to sebastian.s)Sebastion, this is the code that is used in the console to look up the process engine:
if (processEngine == null) { synchronized (ProcessEngine.class) { if (processEngine == null) { try { InitialContext ctx = new InitialContext(); processEngine = (ProcessEngine) ctx.lookup(PROCESS_ENGINE_JNDI_NAME); } catch (Exception e) { // Fall back to default mechanism which build a procEngine from a default jbpm.cfg.xml processEngine = Configuration.getProcessEngine(); } } }
Since there is no JNDI bound Process Engine in Tomcat, the catch() clause will be executed. So deploying a web service on Tomcat, should work.
* Are you using the exact same Tomcat that you get when u use the ant install task.
* Is the jbpm jar in the tomcat /lib folder? -
8. Re: JNDI-Lookups for the ProcessEngine in Tomcat
sebastian.s Sep 14, 2009 3:29 AM (in response to sebastian.s)Hello Joram,
thank you your reply. Yes, I just verified. I am jusing the Tomcat which was installed by the ant task of the demo setup and jbpm.jar is in the Tomcat lib-Folder.
Any hints? :)
Sebastian -
9. Re: JNDI-Lookups for the ProcessEngine in Tomcat
sebastian.s Sep 15, 2009 4:01 AM (in response to sebastian.s)Seems to work somehow now the way you proposed doing it. It's an Axis2 webservice and I had to delete some XML libs from the axis2.jar. Might be interesting for others trying to use Axis2 on the Tomcat set up by the jBPM ant task.
-
10. Re: JNDI-Lookups for the ProcessEngine in Tomcat
jbarrez Sep 17, 2009 3:45 AM (in response to sebastian.s)That's indeed very strange. Do you happen to know which xml libs you needed to remove?
-
11. Re: JNDI-Lookups for the ProcessEngine in Tomcat
kukeltje Sep 17, 2009 3:56 AM (in response to sebastian.s)Maybe also (indirectly) jdk related?
-
12. Re: JNDI-Lookups for the ProcessEngine in Tomcat
nchandra33 Sep 28, 2009 5:53 AM (in response to sebastian.s)How did you solve this problem of getting axis2 client work with jBPM?
Please share the detailed steps.
See my original post at:
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257288#4257288 -
13. Re: JNDI-Lookups for the ProcessEngine in Tomcat
sebastian.s Sep 28, 2009 6:07 AM (in response to sebastian.s)Sorry but I did not notice that there have been questions regarding my solution. Take a look into the new thread started by nchandra33 to see the list.