2

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.

srinivasan
  • 823
  • 1
  • 8
  • 14

1 Answers1

1

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

Lan
  • 6,470
  • 3
  • 26
  • 37