• 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

WebSphere 5.1 and JTA

 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We've got a TimerTask which is kicked off by a ServletContextListener when the web app starts. In this task we lookup a user transaction (as directed by the InfoCentrer docs) like this:

But always get a NameNotFoundException. We've tried a bunch of different patterns for the lookup string but no luck. dumpNameSpace.bat shows a usertransaction binding in JNDI at (top)/nodes/localhost/servers/server1/jta/usertransaction.

Anyone done this before and can spot what might be going wrong?
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having the exact same issue (TimerTask but attempting to get DB connection via JNDI). Did you ever find a solution to this issue?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am facing the same problem with a connection to a database using the Resource binding configured in the web.xml...

Please help me resolve...
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You gotta tell the Context where to look, something like:

Hashtable properties = new Hashtable();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.PROVIDER_URL, "jnp://localhost:1099");
InitialContext initialContext = new InitialContext(properties);

... then go your call
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you probably need to set the resource reference correctly in your web app.

read this:
http://www.webagesolutions.com/knowledgebase/waskb/waskb002/index.html
[ October 18, 2004: Message edited by: Andre Mermegas ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic