001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018 package org.apache.geronimo.transaction.manager; 019 020 import java.util.ArrayList; 021 import java.util.Collection; 022 import java.util.List; 023 import javax.transaction.xa.XAException; 024 025 import org.apache.geronimo.gbean.GBeanInfo; 026 import org.apache.geronimo.gbean.GBeanInfoBuilder; 027 import org.apache.geronimo.gbean.ReferenceCollection; 028 import org.apache.geronimo.gbean.ReferenceCollectionEvent; 029 import org.apache.geronimo.gbean.ReferenceCollectionListener; 030 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory; 031 032 /** 033 * Simple implementation of a transaction manager. 034 * 035 * @version $Rev: 550546 $ $Date: 2007-06-25 12:52:11 -0400 (Mon, 25 Jun 2007) $ 036 */ 037 public class TransactionManagerImplGBean extends TransactionManagerImpl { 038 039 /** 040 * TODO NOTE!!! this should be called in an unspecified transaction context, but we cannot enforce this restriction! 041 */ 042 public TransactionManagerImplGBean(int defaultTransactionTimeoutSeconds, XidFactory xidFactory, TransactionLog transactionLog) throws XAException { 043 super(defaultTransactionTimeoutSeconds, xidFactory, transactionLog); 044 } 045 046 public static final GBeanInfo GBEAN_INFO; 047 048 static { 049 GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(TransactionManagerImplGBean.class, NameFactory.TRANSACTION_MANAGER); 050 051 infoBuilder.addAttribute("defaultTransactionTimeoutSeconds", int.class, true); 052 infoBuilder.addReference("XidFactory", XidFactory.class, NameFactory.XID_FACTORY); 053 infoBuilder.addReference("TransactionLog", TransactionLog.class, NameFactory.TRANSACTION_LOG); 054 055 infoBuilder.setConstructor(new String[]{ 056 "defaultTransactionTimeoutSeconds", 057 "XidFactory", 058 "TransactionLog"}); 059 060 GBEAN_INFO = infoBuilder.getBeanInfo(); 061 } 062 063 064 public static GBeanInfo getGBeanInfo() { 065 return GBEAN_INFO; 066 } 067 }