• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Name comp/env/wm not found in context "java:"

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to do some asynchronous work in WS. I've followed the IBM tutorial on how to use the WorkManager and WorkItems to execute code. However, if I look up the work manager with java:comp/env/wm/default, I get the message in the subject.

If I look up the work manager via "ws/default", I find it but WS complains that I'm looking up the resource with out a context.

I really want to do something more like "java:comp/env/ws/MyConfigedWorkManager", but can't.

Any ideas?
Thanks
JPD
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to define a resource reference (using the resource-ref tag) in web.xml and then figure out how to map that resource to a real resource in the web server. If you're using WebSphere app server then the deployment step will take care of that for you (you'll be prompted to map the webapp resource to a server resource). I don't know how other servers handle the deployment mapping. In your case you would specify <res-ref-name>ws/MyConfigedWorkManager</res-ref-name> as the resource reference name. Then your JNDI call would be context.lookup("java:comp/env/ws/MyConfigedWorkManager").
 
reply
    Bookmark Topic Watch Topic
  • New Topic