|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.activemq.store.jdbc.JDBCPersistenceAdapter
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.
| Constructor Summary | |
JDBCPersistenceAdapter()
|
|
JDBCPersistenceAdapter(javax.sql.DataSource ds,
WireFormat wireFormat)
|
|
| Method Summary | |
void |
beginTransaction()
This method starts a transaction on the persistent storage - which is nothing to do with JMS or XA transactions - its purely a mechanism to perform multiple writes to a persistent store in 1 transaction as a performance optimisation. |
void |
cleanup()
|
void |
commitTransaction()
Commit a persistence transaction |
MessageStore |
createQueueMessageStore(java.lang.String destinationName)
Factory method to create a new queue message store with the given destination name |
TopicMessageStore |
createTopicMessageStore(java.lang.String destinationName)
Factory method to create a new topic message store with the given destination name |
TransactionStore |
createTransactionStore()
Factory method to create a new persistent prepared transaction store for XA recovery |
java.lang.String |
getAdapterClass()
|
int |
getCleanupPeriod()
|
EDU.oswego.cs.dl.util.concurrent.ClockDaemon |
getClockDaemon()
|
java.sql.Connection |
getConnection()
|
javax.sql.DataSource |
getDataSource()
|
boolean |
getDropTablesOnStartup()
|
java.util.Map |
getInitialDestinations()
Returns a map, indexed by String name, of all the Destination
objects active on startup. |
WireFormat |
getWireFormat()
|
void |
returnConnection(java.sql.Connection connection)
|
void |
rollbackTransaction()
Rollback a persistence transaction |
void |
setAdapterClass(java.lang.String adapterClass)
|
void |
setCleanupPeriod(int cleanupPeriod)
|
void |
setClockDaemon(EDU.oswego.cs.dl.util.concurrent.ClockDaemon clockDaemon)
|
void |
setDataSource(javax.sql.DataSource dataSource)
|
void |
setDropTablesOnStartup(boolean dropTablesOnStartup)
|
void |
setWireFormat(WireFormat wireFormat)
|
void |
start()
Called to start the service |
void |
stop()
Called to shutdown the service |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JDBCPersistenceAdapter()
public JDBCPersistenceAdapter(javax.sql.DataSource ds,
WireFormat wireFormat)
| Method Detail |
public java.util.Map getInitialDestinations()
PersistenceAdapterDestination
objects active on startup.
getInitialDestinations in interface PersistenceAdapter
public MessageStore createQueueMessageStore(java.lang.String destinationName)
throws javax.jms.JMSException
PersistenceAdapter
createQueueMessageStore in interface PersistenceAdapterjavax.jms.JMSException
public TopicMessageStore createTopicMessageStore(java.lang.String destinationName)
throws javax.jms.JMSException
PersistenceAdapter
createTopicMessageStore in interface PersistenceAdapterjavax.jms.JMSException
public TransactionStore createTransactionStore()
throws javax.jms.JMSException
PersistenceAdapter
createTransactionStore in interface PersistenceAdapterjavax.jms.JMSException
public void beginTransaction()
throws javax.jms.JMSException
PersistenceAdapter
beginTransaction in interface PersistenceAdapterjavax.jms.JMSException
public void commitTransaction()
throws javax.jms.JMSException
PersistenceAdapter
commitTransaction in interface PersistenceAdapterjavax.jms.JMSExceptionPersistenceAdapter.beginTransaction()public void rollbackTransaction()
PersistenceAdapter
rollbackTransaction in interface PersistenceAdapterPersistenceAdapter.beginTransaction()
public void start()
throws javax.jms.JMSException
Service
start in interface Servicejavax.jms.JMSExceptionpublic void cleanup()
public void setClockDaemon(EDU.oswego.cs.dl.util.concurrent.ClockDaemon clockDaemon)
public EDU.oswego.cs.dl.util.concurrent.ClockDaemon getClockDaemon()
public void stop()
throws javax.jms.JMSException
Service
stop in interface Servicejavax.jms.JMSExceptionpublic javax.sql.DataSource getDataSource()
public void setDataSource(javax.sql.DataSource dataSource)
public WireFormat getWireFormat()
public void setWireFormat(WireFormat wireFormat)
public java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void returnConnection(java.sql.Connection connection)
public java.lang.String getAdapterClass()
public void setAdapterClass(java.lang.String adapterClass)
adapterClass - The adapterClass to set.public boolean getDropTablesOnStartup()
public void setDropTablesOnStartup(boolean dropTablesOnStartup)
dropTablesOnStartup - The dropTablesOnStartup to set.public int getCleanupPeriod()
public void setCleanupPeriod(int cleanupPeriod)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||