wood burning stoves 2.0*
The moose likes Distributed Java and the fly likes How to get XADatasource from a DB2 database hosted on Websphere 6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "How to get XADatasource from a DB2 database hosted on Websphere 6.1" Watch "How to get XADatasource from a DB2 database hosted on Websphere 6.1" New topic
Author

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

A Ra
Greenhorn

Joined: Mar 21, 2012
Posts: 1
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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to get XADatasource from a DB2 database hosted on Websphere 6.1
 
Similar Threads
NO commit() in code, but getting "Operation Connection.commit is not allowed during a global transa"
Error : WSVR0068E: Attempt to start EnterpriseBean
Configuring WAS 6.1 data source
Misterious Problem invoking remote EJB3 on WAS 7
error in bean managed transactions