public static GBeanInfoBuilder createStatic(Class sourceClass, String name, Class gbeanType, GBeanInfo source, String j2eeType) { if (sourceClass == null) throw new NullPointerException("sourceClass is null"); if (name == null) throw new NullPointerException("name is null"); if (gbeanType == null) throw new NullPointerException("gbeanType is null"); return new GBeanInfoBuilder(sourceClass.getName(), name, gbeanType, source, j2eeType); }
private Map getAdminObjectInfoMap(AdminobjectType[] adminobjectArray, ClassLoader cl) throws DeploymentException { Map<String, GBeanData> adminObjectInfos = new HashMap<String, GBeanData>(); for (AdminobjectType adminObject : adminobjectArray) { GBeanInfoBuilder adminObjectInfoBuilder = new GBeanInfoBuilder(AdminObjectWrapper.class, AdminObjectWrapperGBean.GBEAN_INFO); String adminObjectClassName = adminObject.getAdminobjectClass().getStringValue().trim(); GBeanData adminObjectGBeanData = setUpDynamicGBeanWithProperties(adminObjectClassName, adminObjectInfoBuilder, adminObject.getConfigPropertyArray(), cl, Collections.<String>emptySet()); // set the standard properties String adminObjectInterface = adminObject.getAdminobjectInterface().getStringValue().trim(); adminObjectGBeanData.setAttribute("adminObjectInterface", adminObjectInterface); adminObjectGBeanData.setAttribute("adminObjectClass", adminObjectClassName); adminObjectInfos.put(adminObjectInterface, adminObjectGBeanData); } return adminObjectInfos; }
private Map getActivationSpecInfoMap(MessagelistenerType[] messagelistenerArray, ClassLoader cl) throws DeploymentException { Map<String, GBeanData> activationSpecInfos = new HashMap<String, GBeanData>(); for (MessagelistenerType messagelistenerType : messagelistenerArray) { String messageListenerInterface = messagelistenerType.getMessagelistenerType().getStringValue().trim(); ActivationspecType activationspec = messagelistenerType.getActivationspec(); String activationSpecClassName = activationspec.getActivationspecClass().getStringValue().trim(); GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(ActivationSpecWrapperGBean.class, ActivationSpecWrapperGBean.GBEAN_INFO); Set<String> ignore = Collections.singleton("resourceAdapter"); setUpDynamicGBean(activationSpecClassName, infoBuilder, ignore, cl, true); GBeanInfo gbeanInfo = infoBuilder.getBeanInfo(); GBeanData activationSpecInfo = new GBeanData(gbeanInfo); activationSpecInfo.setAttribute("activationSpecClass", activationSpecClassName); activationSpecInfos.put(messageListenerInterface, activationSpecInfo); } return activationSpecInfos; }
private Map getManagedConnectionFactoryInfoMap(ConnectionDefinitionType[] connectionDefinitionArray, ClassLoader cl) throws DeploymentException { Map<String, GBeanData> managedConnectionFactoryInfos = new HashMap<String, GBeanData>(); for (ConnectionDefinitionType connectionDefinition : connectionDefinitionArray) { GBeanInfoBuilder managedConnectionFactoryInfoBuilder = new GBeanInfoBuilder(ManagedConnectionFactoryWrapper.class, ManagedConnectionFactoryWrapperGBean.GBEAN_INFO); String managedConnectionfactoryClassName = connectionDefinition.getManagedconnectionfactoryClass().getStringValue().trim(); Set<String> ignore = new HashSet<String>(); ignore.add("ResourceAdapter"); ignore.add("LogWriter"); GBeanData managedConnectionFactoryGBeanData = setUpDynamicGBeanWithProperties(managedConnectionfactoryClassName, managedConnectionFactoryInfoBuilder, connectionDefinition.getConfigPropertyArray(), cl, ignore); // set the standard properties String connectionfactoryInterface = connectionDefinition.getConnectionfactoryInterface().getStringValue().trim(); managedConnectionFactoryGBeanData.setAttribute("managedConnectionFactoryClass", managedConnectionfactoryClassName); managedConnectionFactoryGBeanData.setAttribute("connectionFactoryInterface", connectionfactoryInterface); managedConnectionFactoryGBeanData.setAttribute("connectionFactoryImplClass", connectionDefinition.getConnectionfactoryImplClass().getStringValue().trim()); managedConnectionFactoryGBeanData.setAttribute("connectionInterface", connectionDefinition.getConnectionInterface().getStringValue().trim()); managedConnectionFactoryGBeanData.setAttribute("connectionImplClass", connectionDefinition.getConnectionImplClass().getStringValue().trim()); managedConnectionFactoryInfos.put(connectionfactoryInterface, managedConnectionFactoryGBeanData); } return managedConnectionFactoryInfos; }
private Map getAdminObjectInfoMap(AbstractName validatorName, List<AdminObject> adminObjects, Bundle bundle) throws DeploymentException { Map<String, GBeanData> adminObjectInfos = new HashMap<String, GBeanData>(); for (AdminObject adminObject : adminObjects) { GBeanInfoBuilder adminObjectInfoBuilder = new GBeanInfoBuilder(AdminObjectWrapperGBean.class, new AnnotationGBeanInfoBuilder(AdminObjectWrapperGBean.class).buildGBeanInfo()); String adminObjectClassName = adminObject.getAdminObjectClass(); GBeanData adminObjectGBeanData = setUpDynamicGBeanWithProperties(adminObjectClassName, adminObjectInfoBuilder, adminObject.getConfigProperty(), bundle, Collections.<String>emptySet()); // set the standard properties String adminObjectInterface = adminObject.getAdminObjectInterface(); adminObjectGBeanData.setAttribute("adminObjectInterface", adminObjectInterface); adminObjectGBeanData.setAttribute("adminObjectClass", adminObjectClassName); adminObjectGBeanData.setReferencePattern("ValidatorFactory", validatorName); adminObjectInfos.put(adminObjectInterface, adminObjectGBeanData); } return adminObjectInfos; }
private Map<String, GBeanData> getActivationSpecInfoMap(AbstractName validatorName, List<MessageListener> messageListeners, Bundle bundle) throws DeploymentException { Map<String, GBeanData> activationSpecInfos = new HashMap<String, GBeanData>(); for (MessageListener messageListener : messageListeners) { String messageListenerInterface = messageListener.getMessageListenerType(); ActivationSpec activationSpec = messageListener.getActivationSpec(); String activationSpecClassName = activationSpec.getActivationSpecClass(); GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(ActivationSpecWrapperGBean.class, new AnnotationGBeanInfoBuilder(ActivationSpecWrapperGBean.class).buildGBeanInfo()); Set<String> ignore = Collections.singleton("resourceAdapter"); setUpDynamicGBean(activationSpecClassName, infoBuilder, ignore, bundle, true); GBeanInfo gbeanInfo = infoBuilder.getBeanInfo(); GBeanData activationSpecInfo = new GBeanData(gbeanInfo); activationSpecInfo.setAttribute("activationSpecClass", activationSpecClassName); activationSpecInfo.setReferencePattern("ValidatorFactory", validatorName); activationSpecInfos.put(messageListenerInterface, activationSpecInfo); } return activationSpecInfos; }
private Map getManagedConnectionFactoryInfoMap(AbstractName validatorName, List<ConnectionDefinition> connectionDefinitions, Bundle bundle) throws DeploymentException { Map<String, GBeanData> managedConnectionFactoryInfos = new HashMap<String, GBeanData>(); for (ConnectionDefinition connectionDefinition : connectionDefinitions) { GBeanInfoBuilder managedConnectionFactoryInfoBuilder = new GBeanInfoBuilder(ManagedConnectionFactoryWrapper.class, ManagedConnectionFactoryWrapperGBean.GBEAN_INFO); String managedConnectionfactoryClassName = connectionDefinition.getManagedConnectionFactoryClass(); Set<String> ignore = new HashSet<String>(); ignore.add("ResourceAdapter"); ignore.add("LogWriter"); GBeanData managedConnectionFactoryGBeanData = setUpDynamicGBeanWithProperties(managedConnectionfactoryClassName, managedConnectionFactoryInfoBuilder, connectionDefinition.getConfigProperty(), bundle, ignore); // set the standard properties String connectionfactoryInterface = connectionDefinition.getConnectionFactoryInterface(); managedConnectionFactoryGBeanData.setAttribute("managedConnectionFactoryClass", managedConnectionfactoryClassName); managedConnectionFactoryGBeanData.setAttribute("connectionFactoryInterface", connectionfactoryInterface); managedConnectionFactoryGBeanData.setAttribute("connectionFactoryImplClass", connectionDefinition.getConnectionFactoryImplClass()); managedConnectionFactoryGBeanData.setAttribute("connectionInterface", connectionDefinition.getConnectionInterface()); managedConnectionFactoryGBeanData.setAttribute("connectionImplClass", connectionDefinition.getConnectionImplClass()); managedConnectionFactoryGBeanData.setReferencePattern("ValidatorFactory", validatorName); managedConnectionFactoryInfos.put(connectionfactoryInterface, managedConnectionFactoryGBeanData); } return managedConnectionFactoryInfos; }
GBeanInfoBuilder resourceAdapterInfoBuilder = new GBeanInfoBuilder(ResourceAdapterWrapperGBean.class, ResourceAdapterWrapperGBean.GBEAN_INFO); String resourceAdapterClassName = resourceadapter.getResourceadapterClass().getStringValue().trim(); GBeanData resourceAdapterGBeanData = setUpDynamicGBeanWithProperties(resourceAdapterClassName, resourceAdapterInfoBuilder, resourceadapter.getConfigPropertyArray(), cl, Collections.<String>emptySet());
GBeanInfoBuilder resourceAdapterInfoBuilder = new GBeanInfoBuilder(ResourceAdapterWrapperGBean.class, new MultiGBeanInfoFactory().getGBeanInfo(ResourceAdapterWrapperGBean.class)); String resourceAdapterClassName = resourceAdapter.getResourceAdapterClass(); GBeanData resourceAdapterGBeanData = setUpDynamicGBeanWithProperties(resourceAdapterClassName, resourceAdapterInfoBuilder, resourceAdapter.getConfigProperty(), bundle, Collections.<String>emptySet());