Question

Why WorkManager targeted to an Application Server is not part of JNDI Tree of Application Server? I have spent lot of time in this. Or am i missing something? Then can get it using java:comp/env/WorkManagerName.

Was it helpful?

Solution

I do not fully understand the last sentence in your question, but I guess you are asking how to look up the work manager in java:comp/env/..?

You need to configure your work manager in your deployment descriptor such as web.xml, ejb-jar.xml first as below

<resource-ref>
   <res-ref-name>wm/MyWorkManager</res-ref-name>
   <res-type>commonj.work.WorkManager</res-type>
   <res-auth>Container</res-auth>
   <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

Then you do JNDI lookup as java:comp/env/wm/MyWorkManager

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top