Class BlobJDBCAdapter
- java.lang.Object
-
- org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter
-
- 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, MAX_ROWS, maxRows, prioritizedMessages, statements
-
-
Constructor Summary
Constructors Constructor Description BlobJDBCAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 outcomebyte[]
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, doUpdateMessage, dumpTables, dumpTables, getBinaryData, getMaxRows, getStatements, getStoreSequenceId, isBatchStatements, isBatchStatments, limitQuery, printQuery, printQuery, setBatchStatements, setBatchStatments, setBinaryData, setMaxRows, setUseExternalMessageReferences
-
-
-
-
Method Detail
-
setStatements
public void setStatements(Statements statements)
- Specified by:
setStatements
in interfaceJDBCAdapter
- Overrides:
setStatements
in classDefaultJDBCAdapter
-
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 interfaceJDBCAdapter
- Overrides:
doAddMessage
in classDefaultJDBCAdapter
- Throws:
SQLException
IOException
-
doGetMessage
public byte[] doGetMessage(TransactionContext c, MessageId id) throws SQLException, IOException
- Specified by:
doGetMessage
in interfaceJDBCAdapter
- Overrides:
doGetMessage
in classDefaultJDBCAdapter
- Throws:
SQLException
IOException
-
-