ActiveMQ
  1. ActiveMQ
  2. AMQ-3611

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.0
    • Fix Version/s: 5.6.0
    • Component/s: Message Store
    • Labels:

      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>

        Activity

        Hide
        Gary Tully added a comment -
        Show
        Gary Tully added a comment - implemented in http://svn.apache.org/viewvc?rev=1207963&view=rev

          People

          • Assignee:
            Gary Tully
            Reporter:
            Gary Tully
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development