djencks 2004/06/20 00:40:15
Modified: modules/transaction/src/java/org/apache/geronimo/transaction GeronimoTransactionManager.java Log: Transaction Log is now a reference Revision Changes Path 1.2 +9 -8 incubator-geronimo/modules/transaction/src/java/org/apache/geronimo/transaction/GeronimoTransactionManager.java Index: GeronimoTransactionManager.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/transaction/src/java/org/apache/geronimo/transaction/GeronimoTransactionManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- GeronimoTransactionManager.java 11 Jun 2004 19:20:54 -0000 1.1 +++ GeronimoTransactionManager.java 20 Jun 2004 07:40:15 -0000 1.2 @@ -43,16 +43,16 @@ * */ public class GeronimoTransactionManager extends TransactionManagerProxy { - public GeronimoTransactionManager(Collection resourceManagers) { - super(getConstructorParams((ReferenceCollection)resourceManagers)); + public GeronimoTransactionManager(TransactionLog transactionLog, Collection resourceManagers) { + super(getConstructorParams(transactionLog, (ReferenceCollection)resourceManagers)); } - private static TransactionManagerProxy.ConstructorParams getConstructorParams(ReferenceCollection resourceManagers) { + private static TransactionManagerProxy.ConstructorParams getConstructorParams(TransactionLog transactionLog, ReferenceCollection resourceManagers) { TransactionManagerProxy.ConstructorParams params = new TransactionManagerProxy.ConstructorParams(); XidFactory xidFactory = new XidFactoryImpl("WHAT DO WE CALL IT?".getBytes()); - //soon we hope -// TransactionLog transactionLog = new HOWLLog(); - TransactionLog transactionLog = new UnrecoverableLog(); + if (transactionLog == null) { + transactionLog = new UnrecoverableLog(); + } TransactionManager delegate = new TransactionManagerImpl(transactionLog, xidFactory); Recovery recovery = new RecoveryImpl(transactionLog, xidFactory); params.delegate = delegate; @@ -67,6 +67,7 @@ static { GBeanInfoFactory infoFactory = new GBeanInfoFactory(GeronimoTransactionManager.class); + infoFactory.addReference("transactionLog", TransactionLog.class); infoFactory.addReference("resourceManagers", ResourceManager.class); infoFactory.addOperation("setTransactionTimeout", new Class[]{int.class}); @@ -79,7 +80,7 @@ infoFactory.addOperation("rollback"); infoFactory.addOperation("setRollbackOnly"); - infoFactory.setConstructor(new String[]{"resourceManagers"}); + infoFactory.setConstructor(new String[]{"transactionLog", "resourceManagers"}); GBEAN_INFO = infoFactory.getBeanInfo(); }