You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Richard Osbaldeston <ri...@wordmap.com> on 2005/04/18 16:57:52 UTC

Access to the underlying connection

Hi,

    I've been trying to use the DAO Framework recently to facilitate in 
calling a large number of Stored Procedures in and Oracle database (I'd 
have liked to use SqlMaps too but most of these procedures seem to 
return ref cursor parameters which IBatis cannot handle).

One of these procedures takes an array structure as a parameter 
(proprietary I know) which is normally done with a call like this:
oracle.sql.ArrayDescriptor desc = 
oracle.sql.ArrayDescriptor.createDescriptor(getSchemaPrefix(schema) + 
"TY_STR_VARRAY", connection);

But under IBatis it'll fail because the connection is actually an IBatis 
proxy com.ibatis.common.jdbc.SimpleDataSource.SimplePooledConnection 
where thr wrapper SimplePooledConnection is private. Is there a way to 
access the underlying oracle/jdbc connection to complete the 
ArrayDescriptor call or some other way around the problem?

Thanks,

- Richard

Re: Access to the underlying connection

Posted by Brandon Goodin <br...@gmail.com>.
hmmm.... did this repost?

Brandon

On 4/18/05, Richard Osbaldeston <ri...@wordmap.com> wrote:
> Hi,
> 
>     I've been trying to use the DAO Framework recently to facilitate in
> calling a large number of Stored Procedures in and Oracle database (I'd
> have liked to use SqlMaps too but most of these procedures seem to
> return ref cursor parameters which IBatis cannot handle).
> 
> One of these procedures takes an array structure as a parameter
> (proprietary I know) which is normally done with a call like this:
> oracle.sql.ArrayDescriptor desc =
> oracle.sql.ArrayDescriptor.createDescriptor(getSchemaPrefix(schema) +
> "TY_STR_VARRAY", connection);
> 
> But under IBatis it'll fail because the connection is actually an IBatis
> proxy com.ibatis.common.jdbc.SimpleDataSource.SimplePooledConnection
> where thr wrapper SimplePooledConnection is private. Is there a way to
> access the underlying oracle/jdbc connection to complete the
> ArrayDescriptor call or some other way around the problem?
> 
> Thanks,
> 
> - Richard
>