org.jboss.messaging.core.impl.tx
Class TransactionRepository

java.lang.Object
  extended by org.jboss.messaging.core.impl.tx.TransactionRepository
All Implemented Interfaces:
MessagingComponent

public class TransactionRepository
extends java.lang.Object
implements MessagingComponent

This class maintains JMS Server local transactions.

Version:
$Revision 1.1 $ $Id: TransactionRepository.java 3022 2007-08-21 21:07:50Z timfox $
Author:
Tim Fox, Madhu Konda, Juha Lindfors

Field Summary
protected  MessageStore messageStore
           
 
Constructor Summary
TransactionRepository(PersistenceManager persistenceManager, MessageStore store, IDManager idManager)
           
 
Method Summary
 Transaction createTransaction()
           
 Transaction createTransaction(javax.transaction.xa.Xid xid)
           
 void deleteTransaction(Transaction transaction)
           
 int getNumberOfRegisteredTransactions()
          To be used only by testcases
 java.util.List getPreparedTransactions()
           
 Transaction getPreparedTx(javax.transaction.xa.Xid xid)
           
 void injectPostOffice(PostOffice po)
           
 void loadPreparedTransactions()
           
 java.util.List recoverPreparedTransactions()
          Attempts to recover existing prepared transactions by redelivering unhandled messages and acknowledgements on the appropriate channels.
 boolean removeTransaction(javax.transaction.xa.Xid xid)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageStore

protected MessageStore messageStore
Constructor Detail

TransactionRepository

public TransactionRepository(PersistenceManager persistenceManager,
                             MessageStore store,
                             IDManager idManager)
Method Detail

injectPostOffice

public void injectPostOffice(PostOffice po)

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface MessagingComponent
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface MessagingComponent
Throws:
java.lang.Exception

recoverPreparedTransactions

public java.util.List recoverPreparedTransactions()
Attempts to recover existing prepared transactions by redelivering unhandled messages and acknowledgements on the appropriate channels.

Returns:
List of Xid instances

loadPreparedTransactions

public void loadPreparedTransactions()
                              throws java.lang.Exception
Throws:
java.lang.Exception

getPreparedTransactions

public java.util.List getPreparedTransactions()

getPreparedTx

public Transaction getPreparedTx(javax.transaction.xa.Xid xid)
                          throws java.lang.Exception
Throws:
java.lang.Exception

deleteTransaction

public void deleteTransaction(Transaction transaction)
                       throws java.lang.Exception
Throws:
java.lang.Exception

createTransaction

public Transaction createTransaction(javax.transaction.xa.Xid xid)
                              throws java.lang.Exception
Throws:
java.lang.Exception

createTransaction

public Transaction createTransaction()
                              throws java.lang.Exception
Throws:
java.lang.Exception

removeTransaction

public boolean removeTransaction(javax.transaction.xa.Xid xid)

getNumberOfRegisteredTransactions

public int getNumberOfRegisteredTransactions()
To be used only by testcases



Copyright © 2006 JBoss Inc. All Rights Reserved.