users@glassfish.java.net

Re: _at_PostConstruct with Unckecked Expcetion

From: <glassfish_at_javadesktop.org>
Date: Sat, 06 Dec 2008 11:31:01 PST

It's preferable to use a resource-ref for your MDB connection factory : e.g.

@Resource(mappedName="outgoing_factory") QueueConnectionFactory outgoing;

Then acquire a connection only when you want to send a message and close it. The
underlying connection will be pooled so you shouldn't experience significant overhead
in acquiring the connection each time.
[Message sent by forum member 'ksak' (ksak)]

http://forums.java.net/jive/thread.jspa?messageID=320462