Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.5.0
Description
The blob support does non atomic updates on a message add and is a little inefficient due to the need to insert and update the blob. With the latest ojdbc6.jar oracle drivers, blobs can be used under the hood so the default jdbc adapter can work with oracle.
Currently the following configuration will achieve this:
<persistenceAdapter> <jdbcPersistenceAdapter dataSource="#oracle-ds"> <adapter> <defaultJDBCAdapter> <statements> <statements longDataType="NUMBER" sequenceDataType="NUMBER" /> </statements> </defaultJDBCAdapter> </adapter> </jdbcPersistenceAdapter> </persistenceAdapter>
where oracle-ds is a bean:
<bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="oracle.jdbc.OracleDriver" /> <property name="url" value="jdbc:oracle:thin:@localhost:1521:amq" /> <property name="username" value="user" /> <property name="password" value="pass" /> </bean>
This enhancement will make the Oracle adapter behave like this by default such that the following configuration will work
<jdbcPersistenceAdapter dataSource="#oracle-ds" />
and will not manipulate blobs directly.
If blob support is necessary for backward compatibility for earlier drivers the blob adapter can be specified using the adapter element:
<persistenceAdapter>
<jdbcPersistenceAdapter dataSource="#oracle-ds">
<adapter>
<oracleBlobJDBCAdapter />
</adapter>
</jdbcPersistenceAdapter>
</persistenceAdapter>