/** * 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); } }
/** * Returns the {@link org.jboss.jca.core.spi.rar.Endpoint} corresponding to the passed <code>resourceAdapterName</code> * * @param resourceAdapterName The resource adapter name * @return */ public 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 MESSAGES.unknownResourceAdapter(resourceAdapterName); } final ResourceAdapterRepository resourceAdapterRepository = getResourceAdapterRepository(); if (resourceAdapterRepository == null) { throw MESSAGES.resourceAdapterRepositoryUnAvailable(); } try { return resourceAdapterRepository.getEndpoint(raIdentifier); } catch (NotFoundException nfe) { throw MESSAGES.noSuchEndpointException(resourceAdapterName, nfe); } }