• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Use of JNDI Lookup with DataSourceTransactionManager

Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am using DataSourceTransactionManager since we have one datasource and JNDI lookup is used for datasource.
Everything worked fine with Tomcat on local but once we deployed it on websphere it failed with loading testing incase of mulitple connections.

I get following exceptions-
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Connection is closed.

I have very little knowledge in Spring Transact on Management I want to know if is was right to use DataSourceTransactionManager
with JNDI lookup.
Or there is something else.
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should configure your transaction manager seperately for tomcat and websphere.
For instance,
for tomcat use "HibernateTransactionManager"
for websphere use webspheretransaction manager

help may be further, if you give more detail about your problem and configuration.
Posts: 17346
Mac IntelliJ IDE Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are deploying on an App Server, you typically want to use their JTA Transaction Manager. You can do that in Spring with <tx:jta-transaction-manager/>. Spring will automatically detect which app server you are in and use its JTA TransactionManager.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic