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.
Array objects using connection pooling in WebSphere
Prashanth menon
Ranch Hand
Joined: Feb 20, 2001
Posts: 65
posted
0
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
posted
0
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