• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

WebSphere 5.1 and JTA

 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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 ]
 
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!