Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3611

Revert the Oracle jdbc adapter to a variant of the default jdbc adapter in place of the one supporting blobs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.5.0
    • 5.6.0
    • Message Store

    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>

      Attachments

        Activity

          People

            gtully Gary Tully
            gtully Gary Tully
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: