Win a copy of The Java Performance Companion this week in the Performance forum!
    Bookmark Topic Watch Topic
  • New Topic

Array objects using connection pooling in WebSphere

 
Prashanth menon
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Report post to moderator
I tried passing ARRAY object from java to oracle which in turn returns another array. This worked with the thin connection. But when I used Connection pooling of Websphere, this failed. Throws me out at the point where I create the ArrayDescriptor object. The Code is as follows.

String[] strArrayr={"12","13","14"};
//DATA_1_COL_TY is an oracle collection type and con is a Connection object.
ArrayDescriptor arrVarcharDesc=ArrayDescriptor.createDescriptor("DATA_1_COL_TY", con);
ARRAY arr = new ARRAY(arrVarcharDesc, connectionDb, strArrayr);
OracleCallableStatement callStmt = (OracleCallableStatement) con.prepareCall(
"{ call get_orders(?,?)}");
callStmt.setArray(1, arr);
callStmt.registerOutParameter(
2,
OracleTypes.ARRAY,
"DATA_2_COL_TY");
….
The exception raised is
java.lang.ClassCastException: com.ibm.ejs.cm.proxy.OracleConnectionProxy
Is it by any chance possible to implement the above using a connection pooling.
TIA
Prashanth
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Report post to moderator
Closing this thread - please use this one instead.
Thanks
Simon
p.s. please try not to post the same question in more than one forum
 
    Bookmark Topic Watch Topic
  • New Topic