Home » activemq-parent-5.3.1-source-release » org.apache » activemq » store » jdbc » [javadoc | source]
org.apache.activemq.store.jdbc
public class: JDBCPersistenceAdapter [javadoc | source]
java.lang.Object
   org.apache.activemq.store.jdbc.DataSourceSupport
      org.apache.activemq.store.jdbc.JDBCPersistenceAdapter

All Implemented Interfaces:
    BrokerServiceAware, PersistenceAdapter

A PersistenceAdapter implementation using JDBC for persistence storage. This persistence adapter will correctly remember prepared XA transactions, but it will not keep track of local transaction commits so that operations performed against the Message store are done as a single uow.
Field Summary
protected  int maxProducersToAudit     
protected  int maxAuditDepth     
protected  boolean enableAudit     
protected  int auditRecoveryDepth     
protected  ActiveMQMessageAudit audit     
protected  LongSequenceGenerator sequenceGenerator     
Constructor:
 public JDBCPersistenceAdapter() 
 public JDBCPersistenceAdapter(DataSource ds,
    WireFormat wireFormat) 
Method from org.apache.activemq.store.jdbc.JDBCPersistenceAdapter Summary:
beginTransaction,   checkpoint,   cleanup,   commitTransaction,   createAdapter,   createMessageAudit,   createQueueMessageStore,   createTopicMessageStore,   createTransactionStore,   databaseLockKeepAlive,   deleteAllMessages,   getAdapter,   getAuditRecoveryDepth,   getBrokerService,   getCleanupPeriod,   getDatabaseLocker,   getDestinations,   getLastMessageBrokerSequenceId,   getLockAcquireSleepInterval,   getLockDataSource,   getLockKeepAlivePeriod,   getMaxAuditDepth,   getMaxProducersToAudit,   getNextSequenceId,   getScheduledThreadPoolExecutor,   getStatements,   getTransactionContext,   getTransactionContext,   getWireFormat,   initSequenceIdGenerator,   isCreateTablesOnStartup,   isEnableAudit,   isUseDatabaseLock,   isUseExternalMessageReferences,   loadDataBaseLocker,   log,   removeQueueMessageStore,   removeTopicMessageStore,   rollbackTransaction,   setAdapter,   setAuditRecoveryDepth,   setBrokerName,   setBrokerService,   setCleanupPeriod,   setCreateTablesOnStartup,   setDatabaseLocker,   setDirectory,   setEnableAudit,   setLockAcquireSleepInterval,   setLockDataSource,   setLockKeepAlivePeriod,   setMaxAuditDepth,   setMaxProducersToAudit,   setScheduledThreadPoolExecutor,   setStatements,   setTransactionIsolation,   setUsageManager,   setUseDatabaseLock,   setUseExternalMessageReferences,   setWireFormat,   size,   start,   stop,   stopBroker,   toString
Methods from org.apache.activemq.store.jdbc.DataSourceSupport:
createDataSource,   getDataDirectory,   getDataDirectoryFile,   getDataSource,   setDataDirectory,   setDataDirectoryFile,   setDataSource,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.activemq.store.jdbc.JDBCPersistenceAdapter Detail:
 public  void beginTransaction(ConnectionContext context) throws IOException 
 public  void checkpoint(boolean sync) throws IOException 
 public  void cleanup() 
 public  void commitTransaction(ConnectionContext context) throws IOException 
 protected JDBCAdapter createAdapter() throws IOException 
 protected  void createMessageAudit() 
 public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException 
 public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException 
 public TransactionStore createTransactionStore() throws IOException 
 protected  void databaseLockKeepAlive() 
 public  void deleteAllMessages() throws IOException 
 public JDBCAdapter getAdapter() throws IOException 
 public int getAuditRecoveryDepth() 
 public BrokerService getBrokerService() 
 public int getCleanupPeriod() 
 public DatabaseLocker getDatabaseLocker() throws IOException 
 public Set<ActiveMQDestination> getDestinations() 
 public long getLastMessageBrokerSequenceId() throws IOException 
 public long getLockAcquireSleepInterval() 
 public DataSource getLockDataSource() throws IOException 
 public long getLockKeepAlivePeriod() 
 public int getMaxAuditDepth() 
 public int getMaxProducersToAudit() 
 public long getNextSequenceId() 
 public ScheduledThreadPoolExecutor getScheduledThreadPoolExecutor() 
 public Statements getStatements() 
 public TransactionContext getTransactionContext() throws IOException 
 public TransactionContext getTransactionContext(ConnectionContext context) throws IOException 
 public WireFormat getWireFormat() 
 public  void initSequenceIdGenerator() 
 public boolean isCreateTablesOnStartup() 
 public boolean isEnableAudit() 
 public boolean isUseDatabaseLock() 
 public boolean isUseExternalMessageReferences() 
 protected DatabaseLocker loadDataBaseLocker() throws IOException 
 public static  void log(String msg,
    SQLException e) 
 public  void removeQueueMessageStore(ActiveMQQueue destination) 
    Cleanup method to remove any state associated with the given destination No state retained.... nothing to do
 public  void removeTopicMessageStore(ActiveMQTopic destination) 
    Cleanup method to remove any state associated with the given destination No state retained.... nothing to do
 public  void rollbackTransaction(ConnectionContext context) throws IOException 
 public  void setAdapter(JDBCAdapter adapter) 
 public  void setAuditRecoveryDepth(int auditRecoveryDepth) 
 public  void setBrokerName(String brokerName) 
 public  void setBrokerService(BrokerService brokerService) 
 public  void setCleanupPeriod(int cleanupPeriod) 
    Sets the number of milliseconds until the database is attempted to be cleaned up for durable topics
 public  void setCreateTablesOnStartup(boolean createTablesOnStartup) 
    Sets whether or not tables are created on startup
 public  void setDatabaseLocker(DatabaseLocker locker) throws IOException 
    Sets the database locker strategy to use to lock the database on startup
 public  void setDirectory(File dir) 
 public  void setEnableAudit(boolean enableAudit) 
 public  void setLockAcquireSleepInterval(long lockAcquireSleepInterval) 
    millisecond interval between lock acquire attempts, applied to newly created DefaultDatabaseLocker not applied if DataBaseLocker is injected.
 public  void setLockDataSource(DataSource dataSource) 
 public  void setLockKeepAlivePeriod(long lockKeepAlivePeriod) 
 public  void setMaxAuditDepth(int maxAuditDepth) 
 public  void setMaxProducersToAudit(int maxProducersToAudit) 
 public  void setScheduledThreadPoolExecutor(ScheduledThreadPoolExecutor clockDaemon) 
 public  void setStatements(Statements statements) 
 public  void setTransactionIsolation(int transactionIsolation) 
    set the Transaction isolation level to something other that TRANSACTION_READ_UNCOMMITTED This allowable dirty isolation level may not be achievable in clustered DB environments so a more restrictive and expensive option may be needed like TRANSACTION_REPEATABE_READ see isolation level constants in java.sql.Connection
 public  void setUsageManager(SystemUsage usageManager) 
 public  void setUseDatabaseLock(boolean useDatabaseLock) 
    Sets whether or not an exclusive database lock should be used to enable JDBC Master/Slave. Enabled by default.
 public  void setUseExternalMessageReferences(boolean useExternalMessageReferences) 
 public  void setWireFormat(WireFormat wireFormat) 
 public long size() 
 public  void start() throws Exception 
 public synchronized  void stop() throws Exception 
 protected  void stopBroker() 
 public String toString()