The listener-container
element isn't meant for configuring a standalone JMS listener container. It is meant to act as a blueprint for all enclosed listener
tags. What, at runtime, actually happens is that a JMS Listener Container is constructed for each enclosed listener
. So there is not a single container but multiple.
As @artembilan mentioned the id of the container is set to the id of the listener. However when you would reuse the listener for spring integration it would render the listener useless. A listener-container can only have a single MessageListener attached, not multiple.
If you want to use a listener container for a Spring Integration gateway you will have to construct one yourself using one of the *MessageListenerContainer
classes.