I have not used any of this against an Oracle 8 database but it does work with 8i/9i/10g. If you use the latest 10g JDBC driver then the following code should be sufficient:
Code:
map.put("REQUEST", new SqlLobValue(request));
If you are using the 9i JDBC driver then you need to use an OracleLobHandler like this (this also works with the 10g driver):
Code:
OracleLobHandler lh = new OracleLobHandler();
map.put("REQUEST", new SqlLobValue(request, lh));
If you are running with a connection pool that wraps the physical Oracle connection then you might need a NativeJdbcExtractor implementation. here is an example that works for Apache DBCP
Code:
OracleLobHandler lh = new OracleLobHandler();
lh.setNativeJdbcExtractor(new SimpleNativeJdbcExtractor());
map.put("REQUEST", new SqlLobValue(request, lh));
There are some other implementations provided as well:
- JBossNativeJdbcExtractor.java
WebLogicNativeJdbcExtractor.java
WebSphereNativeJdbcExtractor.java
XAPoolNativeJdbcExtractor.java