From: "amit shetty" <[EMAIL PROTECTED]>
> Hi,
> I am trying to use messenger in CLIENT_ACKNOWLEDGE mode, and have
> not been able to.
>
> First, I couldnt find a way to get the session object (in order to
> call recover() on it...) So I worked around it by exposing the
> borrowSession() method. Even this did not work...

Depending on how you want to process the Session, you could provide your own
SessionFactory implementation that does recovery on startup.

If its any help, there is now a getSession() method on Messenger to return
the current (synchronous) JMS Session that the current thread is using.


> Also, I have the acknowledemode flag in messenger.xml set
>     <jndi lookupName="ConnectionFactory" topic="false"
> acknowlegeMode="Session.CLIENT_ACKNOWLEDGE">
> I am not totally sure this works.
> _messenger.getSessionFactory().getAcknowledgeMode();
> returned 1 as the ack mode.
>
> Either way, I am also doing
>
_messenger.getSessionFactory().setAcknowledgeMode(Session.CLIENT_ACKNOWLEDGE
);
> at the very start, and this does not seem to work too!

I've just patched the code so that the acknowledgement mode can be set via
the Messenger.xml file via the acknowledge attribute, whch takes a value of
"auto" | "client" | "dups ok" (case insensitive).

Alternatively you can set it via the SessionFactory as you note above,
though care should be taken to do this before the Session is created.

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>

Reply via email to