What I do is:
Connection jdbcConnection = null;
ResultSet rs = null; try {
jdbcConnection = getSqlMapTransactionManager().getCurrentConnection(); DatabaseMetaData dbmd = jdbcConnection.getMetaData();
...
// JDBC code
...
} catch (SQLException sqle) {
...
} finally {
try { rs.close(); } catch (Exception e) {} // Not close jdbcConnection (DaoManager does it for us)
// try { jdbcConnection.close(); } catch (Exception e) {}
}
I don't know if it has collateral effects. ¿Does anyone know what are the implications or drawbacks of this aproach?
Thank you,
Guido García Bernardo.
Richard Osbaldeston 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
-- Guido García Bernardo - [EMAIL PROTECTED] Tfn. +34 983 54 89 08 ITDEUSTO - Valladolid