1 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 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 .class, true); 40 infoFactory.addAttribute("connectionFactoryInterface", String .class, true); 41 infoFactory.addAttribute("implementedInterfaces", String [].class, true); 42 infoFactory.addAttribute("connectionFactoryImplClass", String .class, true); 43 infoFactory.addAttribute("connectionInterface", String .class, true); 44 infoFactory.addAttribute("connectionImplClass", String .class, true); 45 infoFactory.addAttribute("kernel", Kernel.class, false); 46 infoFactory.addAttribute("abstractName", AbstractName.class, false); 47 infoFactory.addAttribute("objectName", String .class, false); 48 infoFactory.addAttribute("classLoader", ClassLoader .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 []{ 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 |