I modified (db) nullSafeGet to let it work with Oracle that uses BLOB:
....
else if (st instanceof oracle.jdbc.OraclePreparedStatement)
{
oracle.sql.BLOB blob =
oracle.sql.BLOB.createTemporary(st.getConnection(),
false,
oracle.sql.BLOB.DURATION_SESSION);
blob.open(BLOB.MODE_READWRITE);
OutputStream out = blob.getBinaryOutputStream();
try
{
out.write((byte[]) value);
out.flush();
out.close();
}
catch (IOException e)
{
throw new SQLException("failed write to blob" + e.getMessage());
}
blob.close();
(
(oracle
.jdbc
.OraclePreparedStatement)
(st)
)
.setBLOB(
index,
blob);
}
.....
Now I am asking if this will work with some kind of connection pooling...
Time will say.
L. |