Why there were two consumers listening

I found out why my .war project had two consumers listening to the queue: My application logic was allowing the line

ctx = new ClassPathXmlApplicationContext("applicationContext.xml");

to be called twice, which instantiated the listener the second time. I fixed the guard condition, and now when I deploy I only have one consumer listening to my queue, as I expected should be the case!

(See my self-answering thread on the Spring forum.)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s