org.mule.util.queue
Class TransactionalQueueManager

java.lang.Object
  extended by org.mule.util.xa.AbstractResourceManager
      extended by org.mule.util.xa.AbstractXAResourceManager
          extended by org.mule.util.queue.TransactionalQueueManager
All Implemented Interfaces:
MuleContextAware, Startable, Stoppable, QueueManager

public class TransactionalQueueManager
extends AbstractXAResourceManager
implements QueueManager, MuleContextAware

The Transactional Queue Manager is responsible for creating and Managing transactional Queues. Queues can also be persistent by setting a persistence strategy on the manager. Default straties are provided for Memory, Jounaling, Cache and File.


Field Summary
 
Fields inherited from class org.mule.util.xa.AbstractXAResourceManager
activeContexts, suspendedContexts
 
Fields inherited from class org.mule.util.xa.AbstractResourceManager
DEFAULT_COMMIT_TIMEOUT_FACTOR, DEFAULT_TIMEOUT_MSECS, defaultTimeout, dirty, globalTransactions, logger, OPERATION_MODE_RECOVERING, OPERATION_MODE_STARTED, OPERATION_MODE_STARTING, OPERATION_MODE_STOPPED, OPERATION_MODE_STOPPING, operationMode, SHUTDOWN_MODE_KILL, SHUTDOWN_MODE_NORMAL, SHUTDOWN_MODE_ROLLBACK
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Constructor Summary
TransactionalQueueManager()
           
 
Method Summary
protected  AbstractTransactionContext createTransactionContext(Object session)
           
protected  void doBegin(AbstractTransactionContext context)
           
protected  void doCommit(AbstractTransactionContext context)
           
protected  Serializable doLoad(QueueInfo queue, Serializable id)
           
protected  int doPrepare(AbstractTransactionContext context)
           
protected  void doRemove(QueueInfo queue, Serializable id)
           
protected  void doRollback(AbstractTransactionContext context)
           
protected  void doStart()
           
protected  Serializable doStore(QueueInfo queue, Serializable object)
           
protected  void findAllListableObjectStores()
           
protected  void findAllQueueStores()
           
 MuleContext getMuleContext()
           
protected  QueueInfo getQueue(String name)
           
protected  QueueInfo getQueue(String name, QueueConfiguration config)
           
 QueueInfo getQueueInfo(String name)
           
 QueueSession getQueueSession()
           
protected  void recover()
           
 void setDefaultQueueConfiguration(QueueConfiguration config)
           
 void setMuleContext(MuleContext context)
           
 void setQueueConfiguration(String queueName, QueueConfiguration config)
           
protected  boolean shutdown(int mode, long timeoutMSecs)
           
 
Methods inherited from class org.mule.util.xa.AbstractXAResourceManager
includeBranchInXid
 
Methods inherited from class org.mule.util.xa.AbstractResourceManager
assureReady, assureStarted, beginTransaction, commitTransaction, getDefaultTransactionTimeout, prepareTransaction, rollbackTransaction, setDefaultTransactionTimeout, setDirty, setTransactionRollbackOnly, start, startTransaction, stop, stop, stop, waitForAllTxToStop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.api.lifecycle.Startable
start
 
Methods inherited from interface org.mule.api.lifecycle.Stoppable
stop
 

Constructor Detail

TransactionalQueueManager

public TransactionalQueueManager()
Method Detail

getQueueSession

public QueueSession getQueueSession()
Specified by:
getQueueSession in interface QueueManager

setDefaultQueueConfiguration

public void setDefaultQueueConfiguration(QueueConfiguration config)
Specified by:
setDefaultQueueConfiguration in interface QueueManager

setQueueConfiguration

public void setQueueConfiguration(String queueName,
                                  QueueConfiguration config)
Specified by:
setQueueConfiguration in interface QueueManager

getQueue

protected QueueInfo getQueue(String name)

getQueue

protected QueueInfo getQueue(String name,
                             QueueConfiguration config)

getQueueInfo

public QueueInfo getQueueInfo(String name)

doStart

protected void doStart()
                throws ResourceManagerSystemException
Overrides:
doStart in class AbstractResourceManager
Throws:
ResourceManagerSystemException

shutdown

protected boolean shutdown(int mode,
                           long timeoutMSecs)
Overrides:
shutdown in class AbstractResourceManager

recover

protected void recover()
                throws ResourceManagerSystemException
Overrides:
recover in class AbstractResourceManager
Throws:
ResourceManagerSystemException

createTransactionContext

protected AbstractTransactionContext createTransactionContext(Object session)
Specified by:
createTransactionContext in class AbstractResourceManager

doBegin

protected void doBegin(AbstractTransactionContext context)
Specified by:
doBegin in class AbstractResourceManager

doPrepare

protected int doPrepare(AbstractTransactionContext context)
Specified by:
doPrepare in class AbstractResourceManager

doCommit

protected void doCommit(AbstractTransactionContext context)
                 throws ResourceManagerException
Specified by:
doCommit in class AbstractResourceManager
Throws:
ResourceManagerException

doStore

protected Serializable doStore(QueueInfo queue,
                               Serializable object)
                        throws ObjectStoreException
Throws:
ObjectStoreException

doRemove

protected void doRemove(QueueInfo queue,
                        Serializable id)
                 throws ObjectStoreException
Throws:
ObjectStoreException

doLoad

protected Serializable doLoad(QueueInfo queue,
                              Serializable id)
                       throws ObjectStoreException
Throws:
ObjectStoreException

doRollback

protected void doRollback(AbstractTransactionContext context)
                   throws ResourceManagerException
Specified by:
doRollback in class AbstractResourceManager
Throws:
ResourceManagerException

findAllListableObjectStores

protected void findAllListableObjectStores()

findAllQueueStores

protected void findAllQueueStores()

setMuleContext

public void setMuleContext(MuleContext context)
Specified by:
setMuleContext in interface MuleContextAware

getMuleContext

public MuleContext getMuleContext()


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.