[
https://issues.apache.org/jira/browse/ARTEMIS-989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15880675#comment-15880675
]
ASF GitHub Bot commented on ARTEMIS-989:
----------------------------------------
GitHub user jbertram opened a pull request:
https://github.com/apache/activemq-artemis/pull/1040
ARTEMIS-989 JMS2 context support custom session modes
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jbertram/activemq-artemis ARTEMIS-989
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/1040.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1040
----
commit 1f8994510de79fdf3c2fae80c319425c651c627a
Author: Justin Bertram <[email protected]>
Date: 2017-02-23T15:46:59Z
ARTEMIS-989 JMS2 context support custom session modes
----
> Individual Acknowledge: ActiveMQConnectionFactory.createContext(final int
> sessionMode) throws exception for ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ARTEMIS-989
> URL: https://issues.apache.org/jira/browse/ARTEMIS-989
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 1.5.3
> Reporter: Vishal Agarwal
> Assignee: Justin Bertram
>
> Artemis document says that it supports the Individual acknowledgement
> https://activemq.apache.org/artemis/docs/1.5.3/pre-acknowledge.html
> But passing the ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE to
> ActiveMQConnectionFactory.createContext(final int sessionMode) throws the
> JMSRuntimeException("Invalid Session Mode: " + mode).
> Actually there is a discrepancy in "createContext(String userName, String
> password, int sessionMode)" method. validateSessionMode(int mode) throws the
> exception but while creating the context(in the same method)
> ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE. is accepted.
> ActiveMQConnection connection = createConnectionInternal(userName, password,
> false, ActiveMQConnection.TYPE_GENERIC_CONNECTION);
> return connection.createContext(sessionMode);
> If we add
> case ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE:
> case ActiveMQJMSConstants.PRE_ACKNOWLEDGE:
> in the "validateSessionMode" method it will work fine.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)