/** * check whether the <i>required-work-context</i> list mandated by the resource-adapter * is supported by the application server * @param desc ConnectorDescriptor * @throws ConnectorRuntimeException when unable to support any of the requested work-context type. */ private void validateWorkContextSupport(ConnectorDescriptor desc) throws ConnectorRuntimeException { Set workContexts = desc.getRequiredWorkContexts(); Iterator workContextsIterator = workContexts.iterator(); WorkContextHandler workContextHandler = connectorRuntime_.getWorkContextHandler(); workContextHandler.init(moduleName_, jcl_); while(workContextsIterator.hasNext()){ String ic = (String)workContextsIterator.next(); boolean supported = workContextHandler.isContextSupported(true, ic ); if(!supported){ String errorMsg = "Unsupported work context [ "+ ic + " ] "; Object params[] = new Object[]{ic, desc.getName()}; _logger.log(Level.WARNING,"unsupported.work.context", params); throw new ConnectorRuntimeException(errorMsg); } } }
Set connectionDefinitions = descriptor.getOutboundResourceAdapter().getConnectionDefs(); if(connectionDefinitions.size() == 0){ throw new RuntimeException("Invalid connector descriptor for RAR [ "+descriptor.getName()+" ], when " + "outbound-resource-adapter is specified," + "atleast one connection-definition must be specified either via annotation or via descriptor");
public ObjectName registerResourceAdapterModuleAndItsComponents( final ObjectName parentMBean, final MetadataImpl meta, final com.sun.enterprise.config.serverbeans.Application appConfig, final ConnectorDescriptor bundleDesc, final String appLocation) { meta.setCorrespondingConfig(getObjectName(appConfig)); final ObjectName objectName = createRARModuleMBean(parentMBean, meta, appConfig, bundleDesc); final com.sun.enterprise.config.serverbeans.Module moduleConfig = getModuleConfig(appConfig, bundleDesc.getModuleName() ); meta.setCorrespondingConfig(getObjectName(moduleConfig)); registerJ2EEChild(objectName, meta, ResourceAdapter.class, ResourceAdapterImpl.class, bundleDesc.getName()); return objectName; }