org.apache.activemq.store.jdbc.adapter
Class BlobJDBCAdapter

java.lang.Object
  extended by org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter
      extended by org.apache.activemq.store.jdbc.adapter.BlobJDBCAdapter
All Implemented Interfaces:
JDBCAdapter
Direct Known Subclasses:
InformixJDBCAdapter, OracleBlobJDBCAdapter

public class BlobJDBCAdapter
extends DefaultJDBCAdapter

This JDBCAdapter inserts and extracts BLOB data using the getBlob()/setBlob() operations. This is a little more involved since to insert a blob you have to: 1: insert empty blob. 2: select the blob 3: finally update the blob with data value. The databases/JDBC drivers that use this adapter are:


Field Summary
 
Fields inherited from class org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter
batchStatments, cleanupExclusiveLock, MAX_ROWS, maxRows, prioritizedMessages, statements
 
Constructor Summary
BlobJDBCAdapter()
           
 
Method Summary
 void doAddMessage(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, byte[] data, long expiration, byte priority, XATransactionId xid)
          A non null xid indicated the op is part of 2pc prepare, so ops are flagged pending outcome
 byte[] doGetMessage(TransactionContext c, MessageId id)
           
 void setStatements(Statements statements)
           
 
Methods inherited from class org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter
close, close, doAddMessageReference, doClearLastAck, doCommitAddOp, doCreateTables, doDeleteOldMessages, doDeleteSubscription, doDropTables, doGetAllSubscriptions, doGetDestinations, doGetDurableSubscriberMessageCount, doGetLastAckedDurableSubscriberMessageId, doGetLastMessageStoreSequenceId, doGetLastProducerSequenceId, doGetMessageById, doGetMessageCount, doGetMessageReference, doGetSubscriberEntry, doMessageIdScan, doRecordDestination, doRecover, doRecoverNextMessages, doRecoverNextMessages, doRecoverNextMessagesWithPriority, doRecoverPreparedOps, doRecoverSubscription, doRemoveAllMessages, doRemoveMessage, doSetLastAck, doSetLastAckWithPriority, doSetSubscriberEntry, dumpTables, dumpTables, getBinaryData, getMaxRows, getStatements, getStoreSequenceId, isBatchStatments, printQuery, printQuery, setBatchStatments, setBinaryData, setMaxRows, setUseExternalMessageReferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlobJDBCAdapter

public BlobJDBCAdapter()
Method Detail

setStatements

public void setStatements(Statements statements)
Specified by:
setStatements in interface JDBCAdapter
Overrides:
setStatements in class DefaultJDBCAdapter

doAddMessage

public void doAddMessage(TransactionContext c,
                         long sequence,
                         MessageId messageID,
                         ActiveMQDestination destination,
                         byte[] data,
                         long expiration,
                         byte priority,
                         XATransactionId xid)
                  throws SQLException,
                         IOException
Description copied from class: DefaultJDBCAdapter
A non null xid indicated the op is part of 2pc prepare, so ops are flagged pending outcome

Specified by:
doAddMessage in interface JDBCAdapter
Overrides:
doAddMessage in class DefaultJDBCAdapter
Throws:
SQLException
IOException

doGetMessage

public byte[] doGetMessage(TransactionContext c,
                           MessageId id)
                    throws SQLException,
                           IOException
Specified by:
doGetMessage in interface JDBCAdapter
Overrides:
doGetMessage in class DefaultJDBCAdapter
Throws:
SQLException
IOException


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.