Java Doc for PersistenceManager.java in  » EJB-Server-JBoss-4.2.1 » messaging » org » jboss » mq » pm » jdbc2 » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » messaging » org.jboss.mq.pm.jdbc2 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jboss.mq.pm.jdbc2.PersistenceManager

All known Subclasses:   org.jboss.mq.kernel.JDBC2PersistenceManager,  org.jboss.mq.pm.jdbc2.OracleThinPersistenceManager,  org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager,
PersistenceManager
public class PersistenceManager extends ServiceMBeanSupport implements PersistenceManagerMBean,org.jboss.mq.pm.PersistenceManager,CacheStore(Code)
This class manages all persistence related services for JDBC based persistence.
author:
   Jayesh Parayali (jayeshpk1@yahoo.com)
author:
   Hiram Chirino (cojonudo14@hotmail.com)
author:
   Adrian Brock (adrian@jboss.com)
version:
   $Revision: 61581 $

Inner Class :protected class TransactionManagerStrategy

Field Summary
final protected static  intBINARYSTREAM_BLOB
    
final protected static  intBLOB_BLOB
    
final protected static  intBYTES_BLOB
    
protected  StringCREATE_IDX_MESSAGE_DESTINATION
    
protected  StringCREATE_IDX_MESSAGE_TXOP_TXID
    
protected  StringCREATE_MESSAGE_TABLE
    
protected  StringCREATE_TX_TABLE
    
protected  StringCREATE_TX_TABLE_XARECOVERY
    
protected  StringDELETE_ALL_TX
    
protected  StringDELETE_ALL_TX_XARECOVERY
    
protected  StringDELETE_MARKED_MESSAGES
    
protected  StringDELETE_MARKED_MESSAGES_WITH_TX
    
protected  StringDELETE_MARKED_MESSAGES_WITH_TX_XARECOVERY
    
protected  StringDELETE_MESSAGE
    
protected  StringDELETE_TEMPORARY_MESSAGES
    
protected  StringDELETE_TX
    
protected  StringINSERT_MESSAGE
    
protected  StringINSERT_TX
    
protected  StringINSERT_TX_XARECOVERY
    
protected  StringMARK_MESSAGE
    
final protected static  intOBJECT_BLOB
    
protected  StringSELECT_ALL_TX_XARECOVERY
    
protected  StringSELECT_MAX_TX
    
protected  StringSELECT_MESSAGE
    
protected  StringSELECT_MESSAGES_IN_DEST
    
protected  StringSELECT_MESSAGES_IN_DEST_XARECOVERY
    
protected  StringSELECT_MESSAGE_KEYS_IN_DEST
    
protected  StringSELECT_MESSAGE_XARECOVERY
    
protected  StringUPDATE_MARKED_MESSAGES
    
protected  StringUPDATE_MARKED_MESSAGES_WITH_TX
    
protected  StringUPDATE_MARKED_MESSAGES_XARECOVERY
    
protected  StringUPDATE_MESSAGE
    
protected  intblobType
    
protected  ObjectNameconnectionManagerName
    
protected  intconnectionRetryAttempts
    
protected  booleancreateTables
    
protected  DataSourcedatasource
    
protected  SynchronizedLongnextTransactionId
    
protected  PropertiessqlProperties
    
protected  TransactionManagertm
    
protected  TxManagertxManager
    
protected  booleanxaRecovery
    

Constructor Summary
public  PersistenceManager()
    

Method Summary
public  voidadd(MessageReference messageRef, Tx txId)
    
protected  voidadd(Connection c, String queue, SpyMessage message, Tx txId, String mark)
    
public  voidaddTXRecord(Connection c, Tx txid)
    
public  voidcloseQueue(JMSDestination jmsDest, SpyDestination dest)
    
public  voidcommitPersistentTx(Tx txId)
    
public  TxcreatePersistentTx()
    
protected synchronized  voidcreateSchema()
    
 SpyMessageextractMessage(ResultSet rs)
    
 XidextractXid(ResultSet rs, int column)
    
protected  ConnectiongetConnection()
     Gets a connection from the datasource, retrying as needed.
public  ObjectNamegetConnectionManager()
    
public  intgetConnectionRetryAttempts()
    
public  ObjectgetInstance()
    
public  ObjectNamegetMessageCache()
    
public  MessageCachegetMessageCacheInstance()
    
public  intgetRecoverMessagesChunk()
    
public  intgetRecoveryRetries()
    
public  intgetRecoveryTimeout()
    
public  StringgetSqlProperties()
    
public  intgetStatementRetries()
    
public  TxManagergetTxManager()
    
protected  voidinitializeFields()
    
public  voidinsertPersistentTx(TransactionManagerStrategy tms, Connection c, Tx tx)
    
protected synchronized  voidinternalRestoreQueue(JMSDestination jmsDest, SpyDestination dest)
    
public  booleanisXARecovery()
    
public  SpyMessageloadFromStorage(MessageReference messageRef)
    
public  voidmarkMessage(Connection c, long messageid, String destination, Tx txId, String mark)
    
public  voidremove(MessageReference messageRef, Tx txId)
    
public  voidremoveFromStorage(MessageReference messageRef)
    
public  voidremoveMarkedMessages(Connection c, Tx txid, String mark)
    
public  voidremoveTXRecord(Connection c, long txid)
    
protected synchronized  voidresolveAllUncommitedTXs()
    
public synchronized  voidrestoreQueue(JMSDestination jmsDest, SpyDestination dest)
    
public  voidrollbackPersistentTx(Tx txId)
    
public  voidsaveToStorage(MessageReference messageRef, SpyMessage message)
    
public  voidsetBlob(PreparedStatement stmt, int column, SpyMessage message)
    
public  voidsetBlob(PreparedStatement stmt, int column, Xid xid)
    
public  voidsetConnectionManager(ObjectName connectionManagerName)
    
public  voidsetConnectionRetryAttempts(int value)
    
public  voidsetMessageCache(ObjectName messageCache)
    
public  voidsetRecoverMessagesChunk(int recoverMessagesChunk)
    
public  voidsetRecoveryRetries(int retries)
    
public  voidsetRecoveryTimeout(int timeout)
    
public  voidsetSqlProperties(String value)
    
public  voidsetStatementRetries(int statementRetries)
    
public  voidsetXARecovery(boolean xaRecovery)
    
public  voidstartService()
    
public  voidupdate(MessageReference messageRef, Tx txId)
    

Field Detail
BINARYSTREAM_BLOB
final protected static int BINARYSTREAM_BLOB(Code)



BLOB_BLOB
final protected static int BLOB_BLOB(Code)



BYTES_BLOB
final protected static int BYTES_BLOB(Code)



CREATE_IDX_MESSAGE_DESTINATION
protected String CREATE_IDX_MESSAGE_DESTINATION(Code)



CREATE_IDX_MESSAGE_TXOP_TXID
protected String CREATE_IDX_MESSAGE_TXOP_TXID(Code)



CREATE_MESSAGE_TABLE
protected String CREATE_MESSAGE_TABLE(Code)



CREATE_TX_TABLE
protected String CREATE_TX_TABLE(Code)



CREATE_TX_TABLE_XARECOVERY
protected String CREATE_TX_TABLE_XARECOVERY(Code)



DELETE_ALL_TX
protected String DELETE_ALL_TX(Code)



DELETE_ALL_TX_XARECOVERY
protected String DELETE_ALL_TX_XARECOVERY(Code)



DELETE_MARKED_MESSAGES
protected String DELETE_MARKED_MESSAGES(Code)



DELETE_MARKED_MESSAGES_WITH_TX
protected String DELETE_MARKED_MESSAGES_WITH_TX(Code)



DELETE_MARKED_MESSAGES_WITH_TX_XARECOVERY
protected String DELETE_MARKED_MESSAGES_WITH_TX_XARECOVERY(Code)



DELETE_MESSAGE
protected String DELETE_MESSAGE(Code)



DELETE_TEMPORARY_MESSAGES
protected String DELETE_TEMPORARY_MESSAGES(Code)



DELETE_TX
protected String DELETE_TX(Code)



INSERT_MESSAGE
protected String INSERT_MESSAGE(Code)



INSERT_TX
protected String INSERT_TX(Code)



INSERT_TX_XARECOVERY
protected String INSERT_TX_XARECOVERY(Code)



MARK_MESSAGE
protected String MARK_MESSAGE(Code)



OBJECT_BLOB
final protected static int OBJECT_BLOB(Code)



SELECT_ALL_TX_XARECOVERY
protected String SELECT_ALL_TX_XARECOVERY(Code)



SELECT_MAX_TX
protected String SELECT_MAX_TX(Code)



SELECT_MESSAGE
protected String SELECT_MESSAGE(Code)



SELECT_MESSAGES_IN_DEST
protected String SELECT_MESSAGES_IN_DEST(Code)



SELECT_MESSAGES_IN_DEST_XARECOVERY
protected String SELECT_MESSAGES_IN_DEST_XARECOVERY(Code)



SELECT_MESSAGE_KEYS_IN_DEST
protected String SELECT_MESSAGE_KEYS_IN_DEST(Code)



SELECT_MESSAGE_XARECOVERY
protected String SELECT_MESSAGE_XARECOVERY(Code)



UPDATE_MARKED_MESSAGES
protected String UPDATE_MARKED_MESSAGES(Code)



UPDATE_MARKED_MESSAGES_WITH_TX
protected String UPDATE_MARKED_MESSAGES_WITH_TX(Code)



UPDATE_MARKED_MESSAGES_XARECOVERY
protected String UPDATE_MARKED_MESSAGES_XARECOVERY(Code)



UPDATE_MESSAGE
protected String UPDATE_MESSAGE(Code)



blobType
protected int blobType(Code)



connectionManagerName
protected ObjectName connectionManagerName(Code)
The object name of the DataSource



connectionRetryAttempts
protected int connectionRetryAttempts(Code)



createTables
protected boolean createTables(Code)



datasource
protected DataSource datasource(Code)
The DataSource



nextTransactionId
protected SynchronizedLong nextTransactionId(Code)
The next transaction id



sqlProperties
protected Properties sqlProperties(Code)
The SQL properties



tm
protected TransactionManager tm(Code)
The JBossMQ transaction mananger



txManager
protected TxManager txManager(Code)
The jta transaction manager



xaRecovery
protected boolean xaRecovery(Code)




Constructor Detail
PersistenceManager
public PersistenceManager() throws javax.jms.JMSException(Code)




Method Detail
add
public void add(MessageReference messageRef, Tx txId) throws javax.jms.JMSException(Code)



add
protected void add(Connection c, String queue, SpyMessage message, Tx txId, String mark) throws SQLException, IOException(Code)



addTXRecord
public void addTXRecord(Connection c, Tx txid) throws SQLException, IOException(Code)



closeQueue
public void closeQueue(JMSDestination jmsDest, SpyDestination dest) throws JMSException(Code)



commitPersistentTx
public void commitPersistentTx(Tx txId) throws javax.jms.JMSException(Code)



createPersistentTx
public Tx createPersistentTx() throws JMSException(Code)



createSchema
protected synchronized void createSchema() throws JMSException(Code)



extractMessage
SpyMessage extractMessage(ResultSet rs) throws SQLException, IOException(Code)



extractXid
Xid extractXid(ResultSet rs, int column) throws SQLException, IOException, ClassNotFoundException(Code)



getConnection
protected Connection getConnection() throws SQLException(Code)
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 the connection
exception:
  SQLException - if an error occurs.



getConnectionManager
public ObjectName getConnectionManager()(Code)



getConnectionRetryAttempts
public int getConnectionRetryAttempts()(Code)



getInstance
public Object getInstance()(Code)



getMessageCache
public ObjectName getMessageCache()(Code)



getMessageCacheInstance
public MessageCache getMessageCacheInstance()(Code)



getRecoverMessagesChunk
public int getRecoverMessagesChunk()(Code)



getRecoveryRetries
public int getRecoveryRetries()(Code)



getRecoveryTimeout
public int getRecoveryTimeout()(Code)



getSqlProperties
public String getSqlProperties()(Code)



getStatementRetries
public int getStatementRetries()(Code)



getTxManager
public TxManager getTxManager()(Code)



initializeFields
protected void initializeFields() throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException, NamingException(Code)



insertPersistentTx
public void insertPersistentTx(TransactionManagerStrategy tms, Connection c, Tx tx) throws JMSException(Code)



internalRestoreQueue
protected synchronized void internalRestoreQueue(JMSDestination jmsDest, SpyDestination dest) throws JMSException(Code)



isXARecovery
public boolean isXARecovery()(Code)



loadFromStorage
public SpyMessage loadFromStorage(MessageReference messageRef) throws JMSException(Code)



markMessage
public void markMessage(Connection c, long messageid, String destination, Tx txId, String mark) throws SQLException(Code)



remove
public void remove(MessageReference messageRef, Tx txId) throws javax.jms.JMSException(Code)



removeFromStorage
public void removeFromStorage(MessageReference messageRef) throws JMSException(Code)



removeMarkedMessages
public void removeMarkedMessages(Connection c, Tx txid, String mark) throws SQLException(Code)



removeTXRecord
public void removeTXRecord(Connection c, long txid) throws SQLException(Code)



resolveAllUncommitedTXs
protected synchronized void resolveAllUncommitedTXs() throws JMSException(Code)



restoreQueue
public synchronized void restoreQueue(JMSDestination jmsDest, SpyDestination dest) throws JMSException(Code)



rollbackPersistentTx
public void rollbackPersistentTx(Tx txId) throws JMSException(Code)



saveToStorage
public void saveToStorage(MessageReference messageRef, SpyMessage message) throws JMSException(Code)



setBlob
public void setBlob(PreparedStatement stmt, int column, SpyMessage message) throws IOException, SQLException(Code)



setBlob
public void setBlob(PreparedStatement stmt, int column, Xid xid) throws IOException, SQLException(Code)



setConnectionManager
public void setConnectionManager(ObjectName connectionManagerName)(Code)



setConnectionRetryAttempts
public void setConnectionRetryAttempts(int value)(Code)



setMessageCache
public void setMessageCache(ObjectName messageCache)(Code)



setRecoverMessagesChunk
public void setRecoverMessagesChunk(int recoverMessagesChunk)(Code)



setRecoveryRetries
public void setRecoveryRetries(int retries)(Code)



setRecoveryTimeout
public void setRecoveryTimeout(int timeout)(Code)



setSqlProperties
public void setSqlProperties(String value)(Code)



setStatementRetries
public void setStatementRetries(int statementRetries)(Code)



setXARecovery
public void setXARecovery(boolean xaRecovery)(Code)



startService
public void startService() throws Exception(Code)



update
public void update(MessageReference messageRef, Tx txId) throws javax.jms.JMSException(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.