public ResourceAdapter getResourceAdapter() { return (ResourceAdapter)this.getValue(RESOURCE_ADAPTER); }
public void setResourceAdapter(ResourceAdapter value) { this.setValue(RESOURCE_ADAPTER, value); }
try { if (desc_.getSunDescriptor() != null && desc_.getSunDescriptor().getResourceAdapter() != null) { getResourceAdapter().getValue(ResourceAdapter.JNDI_NAME);
/** * write the descriptor class to a DOM tree and return it * * @param parent node for the DOM tree * @param node name for the descriptor * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, String nodeName, ConnectorDescriptor connector) { Node connectorNode = super.writeDescriptor(parent, nodeName, connector); // resource-adapter SunConnector sunDesc = connector.getSunDescriptor(); if (sunDesc!=null) { ResourceAdapterNode ran = new ResourceAdapterNode(); ran.writeDescriptor(connectorNode, RuntimeTagNames.RESOURCE_ADAPTER, sunDesc.getResourceAdapter()); // role-map ? if (sunDesc.getRoleMap()!=null) { RoleMapNode rmn = new RoleMapNode(); rmn.writeDescriptor(connectorNode, RuntimeTagNames.ROLE_MAP, sunDesc.getRoleMap()); } } return connectorNode; } }
/** * Adds a new DOL descriptor instance to the descriptor instance * associated with this XMLNode * * @param descriptor the new descriptor */ public void addDescriptor(Object newDescriptor) { if (newDescriptor instanceof ResourceAdapter) { getSunConnectorDescriptor().setResourceAdapter( (ResourceAdapter)newDescriptor); } else if (newDescriptor instanceof RoleMap) { getSunConnectorDescriptor().setRoleMap( (RoleMap)newDescriptor); } else { super.addDescriptor(newDescriptor); } }
/** * @return the descriptor instance to associate with this XMLNode */ public SunConnector getSunConnectorDescriptor() { if (connector==null) { connector = new SunConnector(); descriptor.setSunDescriptor(connector); } return connector; }
/** * Deletes both the default connector connection pools and resources */ protected void destroyAllConnectorResources() { if (!(isSystemRar(moduleName_))) { deleteDefaultConnectorResources(); deleteDefaultConnectorConnectionPools(); // Added to ensure clean-up of the Sun RA connection pool if (desc_.getSunDescriptor() != null && desc_.getSunDescriptor().getResourceAdapter() != null) { // sun-ra.xml exists String jndiName = (String) desc_.getSunDescriptor(). getResourceAdapter().getValue(ResourceAdapter.JNDI_NAME); if (jndiName == null || jndiName.equals("")) { // jndiName is empty, sunRA pool not created, so don't need to delete } else { // jndiName is not empty, need to delete pool deleteSunRAConnectionPool(); } } } }
/** * write the descriptor class to a DOM tree and return it * * @param parent node for the DOM tree * @param node name for the descriptor * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, String nodeName, ConnectorDescriptor connector) { Node connectorNode = super.writeDescriptor(parent, nodeName, connector); // resource-adapter SunConnector sunDesc = connector.getSunDescriptor(); if (sunDesc!=null) { ResourceAdapterNode ran = new ResourceAdapterNode(); ran.writeDescriptor(connectorNode, RuntimeTagNames.RESOURCE_ADAPTER, sunDesc.getResourceAdapter()); // role-map ? if (sunDesc.getRoleMap()!=null) { RoleMapNode rmn = new RoleMapNode(); rmn.writeDescriptor(connectorNode, RuntimeTagNames.ROLE_MAP, sunDesc.getRoleMap()); } } return connectorNode; } }
/** * Adds a new DOL descriptor instance to the descriptor instance * associated with this XMLNode * * @param descriptor the new descriptor */ public void addDescriptor(Object newDescriptor) { if (newDescriptor instanceof ResourceAdapter) { getSunConnectorDescriptor().setResourceAdapter( (ResourceAdapter)newDescriptor); } else if (newDescriptor instanceof RoleMap) { getSunConnectorDescriptor().setRoleMap( (RoleMap)newDescriptor); } else { super.addDescriptor(newDescriptor); } }
/** * @return the descriptor instance to associate with this XMLNode */ public SunConnector getSunConnectorDescriptor() { if (connector==null) { connector = new SunConnector(); descriptor.setSunDescriptor(connector); } return connector; }
/** * Creates connector connection pool pertaining to sun-ra.xml. This is * only for 1.0 complient rars. * * @throws ConnectorRuntimeException Thrown when pool creation fails. */ private void createSunRAConnectionPool() throws ConnectorRuntimeException { String defaultPoolName = connectorRuntime_.getDefaultPoolName( moduleName_, connectionDefs_[0].getConnectionFactoryIntf()); String sunRAPoolName = defaultPoolName + ConnectorConstants.SUN_RA_POOL; PoolInfo poolInfo = new PoolInfo(sunRAPoolName); ConnectorDescriptorInfo connectorDescriptorInfo = ConnectorDDTransformUtils.getConnectorDescriptorInfo(connectionDefs_[0]); connectorDescriptorInfo.setRarName(moduleName_); connectorDescriptorInfo.setResourceAdapterClassName(desc_.getResourceAdapterClass()); ConnectorConnectionPool connectorPoolObj = ConnectionPoolObjectsUtils.createSunRaConnectorPoolObject(poolInfo, desc_, moduleName_); connectorPoolObj.setConnectorDescriptorInfo(connectorDescriptorInfo); connectorRuntime_.createConnectorConnectionPool(connectorPoolObj); if(_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "Created SUN-RA connection pool:", poolInfo); } String jndiName = (String) desc_.getSunDescriptor(). getResourceAdapter().getValue(ResourceAdapter.JNDI_NAME); ResourceInfo resourceInfo = new ResourceInfo(jndiName); connectorRuntime_.createConnectorResource(resourceInfo, poolInfo, null); if(_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "Created SUN-RA connector resource : ", resourceInfo); } }
public void setResourceAdapter(ResourceAdapter value) { this.setValue(RESOURCE_ADAPTER, value); }
public RoleMap getRoleMap() { return (RoleMap)this.getValue(ROLE_MAP); }
SunConnector sunraDesc = desc.getSunDescriptor(); if (sunraDesc != null) { String sunRAJndiName = (String) sunraDesc.getResourceAdapter(). getValue(ResourceAdapter.JNDI_NAME); if (jndiName.equals(sunRAJndiName)) {
public void setRoleMap(RoleMap value) { this.setValue(ROLE_MAP, value); }
public RoleMap getRoleMap() { return (RoleMap)this.getValue(ROLE_MAP); }
new ConnectorConnectionPool(poolInfo); SunConnector sundesc = desc.getSunDescriptor(); ResourceAdapter sunRAXML = sundesc.getResourceAdapter();
public void setRoleMap(RoleMap value) { this.setValue(ROLE_MAP, value); }
public ResourceAdapter getResourceAdapter() { return (ResourceAdapter)this.getValue(RESOURCE_ADAPTER); }
if (descriptor.getSunDescriptor() != null) { com.sun.enterprise.deployment.runtime.connector.ResourceAdapter rar = descriptor.getSunDescriptor().getResourceAdapter(); if (rar != null) { String sunRAJndiName = (String)