File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes Oracle Array objects using connection pooling in Websphere Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Oracle Array objects using connection pooling in Websphere" Watch "Oracle Array objects using connection pooling in Websphere" New topic

Oracle Array objects using connection pooling in Websphere

Prashanth menon
Ranch Hand

Joined: Feb 20, 2001
Posts: 65
Hi all,
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);
The exception raised is
Is it by any chance possible to implement the above using a connection pooling in websphere. Looks like it is possible in Oracle AS.
Thank you
Claire Zora

Joined: Feb 03, 2003
Posts: 2
I have exactly the same problem. Apparently regardless of which driver you say you want to use, was always takes ibm implementations of data source & connexion pool.
For the time beeing, I have resolved this problem by bypassing was datasource declaration.
I have declared in a static block my own Oracle Datasource, binded it in JNDI and then I retrieve it later as usual.
Therefore I can use exactly the code you wrote, and all castings are fine.
This method is OK (ie it works) but I'm not totally satisfied with the "beauty of it", so if anyone has any suggestions ?...
May I had that weblogic acts axactly as Was with weblogic implementations.
I agree. Here's the link:
subject: Oracle Array objects using connection pooling in Websphere
It's not a secret anymore!