if (!msgListeners.hasNext()) {
throw new RuntimeException("There must be at least one messagelistener for this inbound resource adapter");
}
//message listeners
for (;msgListeners.hasNext();) {
MessageListener msgListener = (MessageListener) msgListeners.next();
Node msgListenerNode = appendChild(parent, ConnectorTagNames.MSG_LISTENER);
appendTextChild(msgListenerNode, ConnectorTagNames.MSG_LISTENER_TYPE, msgListener.getMessageListenerType());
//activation spec node
ActivationSpecNode actSpecNode = new ActivationSpecNode();
msgListenerNode = actSpecNode.writeDescriptor(msgListenerNode, msgListener);
}