KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > connector > outbound > ManagedConnectionFactoryWrapperGBean


1 /**
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.geronimo.connector.outbound;
18
19 import org.apache.geronimo.connector.ResourceAdapterWrapper;
20 import org.apache.geronimo.gbean.GBeanInfo;
21 import org.apache.geronimo.gbean.GBeanInfoBuilder;
22 import org.apache.geronimo.gbean.AbstractName;
23 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
24 import org.apache.geronimo.kernel.Kernel;
25 import org.apache.geronimo.transaction.manager.ResourceManager;
26 import org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory;
27
28 /**
29  *
30  * @version $Revision: 486195 $
31  */

32 public class ManagedConnectionFactoryWrapperGBean {
33
34     public static final GBeanInfo GBEAN_INFO;
35
36     static {
37         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(ManagedConnectionFactoryWrapperGBean.class, ManagedConnectionFactoryWrapper.class, NameFactory.JCA_MANAGED_CONNECTION_FACTORY);
38
39         infoFactory.addAttribute("managedConnectionFactoryClass", String JavaDoc.class, true);
40         infoFactory.addAttribute("connectionFactoryInterface", String JavaDoc.class, true);
41         infoFactory.addAttribute("implementedInterfaces", String JavaDoc[].class, true);
42         infoFactory.addAttribute("connectionFactoryImplClass", String JavaDoc.class, true);
43         infoFactory.addAttribute("connectionInterface", String JavaDoc.class, true);
44         infoFactory.addAttribute("connectionImplClass", String JavaDoc.class, true);
45         infoFactory.addAttribute("kernel", Kernel.class, false);
46         infoFactory.addAttribute("abstractName", AbstractName.class, false);
47         infoFactory.addAttribute("objectName", String JavaDoc.class, false);
48         infoFactory.addAttribute("classLoader", ClassLoader JavaDoc.class, false);
49
50         infoFactory.addOperation("$getResource");
51         infoFactory.addOperation("$getConnectionFactory");
52         infoFactory.addOperation("$getManagedConnectionFactory");
53
54         infoFactory.addInterface(ResourceManager.class);
55         infoFactory.addInterface(JCAManagedConnectionFactory.class);
56
57         infoFactory.addReference("ResourceAdapterWrapper", ResourceAdapterWrapper.class, NameFactory.RESOURCE_ADAPTER);
58         infoFactory.addReference("ConnectionManagerContainer", ConnectionManagerContainer.class, NameFactory.JCA_CONNECTION_MANAGER);
59
60         infoFactory.setConstructor(new String JavaDoc[]{
61             "managedConnectionFactoryClass",
62             "connectionFactoryInterface",
63             "implementedInterfaces",
64             "connectionFactoryImplClass",
65             "connectionInterface",
66             "connectionImplClass",
67             "ResourceAdapterWrapper",
68             "ConnectionManagerContainer",
69             "kernel",
70             "abstractName",
71             "objectName",
72             "classLoader"});
73
74         GBEAN_INFO = infoFactory.getBeanInfo();
75     }
76
77     public static GBeanInfo getGBeanInfo() {
78         return GBEAN_INFO;
79     }
80
81 }
82
Popular Tags