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.connector.work;
019    
020    import java.util.concurrent.Executor;
021    
022    import org.apache.geronimo.gbean.GBeanInfo;
023    import org.apache.geronimo.gbean.GBeanInfoBuilder;
024    import org.apache.geronimo.gbean.GBeanLifecycle;
025    import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
026    import org.apache.geronimo.transaction.manager.XAWork;
027    
028    /**
029     * 
030     * @version $Revision: 706640 $
031     */
032    public class GeronimoWorkManagerGBean extends GeronimoWorkManager implements GBeanLifecycle {
033    
034        public GeronimoWorkManagerGBean() {
035        }
036    
037        public GeronimoWorkManagerGBean(Executor sync, Executor start, Executor sched, XAWork xaWork) {
038            super(sync, start, sched, xaWork);
039        }
040    
041        public static final GBeanInfo GBEAN_INFO;
042    
043        static {
044            GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(GeronimoWorkManagerGBean.class, NameFactory.JCA_WORK_MANAGER);
045            infoFactory.addInterface(GeronimoWorkManager.class);
046    
047            infoFactory.addReference("SyncPool", Executor.class, NameFactory.GERONIMO_SERVICE);
048            infoFactory.addReference("StartPool", Executor.class, NameFactory.GERONIMO_SERVICE);
049            infoFactory.addReference("ScheduledPool", Executor.class, NameFactory.GERONIMO_SERVICE);
050    
051            infoFactory.addReference("TransactionManager", XAWork.class, NameFactory.JTA_RESOURCE);
052    
053            infoFactory.setConstructor(new String[]{
054                "SyncPool",
055                "StartPool",
056                "ScheduledPool",
057                "TransactionManager"});
058    
059            GBEAN_INFO = infoFactory.getBeanInfo();
060        }
061    
062        public static GBeanInfo getGBeanInfo() {
063            return GBEAN_INFO;
064        }
065    
066    
067    
068    }