activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: ManagedConnectionProxy.createSession(...)
Date Tue, 08 Jul 2014 10:22:03 GMT
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 <paul.fritsche@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

Mime
View raw message