private Map<String, List<EjbDescriptor>> createRAEjbMapping(List<EjbDescriptor> ejbDescriptors) { Map<String, List<EjbDescriptor>> map = new HashMap<String, List<EjbDescriptor>>(); for (EjbDescriptor ejbDescriptor : ejbDescriptors) { List<EjbDescriptor> ejbmdbd = new ArrayList<EjbDescriptor>(); String ramid = ((EjbMessageBeanDescriptor) ejbDescriptor).getResourceAdapterMid(); if ((ramid == null) || (ramid.equalsIgnoreCase(""))) { ramid = ConnectorConstants.DEFAULT_JMS_ADAPTER; } // If Hashtable contains the RAMid key, get the list of MDB descriptors // and add the current MDB Descriptor (list[i]) to the list and put the // pair back into hashtable. // Otherwise, add the RAMid and the current MDB Descriptor to the hashtable if (map.containsKey(ramid)) { ejbmdbd = map.get(ramid); map.remove(ramid); } ejbmdbd.add(ejbDescriptor); map.put(ramid, ejbmdbd); } return map; }
String resourceAdapterMid = descriptor_.getResourceAdapterMid(); if (resourceAdapterMid == null) { resourceAdapterMid = System.getProperty(RA_MID);
/** * write the ejbmessage descriptor class to a DOM tree and return it * * @param parent node in the DOM tree * @param node name for the root element of this xml fragment * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor( Node parent, String nodeName, EjbMessageBeanDescriptor descriptor) { Node raNode = super.writeDescriptor(parent, nodeName, descriptor); appendTextChild(raNode, RuntimeTagNames.RESOURCE_ADAPTER_MID, descriptor.getResourceAdapterMid()); ActivationConfigNode activationConfigNode = new ActivationConfigNode(); activationConfigNode.writeDescriptor (raNode, RuntimeTagNames.ACTIVATION_CONFIG, descriptor.getRuntimeActivationConfigDescriptor()); return raNode; } }
String raMid = messageBeanDesc.getResourceAdapterMid();