On 22 Sep 2005, at 16:55, Andy Depue wrote:
The outbound JMS page for Jencks ( http://jencks.org/Outbound+JMS )
claims
that Jencks' outbound feature utilizes pooling. However, at the
same time
this "Performance Tip" appears on the page:
"... However creating and closing connections, sessions, producers
is an
expensive operation - since each operation will often require a
synchronous
request/response with the message broker (e.g. for security checks
etc).
"So where possible JMS resources like connections, sessions,
producers,
consumers should be setup once on startup and reused/pooled. Then a
send or
receive is a blazingly fast operation."
So, which is it? Does Jencks' outbound use pooling?
Yes
And if so, what objects
are pooled? Connections? Sessions?
Jencks pools ManagedConnections, then its up to the RA to figure out
the rest. The ActiveMQ RA pools connections and sessions.
(actually with ActiveMQ we make producers asynchronously so they're
pretty fast and lightweight).
There is a non-J2EE option to reuse the inbound session/producers for
outbound messaging if required but its not j2ee compliant (as it
can't use a different user security context etc).
Producers? I'm trying to determine if
I can replace my homegrown XA pooling connection factory with
Jencks, but I
depend on everything being pooled so that I can utilize this
pattern in my
system:
For each message: open connection -> open session -> create
producer -> send
message -> close producer -> close session -> close connection.
My app depends on every one of these being pooled so that it isn't
really
opening a connection+session+producer for every message.
It should work great, yes.
The only area of caution is over the creation/closing of producers;
which should be fine - we might have to tune the RA a little if you
hit any bumps :)
James
-------
http://radio.weblogs.com/0112098/