1 Reply Latest reply on Dec 6, 2008 11:53 AM by kukeltje

    JNDI not working correctly with new Classloading

    roschmel

      Hi,

      I just tried out 3.3.0 with async subprocesses configured with the JMS Message Factory and the custom ForEachForkHandler from the wiki http://www.jboss.org/community/docs/DOC-9766

      The problem is, that the JMSConnectionFactory cannot be found because the java:comp/env Namespace in JNDI cannot be resolved.

      The cause of the problem is https://jira.jboss.org/jira/browse/JBPM-1448. Since this was changed, nodes are executing with a different context class loader but JBoss resovles the java:comp/env Namespace using the context class loader and it cannot find the connection factory within an action anymore.

      This also can lead to further troubles, when trying to use EJBs or other JNDI lookups.

      One solution is to set the following configuration in jbpm.cfg.xml:

      <string name='jbpm.classLoader' value='context' />


      This set the context class loader as the parent for the process class loader and therefore JNDI works correctly again.

      Since the fix for https://jira.jboss.org/jira/browse/JBPM-1448 is not backward compatible it should be at least documented.

      Robert