@Override protected String registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance) { return raRepository.getValue().registerResourceAdapter(instance); }
@Override protected void setRecoveryForResourceAdapterInResourceAdapterRepository(String key, boolean isXA) { try { raRepository.getValue().setRecoveryForResourceAdapter(key, isXA); } catch (Throwable t) { DEPLOYMENT_CONNECTOR_LOGGER.unableToRegisterRecovery(key, isXA); } } }
/** * Removes activation config properties which aren't recognized by the resource adapter <code>activation</code>, from the * passed <code>activationConfigProps</code> and returns only those Properties which are valid. * * @param resourceAdapterName The resource adapter name * @param activation {@link Activation} * @param activationConfigProps Activation config properties which will be checked for validity * @return */ private Properties filterUnknownActivationConfigProperties(final String resourceAdapterName, final Activation activation, final Properties activationConfigProps) { if (activationConfigProps == null) { return null; } final Map<String, Class<?>> raActivationConfigProps = activation.getConfigProperties(); final Set<String> raRequiredConfigProps = activation.getRequiredConfigProperties(); final Enumeration<?> propNames = activationConfigProps.propertyNames(); final Properties validActivationConfigProps = new Properties(); // initialize to all the activation config properties that have been set on the MDB validActivationConfigProps.putAll(activationConfigProps); while (propNames.hasMoreElements()) { final Object propName = propNames.nextElement(); if (raActivationConfigProps.containsKey(propName) == false && raRequiredConfigProps.contains(propName) == false) { // not a valid activation config property, so log a WARN and filter it out from the valid activation config properties validActivationConfigProps.remove(propName); EjbLogger.ROOT_LOGGER.activationConfigPropertyIgnored(propName, resourceAdapterName); } } return validActivationConfigProps; }
final List<MessageListener> messageListeners = resourceAdapterRepository.getMessageListeners(raIdentifier); if (messageListeners == null || messageListeners.isEmpty()) { throw EjbLogger.ROOT_LOGGER.unknownMessageListenerType(messageListenerInterface.getName(), resourceAdapterName); if (messageListenerInterface.equals(messageListener.getType())) { requiredMessageListener = messageListener; break; final Activation activation = requiredMessageListener.getActivation(); final ActivationSpec activationSpec = activation.createInstance(); BeanUtils.mapJavaBeanProperties(activationSpec, validActivationConfigProps);
raRepository.getValue().unregisterResourceAdapter(deploymentMD.getResourceAdapterKey()); } catch (org.jboss.jca.core.spi.rar.NotFoundException nfe) { ConnectorLogger.ROOT_LOGGER.exceptionDuringUnregistering(nfe);
private void deactivate() { ClassLoader oldTccl = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged(); try { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(classLoader); endpoint.deactivate(endpointFactory, activationSpec); } catch (ResourceException re) { throw EjbLogger.ROOT_LOGGER.failureDuringEndpointDeactivation(this.getComponentName(), re); } finally { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(oldTccl); } }
/** * Returns the {@link org.jboss.jca.core.spi.rar.Endpoint} corresponding to the passed <code>resourceAdapterName</code> * * @param resourceAdapterName The resource adapter name * @return */ private Endpoint getEndpoint(final String resourceAdapterName) { // first get the ra "identifier" (with which it is registered in the resource adapter repository) for the // ra name final String raIdentifier = ConnectorServices.getRegisteredResourceAdapterIdentifier(resourceAdapterName); if (raIdentifier == null) { throw EjbLogger.ROOT_LOGGER.unknownResourceAdapter(resourceAdapterName); } final ResourceAdapterRepository resourceAdapterRepository = resourceAdapterRepositoryInjectedValue.getValue(); if (resourceAdapterRepository == null) { throw EjbLogger.ROOT_LOGGER.resourceAdapterRepositoryUnAvailable(); } try { return resourceAdapterRepository.getEndpoint(raIdentifier); } catch (NotFoundException nfe) { throw EjbLogger.ROOT_LOGGER.noSuchEndpointException(resourceAdapterName, nfe); } }
private void activate() { ClassLoader oldTccl = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged(); try { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(classLoader); NamespaceContextSelector.pushCurrentSelector(this.getNamespaceContextSelector()); try { this.endpoint.activate(endpointFactory, activationSpec); } finally { NamespaceContextSelector.popCurrentSelector(); } } catch (Exception e) { throw EjbLogger.ROOT_LOGGER.failedToActivateMdb(getComponentName(), e); } finally { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(oldTccl); } }
@Override protected String registerResourceAdapterToResourceAdapterRepository(ResourceAdapter instance) { raRepositoryRegistrationId = raRepository.getValue().registerResourceAdapter(instance); // make a note of this identifier for future use if (connectorServicesRegistrationName != null) { ConnectorServices.registerResourceAdapterIdentifier(connectorServicesRegistrationName, raRepositoryRegistrationId); } return raRepositoryRegistrationId; }
@Override protected void setRecoveryForResourceAdapterInResourceAdapterRepository(String key, boolean isXA) { try { raRepository.getValue().setRecoveryForResourceAdapter(key, isXA); } catch (Throwable t) { DEPLOYMENT_CONNECTOR_LOGGER.unableToRegisterRecovery(key, isXA); } } }
raRepository.getValue().unregisterResourceAdapter(raRepositoryRegistrationId); } catch (Throwable e) { DEPLOYMENT_CONNECTOR_LOGGER.debug("Failed to unregister RA from RA Repository", e);
@Override protected String registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance) { return getResourceAdapterRepository().registerResourceAdapter(instance); }
@Override protected void setRecoveryForResourceAdapterInResourceAdapterRepository(String key, boolean isXA) { try { raRepository.getValue().setRecoveryForResourceAdapter(key, isXA); } catch (Throwable t) { DEPLOYMENT_CONNECTOR_LOGGER.unableToRegisterRecovery(key, isXA); } }
@Override protected String registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance) { return raRepository.getValue().registerResourceAdapter(instance); }
@Override protected void setRecoveryForResourceAdapterInResourceAdapterRepository(String key, boolean isXA) { try { raRepository.getValue().setRecoveryForResourceAdapter(key, isXA); } catch (Throwable t) { DEPLOYMENT_CONNECTOR_LOGGER.unableToRegisterRecovery(key, isXA); } } }
@Override protected String registerResourceAdapterToResourceAdapterRepository(ResourceAdapter instance) { final String raIdentifier = raRepository.getValue().registerResourceAdapter(instance); // make a note of this identifier for future use ConnectorServices.registerResourceAdapterIdentifier(this.deploymentName, raIdentifier); return raIdentifier; }
@Override protected void setRecoveryForResourceAdapterInResourceAdapterRepository(String key, boolean isXA) { try { raRepository.getValue().setRecoveryForResourceAdapter(key, isXA); } catch (Throwable t) { DEPLOYMENT_CONNECTOR_LOGGER.unableToRegisterRecovery(key, isXA); } } }
@Override protected String registerResourceAdapterToResourceAdapterRepository(ResourceAdapter instance) { return ((RAConfiguration) getConfiguration()).getResourceAdapterRepository(). registerResourceAdapter(instance); }
@Override protected void setRecoveryForResourceAdapterInResourceAdapterRepository(String key, boolean isXA) { try { raRepository.getValue().setRecoveryForResourceAdapter(key, isXA); } catch (Throwable t) { DEPLOYMENT_CONNECTOR_LOGGER.unableToRegisterRecovery(key, isXA); } }
@Override protected String registerResourceAdapterToResourceAdapterRepository(ResourceAdapter instance) { raRepositoryRegistrationId = raRepository.getValue().registerResourceAdapter(instance); // make a note of this identifier for future use if (connectorServicesRegistrationName != null) { ConnectorServices.registerResourceAdapterIdentifier(connectorServicesRegistrationName, raRepositoryRegistrationId); } return raRepositoryRegistrationId; }