jsr343-experts@jms-spec.java.net

[jsr343-experts] Re: JMS 2 Plain Utility API Proposal

From: Clebert Suconic <clebert.suconic_at_gmail.com>
Date: Mon, 22 Aug 2011 20:04:01 -0500

IMHO We should be careful to not assume the bad design from JMSTemplate.

Any time you send a message with JMSTemplate, you have to basically
create a consumer / producer, a session, a connection, and throw it
away. What will make you do several network round trips. Even with
caching in place there are thngs you can't really do, what will make
you do round trips for simple events such as sending and receiving a
message.

This introduces several issues for users that I always try to educate
users against... Users should be as much as possible be caching the
consumers and producers.

Doing something like this will certainly make users to assume bad
practices as a good pattern.

I would prefer to keep JMS a Session based API, avoiding requiring
round trips by design.