This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Array objects using connection pooling in WebSphere Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply locked New topic
Author

Array objects using connection pooling in WebSphere

Prashanth menon
Ranch Hand

Joined: Feb 20, 2001
Posts: 65
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

Joined: May 10, 2000
Posts: 1860
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Array objects using connection pooling in WebSphere
 
Similar Threads
Passing Arrays to Oracle stored procedures
Calling Stored procedures
Oracle Array objects using connection pooling in Websphere
ClassCastException in Weblogic 5.1 while using OracleCallableStatement
Getting array of Oracle Objects