Closed spring-operator closed 10 years ago
Kumar Amit commented
Kumar Amit added a comment - Today 8:56 AM Hi Gray, I am facing one issue seeing two instance of listener in Queue.
We are defining default message listener which we configured in spring configuration xml but once we start its show two reader by default. Could you please help me in that. Thanks amit Show Kumar Amit added a comment - Today 8:56 AM Hi Gray, I am facing one issue seeing two instance of listener in Queue. We are defining default message listener which we configured in spring configuration xml but once we start its show two reader by default. Could you please help me in that. Thanks amit .Hide Permalink Gary Russell added a comment - Today 9:44 AM Is this running in a web application?
A common mistake is to load the Spring Integration configuration into both the servlet context and the root (ContextLoaderListener) context.
If not; turn on debug logging for org.springframework; it emits copious logs for context loading; and all should become clear.
Gary Russell commented
Please attach complete configuration and DEBUG logs and we will reopen this issue if there really is a problem. You provide no evidence that you have attempted to debug your configuration.
As I said before JIRA is not the appropriate medium to ask questions and debug your configuration.
Kumar Amit commented
Thank you Gray for help.
This runs in JMX
We are using ContextLoaderListener
Message listener we defined like below
Once we start processor from JMX it shows total 2 Listener on queue.
Suspecting how its creating two instance of Listener
We are thinking of define singleton explicity to Listener.
Kumar Amit commented
Thanks Gray please guide me where to place my questions.
Artem Bilan commented
where to place my questions.
On the StackOverflow under spring-integration
tag
Cheers
Gary Russell commented
It appears that you are simply not reading my replies and not taking any actions I recommend; my patience is wearing thin.
The information Artem just provided was in my reply to the other JIRA you hijacked (#7234).
In that same reply (and in the text you copied above); I suggested to you that the most likely reason is you are loading the context twice (once in the context loader listener and once in the dispatcher servlet).
If you do that, you will, indeed, get two endpoints listening on the queue.
I also said turn on DEBUG logging and you will see the beans being loaded twice.
Please don't ask any more questions (here or anywhere) unless you have hard evidence that there is a problem with the framework and that you don't have a mis-configured system with the context being loaded twice. By hard evidence, I mean a DEBUG log that spans the time of application startup to the point where the 2 listeners are running.
You will find that this team is very responsive to user questions and real problems, but we can't help if you don't do what we suggest.
Kumar Amit opened INT-3424 and commented
•It was observed that there are two listeners (rather than one) that are contending to listen
Affects: 2.2.6