01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: */package org.apache.geronimo.connector.outbound;
17:
18: import org.apache.geronimo.connector.ResourceAdapterWrapper;
19: import org.apache.geronimo.gbean.AbstractName;
20: import org.apache.geronimo.gbean.GBeanInfo;
21: import org.apache.geronimo.gbean.GBeanInfoBuilder;
22: import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
23: import org.apache.geronimo.kernel.Kernel;
24:
25: /**
26: *
27: * @version $Revision: 550546 $
28: */
29: public class ManagedConnectionFactoryWrapperGBean {
30:
31: public static final GBeanInfo GBEAN_INFO;
32:
33: static {
34: GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(
35: ManagedConnectionFactoryWrapperGBean.class,
36: ManagedConnectionFactoryWrapper.class,
37: NameFactory.JCA_MANAGED_CONNECTION_FACTORY);
38:
39: infoFactory.addAttribute("managedConnectionFactoryClass",
40: String.class, true);
41: infoFactory.addAttribute("connectionFactoryInterface",
42: String.class, true);
43: infoFactory.addAttribute("implementedInterfaces",
44: String[].class, true);
45: infoFactory.addAttribute("connectionFactoryImplClass",
46: String.class, true);
47: infoFactory.addAttribute("connectionInterface", String.class,
48: true);
49: infoFactory.addAttribute("connectionImplClass", String.class,
50: true);
51: infoFactory.addAttribute("kernel", Kernel.class, false);
52: infoFactory.addAttribute("abstractName", AbstractName.class,
53: false);
54: infoFactory.addAttribute("objectName", String.class, false);
55: infoFactory.addAttribute("classLoader", ClassLoader.class,
56: false);
57:
58: infoFactory.addOperation("$getResource");
59: infoFactory.addOperation("$getConnectionFactory");
60: infoFactory.addOperation("$getManagedConnectionFactory");
61:
62: infoFactory.addReference("ResourceAdapterWrapper",
63: ResourceAdapterWrapper.class,
64: NameFactory.RESOURCE_ADAPTER);
65: infoFactory.addReference("ConnectionManagerContainer",
66: ConnectionManagerContainer.class,
67: NameFactory.JCA_CONNECTION_MANAGER);
68:
69: infoFactory.setConstructor(new String[] {
70: "managedConnectionFactoryClass",
71: "connectionFactoryInterface", "implementedInterfaces",
72: "connectionFactoryImplClass", "connectionInterface",
73: "connectionImplClass", "ResourceAdapterWrapper",
74: "ConnectionManagerContainer", "kernel", "abstractName",
75: "objectName", "classLoader" });
76:
77: GBEAN_INFO = infoFactory.getBeanInfo();
78: }
79:
80: public static GBeanInfo getGBeanInfo() {
81: return GBEAN_INFO;
82: }
83:
84: }
|