Save This Page
Home » JBoss-5.1.0 » org » jboss » mq » pm » jdbc2 » [javadoc | source]
org.jboss.mq.pm.jdbc2
public class: PersistenceManager [javadoc | source]
java.lang.Object
   org.jboss.mx.util.JBossNotificationBroadcasterSupport
      org.jboss.system.ServiceMBeanSupport
         org.jboss.mq.pm.jdbc2.PersistenceManager

All Implemented Interfaces:
    PersistenceManagerExt, PersistenceManagerMBean, PersistenceManager, CacheStore, KernelControllerContextAware, ServiceMBean, MBeanRegistration, NotificationEmitter

Direct Known Subclasses:
    OracleThinPersistenceManager, JDBC2PersistenceManager, MSSQLPersistenceManager

This class manages all persistence related services for JDBC based persistence.
Nested Class Summary:
protected class  PersistenceManager.TransactionManagerStrategy  This inner class helps handle the tx management of the jdbc connections. 
Field Summary
protected  SynchronizedLong nextTransactionId    The next transaction id 
protected  TxManager txManager    The jta transaction manager 
protected  DataSource datasource    The DataSource 
protected  TransactionManager tm    The JBossMQ transaction mananger 
protected  String UPDATE_MARKED_MESSAGES     
protected  String UPDATE_MARKED_MESSAGES_XARECOVERY     
protected  String UPDATE_MARKED_MESSAGES_WITH_TX     
protected  String DELETE_MARKED_MESSAGES_WITH_TX     
protected  String DELETE_MARKED_MESSAGES_WITH_TX_XARECOVERY     
protected  String DELETE_TX     
protected  String DELETE_MARKED_MESSAGES     
protected  String DELETE_TEMPORARY_MESSAGES     
protected  String INSERT_TX     
protected  String INSERT_TX_XARECOVERY     
protected  String DELETE_ALL_TX     
protected  String DELETE_ALL_TX_XARECOVERY     
protected  String SELECT_MAX_TX     
protected  String SELECT_ALL_TX_XARECOVERY     
protected  String SELECT_MESSAGES_IN_DEST     
protected  String SELECT_MESSAGES_IN_DEST_XARECOVERY     
protected  String SELECT_MESSAGE_KEYS_IN_DEST     
protected  String SELECT_MESSAGE     
protected  String SELECT_MESSAGE_XARECOVERY     
protected  String INSERT_MESSAGE     
protected  String MARK_MESSAGE     
protected  String DELETE_MESSAGE     
protected  String UPDATE_MESSAGE     
protected  String CREATE_MESSAGE_TABLE     
protected  String CREATE_IDX_MESSAGE_TXOP_TXID     
protected  String CREATE_IDX_MESSAGE_DESTINATION     
protected  String CREATE_TX_TABLE     
protected  String CREATE_TX_TABLE_XARECOVERY     
protected static final  int OBJECT_BLOB     
protected static final  int BYTES_BLOB     
protected static final  int BINARYSTREAM_BLOB     
protected static final  int BLOB_BLOB     
protected  int blobType     
protected  boolean createTables     
protected  int connectionRetryAttempts     
protected  boolean xaRecovery     
protected  ObjectName connectionManagerName    The object name of the DataSource 
protected  Properties sqlProperties    The SQL properties 
Fields inherited from org.jboss.system.ServiceMBeanSupport:
SERVICE_CONTROLLER_SIG,  log,  server,  serviceName
Constructor:
 public PersistenceManager() throws JMSException 
Method from org.jboss.mq.pm.jdbc2.PersistenceManager Summary:
add,   add,   addTXRecord,   closeQueue,   commitPersistentTx,   createPersistentTx,   createSchema,   extractMessage,   extractXid,   forcePersistentTx,   getConnection,   getConnectionManager,   getConnectionRetryAttempts,   getInstance,   getMessageCache,   getMessageCacheInstance,   getRecoverMessagesChunk,   getRecoveryRetries,   getRecoveryTimeout,   getSqlProperties,   getStatementRetries,   getTxManager,   initializeFields,   insertPersistentTx,   internalRestoreQueue,   isXARecovery,   loadFromStorage,   markMessage,   remove,   removeFromStorage,   removeMarkedMessages,   removeTXRecord,   resolveAllUncommitedTXs,   restoreQueue,   rollbackPersistentTx,   saveToStorage,   setBlob,   setBlob,   setConnectionManager,   setConnectionRetryAttempts,   setMessageCache,   setRecoverMessagesChunk,   setRecoveryRetries,   setRecoveryTimeout,   setSqlProperties,   setStatementRetries,   setXARecovery,   startService,   update
Methods from org.jboss.system.ServiceMBeanSupport:
create,   createService,   destroy,   destroyService,   getDeploymentInfo,   getLog,   getName,   getNextNotificationSequenceNumber,   getObjectName,   getServer,   getServiceName,   getState,   getStateString,   jbossInternalCreate,   jbossInternalDescription,   jbossInternalDestroy,   jbossInternalLifecycle,   jbossInternalStart,   jbossInternalStop,   pojoChange,   pojoCreate,   pojoDestroy,   pojoStart,   pojoStop,   postDeregister,   postRegister,   preDeregister,   preRegister,   setKernelControllerContext,   start,   startService,   stop,   stopService,   unsetKernelControllerContext
Methods from org.jboss.mx.util.JBossNotificationBroadcasterSupport:
addNotificationListener,   getNotificationInfo,   handleNotification,   nextNotificationSequenceNumber,   removeNotificationListener,   removeNotificationListener,   sendNotification
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.mq.pm.jdbc2.PersistenceManager Detail:
 public  void add(MessageReference messageRef,
    Tx txId) throws JMSException 
 protected  void add(Connection c,
    String queue,
    SpyMessage message,
    Tx txId,
    String mark) throws SQLException, IOException 
 public  void addTXRecord(Connection c,
    Tx txid) throws SQLException, IOException 
 public  void closeQueue(JMSDestination jmsDest,
    SpyDestination dest) throws JMSException 
 public  void commitPersistentTx(Tx txId) throws JMSException 
 public Tx createPersistentTx() throws JMSException 
 protected synchronized  void createSchema() throws JMSException 
 SpyMessage extractMessage(ResultSet rs) throws SQLException, IOException 
 Xid extractXid(ResultSet rs,
    int column) throws SQLException, IOException, ClassNotFoundException 
 public  void forcePersistentTx(Tx txId) throws JMSException 
 protected Connection getConnection() throws SQLException 
    Gets a connection from the datasource, retrying as needed. This was implemented because in some minimal configurations (i.e. little logging and few services) the database wasn't ready when we tried to get a connection. We, therefore, implement a retry loop wich is controled by the ConnectionRetryAttempts attribute. Submitted by terry@amicas.com
 public ObjectName getConnectionManager() 
 public int getConnectionRetryAttempts() 
 public Object getInstance() 
 public ObjectName getMessageCache() 
 public MessageCache getMessageCacheInstance() 
 public int getRecoverMessagesChunk() 
 public int getRecoveryRetries() 
 public int getRecoveryTimeout() 
 public String getSqlProperties() 
 public int getStatementRetries() 
 public TxManager getTxManager() 
 protected  void initializeFields() throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException, NamingException 
 public  void insertPersistentTx(TransactionManagerStrategy tms,
    Connection c,
    Tx tx) throws JMSException 
 protected synchronized  void internalRestoreQueue(JMSDestination jmsDest,
    SpyDestination dest) throws JMSException 
 public boolean isXARecovery() 
 public SpyMessage loadFromStorage(MessageReference messageRef) throws JMSException 
 public  void markMessage(Connection c,
    long messageid,
    String destination,
    Tx txId,
    String mark) throws SQLException 
 public  void remove(MessageReference messageRef,
    Tx txId) throws JMSException 
 public  void removeFromStorage(MessageReference messageRef) throws JMSException 
 public  void removeMarkedMessages(Connection c,
    Tx txid,
    String mark) throws SQLException 
 public  void removeTXRecord(Connection c,
    long txid) throws SQLException 
 protected synchronized  void resolveAllUncommitedTXs() throws JMSException 
 public synchronized  void restoreQueue(JMSDestination jmsDest,
    SpyDestination dest) throws JMSException 
 public  void rollbackPersistentTx(Tx txId) throws JMSException 
 public  void saveToStorage(MessageReference messageRef,
    SpyMessage message) throws JMSException 
 public  void setBlob(PreparedStatement stmt,
    int column,
    SpyMessage message) throws IOException, SQLException 
 public  void setBlob(PreparedStatement stmt,
    int column,
    Xid xid) throws IOException, SQLException 
 public  void setConnectionManager(ObjectName connectionManagerName) 
 public  void setConnectionRetryAttempts(int value) 
 public  void setMessageCache(ObjectName messageCache) 
 public  void setRecoverMessagesChunk(int recoverMessagesChunk) 
 public  void setRecoveryRetries(int retries) 
 public  void setRecoveryTimeout(int timeout) 
 public  void setSqlProperties(String value) 
 public  void setStatementRetries(int statementRetries) 
 public  void setXARecovery(boolean xaRecovery) 
 public  void startService() throws Exception 
 public  void update(MessageReference messageRef,
    Tx txId) throws JMSException