Thanks a lot Denıs ıt ıs really useful On Thu, Apr 23, 2009 at 11:46 AM, Denis Bessmertnyj < denis.bessmert...@gmail.com> wrote:
> finally we found solution which works. > maybe it will be useful for someone. > > getJdbcTemplate().update( > "Insert into ...values (?,?,?,?,?,?,?,?,?)", > new Object[] {new SqlLobValue(getBlobByteArray()), ...}, > new int[] {Types.BLOB}); > > It uses DefaultLobHandler, which works fine for us with Geronimo connection > pool. > > > > On Thu, Apr 23, 2009 at 10:51 AM, Denis Bessmertnyj < > denis.bessmert...@gmail.com> wrote: > >> Hi Guys, >> >> We have problem with oracle blobs saving when we use Geronimo connection >> pool from our Spring application. >> We have something like this >> >> final OracleLobHandler lobHandler = new OracleLobHandler(); >> lobHandler.setNativeJdbcExtractor(new SimpleNativeJdbcExtractor()); >> >> jdbcTemplate.execute("Insert into ....(.....) values >> (?,?,?,?,?,?,?,?,?)", new >> >> AbstractLobCreatingPreparedStatementCallback(lobHandler) { >> @Override >> protected void setValues(PreparedStatement ps, LobCreator >> lobCreator) throws SQLException, >> DataAccessException { >> lobCreator.setBlobAsBytes(ps, 5, ...); >> } >> >> This part of code works fine with well known connection pools, but not >> with geronimo when we trying to save blobs. >> Maybe someone had the same problem? How you resolved it? Did you write >> your own extractor for geronimo pool? If yes, may you share with us. >> >> Actually, is it possible to change geronimo connection pool to something >> else, but still use Geronimo JNDI to access that pool, i.e. change pool on >> server side? >> >> thanks, >> >> - >> Denis >> > >