| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sandesha2.storage.StorageManager
org.apache.sandesha2.storage.jdbc.PersistentStorageManager
public class PersistentStorageManager
A Storage Manager implementation for managing Sandesha2 beans.
Needs this parameter in module.xml or axis2.xml : db.driver JDBC Driver class name db.connectionstring JDBC connection string db.user Data Base user name db.password Data Base user password Transactions are supposed to be attached to a thread (see inMemoryStorageManager) hence the ThreadLocal threadTransaction variable (instead of the transactions HashMap used by inMemoryStorageManager). MessageContexts are stored in a HashMap, as in inMemoryStorageManager, AND in DataBase as backup in case of failure.
| Constructor Summary | |
|---|---|
| PersistentStorageManager(org.apache.axis2.context.ConfigurationContext context) | |
| Method Summary | |
|---|---|
|  void | acquireTransactionLock() | 
|  java.sql.Connection | dbConnect() | 
|  java.sql.Connection | getDbConnection()Returns the connection attached to the current transaction if exists or the "common" connection. | 
|  SandeshaThread | getInvoker()Get the invoker that hands inbound messages over to the application. | 
|  InvokerBeanMgr | getInvokerBeanMgr() | 
|  PollingManager | getPollingManager()Get the thread that generates polling requests to send to remote endpoints. | 
|  RMDBeanMgr | getRMDBeanMgr() | 
|  RMSBeanMgr | getRMSBeanMgr() | 
|  SandeshaThread | getSender() | 
|  SenderBeanMgr | getSenderBeanMgr() | 
|  Transaction | getTransaction() | 
|  boolean | hasUserTransaction(org.apache.axis2.context.MessageContext msg)If there is no user transaction in scope then we can optimize the sending / invoking of a message. | 
|  void | initStorage(org.apache.axis2.description.AxisModule moduleDesc) | 
|  void | releaseTransactionLock() | 
|  void | removeMessageContext(java.lang.String key) | 
|  void | removeTransaction() | 
|  boolean | requiresMessageSerialization() | 
|  org.apache.axis2.context.MessageContext | retrieveMessageContext(java.lang.String key,
                       org.apache.axis2.context.ConfigurationContext configContext) | 
|  void | shutdown() | 
|  void | storeMessageContext(java.lang.String key,
                    org.apache.axis2.context.MessageContext msgContext) | 
|  void | updateMessageContext(java.lang.String key,
                     org.apache.axis2.context.MessageContext msgContext) | 
| Methods inherited from class org.apache.sandesha2.storage.StorageManager | 
|---|
| getContext, setContext | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public PersistentStorageManager(org.apache.axis2.context.ConfigurationContext context)
                         throws SandeshaException
SandeshaException| Method Detail | 
|---|
public SandeshaThread getInvoker()
StorageManager
getInvoker in class StorageManagerpublic PollingManager getPollingManager()
StorageManager
getPollingManager in class StorageManagerpublic SandeshaThread getSender()
getSender in class StorageManagerpublic void shutdown()
shutdown in class StorageManagerpublic InvokerBeanMgr getInvokerBeanMgr()
getInvokerBeanMgr in class StorageManagerpublic RMDBeanMgr getRMDBeanMgr()
getRMDBeanMgr in class StorageManagerpublic RMSBeanMgr getRMSBeanMgr()
getRMSBeanMgr in class StorageManagerpublic SenderBeanMgr getSenderBeanMgr()
getSenderBeanMgr in class StorageManagerpublic boolean requiresMessageSerialization()
requiresMessageSerialization in class StorageManagerpublic boolean hasUserTransaction(org.apache.axis2.context.MessageContext msg)
StorageManager
hasUserTransaction in class StorageManagerpublic Transaction getTransaction()
getTransaction in class StorageManagerpublic void removeTransaction()
public java.sql.Connection getDbConnection()
public void initStorage(org.apache.axis2.description.AxisModule moduleDesc)
                 throws SandeshaStorageException
initStorage in class StorageManagerSandeshaStorageException
public java.sql.Connection dbConnect()
                              throws SandeshaStorageException
SandeshaStorageException
public org.apache.axis2.context.MessageContext retrieveMessageContext(java.lang.String key,
                                                                      org.apache.axis2.context.ConfigurationContext configContext)
                                                               throws SandeshaStorageException
retrieveMessageContext in class StorageManagerSandeshaStorageException
public void storeMessageContext(java.lang.String key,
                                org.apache.axis2.context.MessageContext msgContext)
                         throws SandeshaStorageException
storeMessageContext in class StorageManagerSandeshaStorageException
public void updateMessageContext(java.lang.String key,
                                 org.apache.axis2.context.MessageContext msgContext)
                          throws SandeshaStorageException
updateMessageContext in class StorageManagerSandeshaStorageException
public void removeMessageContext(java.lang.String key)
                          throws SandeshaStorageException
removeMessageContext in class StorageManagerSandeshaStorageExceptionpublic void acquireTransactionLock()
public void releaseTransactionLock()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||