そのようなコードで Spring JDBC lobCreator.setBlobAsBinaryStream(,,) に渡した後、Java で InputStream (bean.getContentAsStream()) を手動で閉じる必要がありますか?
getJdbcTemplate().execute(
"INSERT INTO file (" +
"id, " + //1
"FILE_DATA) " + //2
" VALUES (?, ?)",
// lobhandler is instance of org.springframework.jdbc.support.lob.OracleLobHandler
new AbstractLobCreatingPreparedStatementCallback(lobhandler){
@Override
protected void setValues(PreparedStatement ps, LobCreator lobCreator) throws SQLException, DataAccessException {
ps.setString(1, bean.getRecordId());
lobCreator.setBlobAsBinaryStream(ps, 2, bean.getContentAsStream(), (int) bean.getContentSize());
}
});