Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle XA Data Source

 
Edy Yu
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic