public String getMessageDestinationName() { return getMessageDestination().getMessageDestinationName(); }
public void setMessageDestinationName(String name) { String old = getMessageDestination().getMessageDestinationName(); getMessageDestination().setMessageDestinationName(name); pcs.firePropertyChange("messageDestinationName", old, name); }
public void initContext(JndiConsumer specDD, XmlObject plan, Module module) throws DeploymentException { Collection<MessageDestination> specDestinations; try { Method m = specDD.getClass().getMethod("getMessageDestination", new Class[0]); m.setAccessible(true); specDestinations = (Collection<MessageDestination>) m.invoke(specDD, new Object[0]); } catch (Exception e) { specDestinations = new ArrayList<MessageDestination>(); } XmlObject[] gerDestinations = plan.selectChildren(GER_MESSAGE_DESTINATION_QNAME_SET); Map<String, GerMessageDestinationType> nameMap = new HashMap<String, GerMessageDestinationType>(); for (XmlObject gerDestination : gerDestinations) { GerMessageDestinationType destination = (GerMessageDestinationType) gerDestination.copy().changeType(GerMessageDestinationType.type); String name = destination.getMessageDestinationName().trim(); nameMap.put(name, destination); boolean found = false; for (MessageDestination specDestination : specDestinations) { if (specDestination.getMessageDestinationName().trim().equals(name)) { found = true; break; } } if (!found) { throw new DeploymentException("No spec DD message-destination for " + name); } } module.getRootEarContext().registerMessageDestionations(module.getModuleURI().toString(), nameMap); }
public void initContext(XmlObject specDD, XmlObject plan, Module module) throws DeploymentException { List<MessageDestinationType> specDestinations = convert(specDD.selectChildren(messageDestinationQNameSet), JEE_CONVERTER, MessageDestinationType.class, MessageDestinationType.type); XmlObject[] gerDestinations = plan.selectChildren(GER_MESSAGE_DESTINATION_QNAME_SET); Map<String, GerMessageDestinationType> nameMap = new HashMap<String, GerMessageDestinationType>(); for (XmlObject gerDestination : gerDestinations) { GerMessageDestinationType destination = (GerMessageDestinationType) gerDestination.copy().changeType(GerMessageDestinationType.type); String name = destination.getMessageDestinationName().trim(); nameMap.put(name, destination); boolean found = false; for (MessageDestinationType specDestination : specDestinations) { if (specDestination.getMessageDestinationName().getStringValue().trim().equals(name)) { found = true; break; } } if (!found) { throw new DeploymentException("No spec DD message-destination for " + name); } } module.getRootEarContext().registerMessageDestionations(module.getName(), nameMap); }