File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get XADatasource from a DB2 database hosted on Websphere 6.1

A Ra
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on distributed transactions. I am trying to implement XA transaction using Atomikos as the Transaction Manager. One of my issues is being able to get a "XADataSource" from the DB2 database hosted on the Websphere 6.1 server. I am using jndi lookup to get the Datasource as below:

However, this lookup causes the following exception:

The same works fine if attribute "ds" is of type DataSource instead of XADataSource. But I want get XAConnections and hence require XADataSource. I have tried searching a lot but am unable to figure out how to avoid this cast exception. Any pointers on what i should do differently?
I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic