Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-1903

java:/comp/env JNDI Namespace not found within ActionHandler Implementations

XMLWordPrintable

    • Documentation (Ref Guide, User Guide, etc.)
    • Workaround Exists
    • Hide

      Add the following configuration to jbpm.cfg.xml:

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

      Show
      Add the following configuration to jbpm.cfg.xml: <string name='jbpm.classLoader' value='context' />

      When you try to lookup the JNDI Namespace java:comp/env in an enterprise deployment wihtin an ActionHandler implementation it will throw an NameNotFoundException.

      So it is not possible to lookup ejb or other component local stuff within ActionHandler implementations.

      In special this also affects you, when you signal a token within an ActionHandler and any of the following Node is async using the JMSMessgeService because the JMS implementation will also make a lookup on the connection factory using the comp/env Namespace.

      The reason for this is the change in the classloader when executing ActionHandlers. The contex class loader is by default changed to the ProcessClassLoader using the UCL as parent. But JBoss uses the ContextClassLoader ot scope the comp/env Namespace. When using the original context class loader as the parent for the ProcessClassLoader it works again.

              aguizar_jira Alejandro Guizar (Inactive)
              roschmel_jira Robert Schmelzer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: