[jboss-user] [JBoss Messaging] - Re: Servlet as a topic listener

timfox do-not-reply at jboss.com
Fri Apr 13 07:17:10 EDT 2007


Firstly I agree with genman that what you're trying to do sounds like an awful hack.

I also notice from your stack trace that you're using the JMS JCA resource adapter which is normally available at java:JmsXA when inside the app server. The resource adapter is correctly noticing that you're not closing connections in your code (i.e. a bug).

Also, when using the JCA adapter you can't use methods like setMessageListener, as per the spec.

What's probably happening is that when running "standalone" you are not using the JCA resource adapter - just the straight jms connection factory - which will not report you not closing connections, and will allow you to use the full JMS API.

If you want this to work inside the app server make sure you don't use the JMS resource adapter.

But I would first advise you to rethink your architecture - since this all seems quite hackish to me, and looking up a connection factory, creating s connection, creating a subscriber, getting message and closing connection every time, is not going to be fast.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037042#4037042

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037042



More information about the jboss-user mailing list