/** * {@inheritDoc} */ public boolean handles(ConnectorDescriptor cd, String moduleName) { return (cd.getInBoundDefined() && !ConnectorsUtil.isJMSRA(moduleName)); }
private ActiveResourceAdapter getActiveRA(ConnectorDescriptor cd, String moduleName) throws ConnectorRuntimeException{ Collection<ActiveResourceAdapter> activeRAs = activeRAHabitat.getAllByContract(ActiveResourceAdapter.class); for(ActiveResourceAdapter activeRA : activeRAs){ if(activeRA.handles(cd, moduleName)){ if(_logger.isLoggable(Level.FINEST)){ _logger.log(Level.FINEST,"found active-RA for the module [ "+moduleName+" ] " + activeRA.getClass().getName()); } return activeRA; } } if(cd.getInBoundDefined()){ // did not find a suitable Active RA above. // [Possibly the profile (eg: WEB profile) does not support it] // Let us provide outbound support. _logger.log(Level.INFO, "Deployed RAR [ "+moduleName+" ] has inbound artifacts, but the runtime " + "does not support it. Providing only outbound support "); return activeRAHabitat.getComponent(ActiveResourceAdapter.class, ConnectorConstants.AORA); } //could not fine any impl. throw new ConnectorRuntimeException("Unable to get active RA for module " + moduleName); } }
/** * get the list of resource-adapters that support this message-listener-type * @param messageListener message-listener class-name * @return List of resource-adapters */ public List<String> getConnectorsSupportingMessageListener(String messageListener){ List<String> rars = new ArrayList<String>(); for(ActiveResourceAdapter ara : resourceAdapters.values()){ ConnectorDescriptor desc = ara.getDescriptor(); if(desc.getInBoundDefined()){ if(desc.getInboundResourceAdapter().getMessageListener(messageListener) != null){ rars.add(ara.getModuleName()); } } } return rars; } }
/** * {@inheritDoc} */ public boolean handles(ConnectorDescriptor cd, String moduleName) { boolean canHandle = false; boolean adminObjectsDefined = false; Set adminObjects = cd.getAdminObjects(); if (adminObjects != null && adminObjects.size() > 0) { adminObjectsDefined = true; } /* this class can handle Connector 1.0 Spec. compliant RAR criteria for 1.0 RAR : * No inbound artifacts * No admin-objects * There should be only one connection-definition * RA Class should not be present (equivalent to "") */ if(!cd.getInBoundDefined() && !adminObjectsDefined && (cd.getOutBoundDefined() && cd.getOutboundResourceAdapter().getConnectionDefs().size() < 2 && "".equals(cd.getResourceAdapterClass())) ){ canHandle = true; } return canHandle; }
/** * {@inheritDoc} */ public boolean handles(ConnectorDescriptor cd, String moduleName) { boolean adminObjectsDefined = false; Set adminObjects = cd.getAdminObjects(); if (adminObjects != null && adminObjects.size() > 0) { adminObjectsDefined = true; } /* this class can handle Connector 1.5 Spec. compliant RAR that has no inbound artifacts criteria for 1.5 RAR : * No inbound artifacts * Any one of the following conditions hold true : * -> admin object is defined or * -> resource-adapter-class is defined or * -> more than one connection-definition is defined. */ boolean canHandle = false; if(!cd.getInBoundDefined()){ if(cd.getOutBoundDefined() && cd.getOutboundResourceAdapter().getConnectionDefs().size() > 1){ canHandle = true; }else if (adminObjectsDefined){ canHandle = true; }else if(!cd.getResourceAdapterClass().equals("")){ canHandle = true; } } return canHandle; }
if (desc.getInBoundDefined()) { Activation activation = (Activation) declaringClass.getAnnotation(Activation.class); Class[] messageListeners = activation.messageListeners(); if(desc.getInBoundDefined()){ Set messageListeners = desc.getInboundResourceAdapter().getMessageListeners(); Iterator mlItr = messageListeners.iterator();
if (desc.getInBoundDefined()) { InboundResourceAdapter ira = desc.getInboundResourceAdapter(); Set messageListeners = ira.getMessageListeners();
if (conDesc.getInBoundDefined() == true) {
if (conDesc.getInBoundDefined() == true) {
if (!desc.getInBoundDefined()) { desc.setInboundResourceAdapter(new InboundResourceAdapter());