/** * {@inheritDoc} */ public boolean isContextSupported(Class<? extends WorkContext> aClass) { WorkContextHandler wch = ConnectorRuntime.getRuntime().getWorkContextHandler(); wch.init(moduleName, rarCL); return wch.isContextSupported(true, aClass.getName()); }
/** * 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); } } }