Hi Heshitha,

There are two methods we can use to create a transacted session in JMS,

   1. createSession(boolean transacted, int acknowledgeMode)- you can set
   the transacted parameter to true to create a transacted session.
   Acknowledge mode is ignored when the transacted parameter is set to true.
   2. createSession(int sessionMode) - you can use SESSION_TRANSACTED as
   acknowledge mode to create a transacted session. AFAIK this method is
   only vailable in JMS 2.

You can use either of the methods depending on the JMS version used and the
behaviuor should be similar.

On Wed, Jan 3, 2018 at 10:06 AM, Heshitha Hettihewa <heshit...@wso2.com>
wrote:

> Hi,
>
> Inside JMS inbound endpoint code base there is a ack mode for
> SESSION_TRANSACTED [1] as well as transport.jms.SessionTransacted
> property[2]. In JMS specs(in 1.0, 1.1 and 2.0) SESSION_TRANSACTED ack mode
> is not defined. But this is used in Java JMS api [3]. Are these two methods
> used for the same purpose?. Or is there any difference?.
>
> [1]. https://github.com/wso2/carbon-mediation/blob/master/
> components/inbound-endpoints/org.wso2.carbon.inbound.
> endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/
> protocol/jms/factory/JMSConnectionFactory.java#L155
> [2]. https://github.com/wso2/carbon-mediation/blob/master/
> components/inbound-endpoints/org.wso2.carbon.inbound.
> endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/
> protocol/jms/factory/JMSConnectionFactory.java#L138
> [3]. https://docs.oracle.com/javaee/7/api/javax/jms/Session.html#SESSION_
> TRANSACTED
>
> Thanks,
> Heshitha.
> --
> Heshitha Hettihewa
> *Software Engineer*
> Mobile : +94716866386
> <%2B94%20%280%29%20773%20451194>
> heshit...@wso2.com
>



-- 
Asanka Abeyweera
Associate Technical Lead
WSO2 Inc.

Phone: +94 712228648
Blog: a5anka.github.io

<https://wso2.com/signature>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to