Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] JNDI question - type, factory, auth in a single entry outside of a web app?

I'm looking to get Camunda (BMP engine) working in Jetty by using their working tomcat as an example. 

Tomcat's JNDI for a needed resource is in its server.xml (independent of specific web app) as follows:

<GlobalNamingResources>
   
<Resource name="global/camunda-bpm-platform/process-engine/ProcessEngineService!org.camunda.bpm.ProcessEngineService"
       
auth="Container"
       
type="org.camunda.bpm.ProcessEngineService"
       
description="camunda BPM platform Process Engine Service"
       
factory="org.camunda.bpm.container.impl.jndi.ProcessEngineServiceObjectFactory" />

When doing this in jetty, I didn't see a place to put all of this info in a single entry, outside of  a web app.  It looks like I have to create the naming entry in, for example, jetty.xml and then, to add the 'type' and the 'auth', I have to add a <resource-ref> entry in web.xml of my camunda engine web app (there are 2 of them).  Is this correct?  E.g.

jetty.xml:

Configure id="Server" class="org.eclipse.jetty.Server">
   
<New id="cf" class="org.eclipse.jetty.plus.jndi.Resource">
       
<Arg><Ref refid="Server"/></Arg>
       
<Arg>global/camunda-bpm-platform/process-engine/ProcessEngineService!org.camunda.bpm.ProcessEngineService</Arg>
       
<Arg>
           
<New class="
org.camunda.bpm.container.impl.jndi.ProcessEngineServiceObjectFactory"></New>
       
</Arg>
   
</New>
</Configure>


and then in WEB-INF/web.xml:

<resource-ref>
    <res-ref-name>camunda/pe</res-ref-name>
    <res-type>org.camunda.bpm.ProcessEngineService</res-type>
    <res-auth>Container</res-auth>
</resource-ref>

Is there another way?

Bill

Back to the top