You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by synopia <pa...@gmail.com> on 2014/07/07 15:37:24 UTC
ManagedConnectionProxy.createSession(...)
Hello,
I have a question concering the following change commit:
https://github.com/apache/activemq/commit/adb49f562725087865ded9a773ee6901423c870b
With this changes (which is, however, active in lastest RedHat JBoss AMQ
build 379) our AMQ setup broke. Currently we simply use the createSession
Method to get a transactional AMQ session (args: true,
Session.SESSION_TRANSACTED). The change makes both arguments totally
useless, they are simply ignored.
Is this correct? If so, maybe exceptions should be thrown, when
createSession is called with SESSION_TRANSACTED - this would have saved me
some days debugging AMQ sources ;-)
My question is, what is the suggested way to get a transacted session? Any
hints or links on this topic?
Thanks in advance,
Paul.
--
View this message in context: http://activemq.2283324.n4.nabble.com/ManagedConnectionProxy-createSession-tp4682876.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ManagedConnectionProxy.createSession(...)
Posted by Gary Tully <ga...@gmail.com>.
I opened an issue to track this: https://issues.apache.org/jira/browse/AMQ-5264
please comment to add your use case or make any other suggestion.
Feedback most welcome. thanks.
On 7 July 2014 14:37, synopia <pa...@gmail.com> wrote:
> Hello,
>
> I have a question concering the following change commit:
>
> https://github.com/apache/activemq/commit/adb49f562725087865ded9a773ee6901423c870b
>
> With this changes (which is, however, active in lastest RedHat JBoss AMQ
> build 379) our AMQ setup broke. Currently we simply use the createSession
> Method to get a transactional AMQ session (args: true,
> Session.SESSION_TRANSACTED). The change makes both arguments totally
> useless, they are simply ignored.
>
> Is this correct? If so, maybe exceptions should be thrown, when
> createSession is called with SESSION_TRANSACTED - this would have saved me
> some days debugging AMQ sources ;-)
>
> My question is, what is the suggested way to get a transacted session? Any
> hints or links on this topic?
>
> Thanks in advance,
>
> Paul.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ManagedConnectionProxy-createSession-tp4682876.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
--
http://redhat.com
http://blog.garytully.com
Re: ManagedConnectionProxy.createSession(...)
Posted by synopia <pa...@gmail.com>.
Hey, many thanks for you response.
I just tried using the admin object - works like a charm!
I also noticed the ticket you just created, but I first have to think about
all this.
I think we are using a really weird setup here - so I have to check out,
what we can change here before requesting changes in other software ;-)
Thanks for your help!
Paul.
--
View this message in context: http://activemq.2283324.n4.nabble.com/ManagedConnectionProxy-createSession-tp4682876p4682967.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ManagedConnectionProxy.createSession(...)
Posted by Gary Tully <ga...@gmail.com>.
it is correct for a JEE managed connection factory. The transaction
semantics come either from the rar local transaction or xaresource.
If there is no jee transaction and a transacted session, there will be
nothing to commit the operations on the session.
But you are not the first to not this as a problem so I think we need
to make the behaviour configurable.
It is possible to configure a regular connection factory as an admin
object for the RAR[1] so you can get access to a non managed
connection factory in that way.
There is also the local transaction interface, if the RAR is visible
to your code. There is an test for that at:
https://github.com/apache/activemq/blob/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionTest.java#L88
In that scenario, even when the params to createSession are ignored,
the local transaction can be in effect.
[1] https://github.com/gtully/activemq-arquillian/blob/master/javaee/mdb-tx-send/server/standalone/configuration/standalone-example.xml#L367
On 7 July 2014 14:37, synopia <pa...@gmail.com> wrote:
> Hello,
>
> I have a question concering the following change commit:
>
> https://github.com/apache/activemq/commit/adb49f562725087865ded9a773ee6901423c870b
>
> With this changes (which is, however, active in lastest RedHat JBoss AMQ
> build 379) our AMQ setup broke. Currently we simply use the createSession
> Method to get a transactional AMQ session (args: true,
> Session.SESSION_TRANSACTED). The change makes both arguments totally
> useless, they are simply ignored.
>
> Is this correct? If so, maybe exceptions should be thrown, when
> createSession is called with SESSION_TRANSACTED - this would have saved me
> some days debugging AMQ sources ;-)
>
> My question is, what is the suggested way to get a transacted session? Any
> hints or links on this topic?
>
> Thanks in advance,
>
> Paul.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ManagedConnectionProxy-createSession-tp4682876.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
--
http://redhat.com
http://blog.garytully.com