This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Websphere and the fly likes Oracle XA Data Source Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Oracle XA Data Source" Watch "Oracle XA Data Source" New topic
Author

Oracle XA Data Source

Edy Yu
Ranch Hand

Joined: Nov 21, 2000
Posts: 264
I have a Oracle XA Data Source set up in WAS 5.0.
When I try to get a connection through that datasource as following:
Context ctx = new InitialContext();
XADataSource ds = (XADataSource) ctx.lookup("jdbc/xads2");
conn = ds.getXAConnection().getConnection();
I got an exception:
java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
Anybody knows why?
Thanks in advance...


<i><br />Sun Certified Programmer for Java 2 Platform (SCJP)<br />Sun Certified Developer for Java 2 Platform (SCJD)<br />Sun Certified Web Component Developer for Java2 Platform, Enterprise Edition (SCWCD)<br />Sun Certified Business Component Developer for Java2 Platform, Enterprise Edition (SCBCD)<br />Sun Certified Enterprise Architect for J2EE (SCEA)<br />IBM Certified Enterprise Developer, WebSphere Studio V5.0<br /></i>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle XA Data Source
 
Similar Threads
XAPool throwing NullPointerException
SQLServer with J2EE 1.3.1
REPOST: Oracle XA Datasource with WebSphere
Data Source settings
How to include files for a new data source