@XmlElement(name = "config-property") public List<ConfigProperty> getConfigProperty() { return connectionDefinition.getConfigProperty(); }
@XmlElement(name = "connectionfactory-interface", required = true) public String getConnectionFactoryInterface() { return connectionDefinition.getConnectionFactoryInterface(); }
@XmlElement(name = "managedconnectionfactory-class", required = true) public String getManagedConnectionFactoryClass() { return connectionDefinition.getManagedConnectionFactoryClass(); }
if (cd.getManagedConnectionFactoryClass().equals(cls.getName())) { definition = cd; break; definition = new org.apache.openejb.jee.ConnectionDefinition(); outboundResourceAdapter.getConnectionDefinition().add(definition); if (definition.getManagedConnectionFactoryClass() == null) { definition.setManagedConnectionFactoryClass(cls.getName()); if (definition.getConnectionInterface() == null) { definition.setConnectionInterface(connectionDefinitionAnnotation.connection().getName()); if (definition.getConnectionImplClass() == null) { definition.setConnectionImplClass(connectionDefinitionAnnotation.connectionImpl().getName()); if (definition.getConnectionFactoryInterface() == null) { definition.setConnectionFactoryInterface(connectionDefinitionAnnotation.connectionFactory().getName()); if (definition.getConnectionFactoryImplClass() == null) { definition.setConnectionFactoryImplClass(connectionDefinitionAnnotation.connectionFactoryImpl().getName());
private void buildConnectionDefinition(Class<? extends ManagedConnectionFactory> mcfClass, javax.resource.spi.ConnectionDefinition connectionDefinitionAnnotation, OutboundResourceAdapter outboundResourceAdapter) throws DeploymentException { ConnectionDefinition connectionDefinition = getConnectionDefinition(connectionDefinitionAnnotation, outboundResourceAdapter); if (connectionDefinition.getManagedConnectionFactoryClass() == null) { connectionDefinition.setManagedConnectionFactoryClass(mcfClass.getName()); } if (mcfClass.getName().equals(connectionDefinition.getManagedConnectionFactoryClass())) { connectionDefinition.setConnectionFactoryImplClass(connectionDefinitionAnnotation.connectionFactoryImpl().getName()); connectionDefinition.setConnectionInterface(connectionDefinitionAnnotation.connection().getName()); connectionDefinition.setConnectionImplClass(connectionDefinitionAnnotation.connectionImpl().getName()); setConfigProperties(connectionDefinition.getConfigProperty(), mcfClass); } }
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; }
String className = connection.getManagedConnectionFactoryClass(); String type = connection.getConnectionFactoryInterface(); for (ConfigProperty property : connection.getConfigProperty()) { String name = property.getConfigPropertyName(); String value = property.getConfigPropertyValue();
private String getId(ConnectionDefinition connection, OutboundResourceAdapter outbound, ConnectorModule connectorModule) { String id; if (connection.getId() != null) { id = connection.getId(); } else if (outbound.getConnectionDefinition().size() == 1) { id = connectorModule.getModuleId(); } else { id = connectorModule.getModuleId() + "-" + connection.getConnectionFactoryInterface(); } return id; }
private ConnectionDefinition getConnectionDefinition(javax.resource.spi.ConnectionDefinition connectionDefinitionAnnotation, OutboundResourceAdapter outboundResourceAdapter) { for (ConnectionDefinition connectionDefinition : outboundResourceAdapter.getConnectionDefinition()) { if (connectionDefinitionAnnotation.connectionFactory().getName().equals(connectionDefinition.getConnectionFactoryInterface())) { return connectionDefinition; } } ConnectionDefinition connectionDefinition = new ConnectionDefinition(); outboundResourceAdapter.getConnectionDefinition().add(connectionDefinition); connectionDefinition.setConnectionFactoryInterface(connectionDefinitionAnnotation.connectionFactory().getName()); return connectionDefinition; }
private void addExportPackages(Connector connector, Environment environment, Bundle bundle) throws DeploymentException { if (connector.getResourceAdapter().getOutboundResourceAdapter() != null) { for (ConnectionDefinition connectionDefinition : connector.getResourceAdapter().getOutboundResourceAdapter().getConnectionDefinition()) { addExportPackage(environment, connectionDefinition.getConnectionFactoryInterface(), bundle); addExportPackage(environment, connectionDefinition.getConnectionInterface(), bundle); } } if (connector.getResourceAdapter().getInboundResourceAdapter() != null) { for (MessageListener messageListener : connector.getResourceAdapter().getInboundResourceAdapter().getMessageAdapter().getMessageListener()) { addExportPackage(environment, messageListener.getMessageListenerType(), bundle); addExportPackage(environment, messageListener.getActivationSpec().getActivationSpecClass(), bundle); } } for (AdminObject adminObject : connector.getResourceAdapter().getAdminObject()) { addExportPackage(environment, adminObject.getAdminObjectInterface(), bundle); } }
@XmlElement(name = "connection-impl-class", required = true) public String getConnectionImplClass() { return connectionDefinition.getConnectionImplClass(); }
public void setConnectionFactoryInterface(final String value) { connectionDefinition.setConnectionFactoryInterface(value); }
public void setConnectionInterface(final String value) { connectionDefinition.setConnectionInterface(value); }
@XmlElement(name = "connectionfactory-impl-class", required = true) public String getConnectionFactoryImplClass() { return connectionDefinition.getConnectionFactoryImplClass(); }
@XmlElement(name = "connection-interface", required = true) public String getConnectionInterface() { return connectionDefinition.getConnectionInterface(); }
public void setConnectionFactoryImplClass(String value) { connectionDefinition.setConnectionFactoryImplClass(value); }
public void setConnectionImplClass(final String value) { connectionDefinition.setConnectionImplClass(value); }
if (cd.getManagedConnectionFactoryClass().equals(cls.getName())) { definition = cd; break; definition = new org.apache.openejb.jee.ConnectionDefinition(); outboundResourceAdapter.getConnectionDefinition().add(definition); if (definition.getManagedConnectionFactoryClass() == null) { definition.setManagedConnectionFactoryClass(cls.getName()); if (definition.getConnectionInterface() == null) { definition.setConnectionInterface(connectionDefinitionAnnotation.connection().getName()); if (definition.getConnectionImplClass() == null) { definition.setConnectionImplClass(connectionDefinitionAnnotation.connectionImpl().getName()); if (definition.getConnectionFactoryInterface() == null) { definition.setConnectionFactoryInterface(connectionDefinitionAnnotation.connectionFactory().getName()); if (definition.getConnectionFactoryImplClass() == null) { definition.setConnectionFactoryImplClass(connectionDefinitionAnnotation.connectionFactoryImpl().getName());
final String className = connection.getManagedConnectionFactoryClass(); final String type = connection.getConnectionFactoryInterface(); for (final ConfigProperty property : connection.getConfigProperty()) { final String name = property.getConfigPropertyName(); final String value = property.getConfigPropertyValue();
private String getId(final ConnectionDefinition connection, final OutboundResourceAdapter outbound, final ConnectorModule connectorModule) { final String id; if (connection.getId() != null) { id = connection.getId(); } else if (outbound.getConnectionDefinition().size() == 1) { id = connectorModule.getModuleId(); } else { id = connectorModule.getModuleId() + "-" + connection.getConnectionFactoryInterface(); } return id; }