-
15. Re: Use JMS integration classes for MessageListener
tomjenkinson Apr 28, 2016 10:07 AM (in response to sewatech)I am not saying async is useless, sorry if I misrepresented that. I am saying that Narayana is not necessarily the right place to build an MDB-like container.
If you call setMessageListener on an XAConnection it would be really unlikely that the JMS implementation would do the right thing to set up the TX before calling your onMessage as they expect a "container" to do that normally.
As such someone has to implement the pseudocode I provided above. If the above is all you need just drop it into your app, you would still benefit from Narayana by the the that when you call getXASession this will attach to the TX and when you use the DB it will be in the same TX.Perhaps I misunderstood what you are proposing and if so please provide some pseudo-code.
-
16. Re: Use JMS integration classes for MessageListener
sewatech Apr 29, 2016 6:01 AM (in response to gytis)gytis The feature request is already there : [JBTM-2658] Implement JMS integration classes for MessageListener - JBoss Issue Tracker
I've made a PR to show what I had in mind. Nothing like a container, just an extension of the proxy chain.
-
17. Re: Use JMS integration classes for MessageListener
gytis Apr 29, 2016 6:18 AM (in response to sewatech)Thanks Alexis. I'll take a look.
-
18. Re: Use JMS integration classes for MessageListener
tomjenkinson Apr 29, 2016 7:44 AM (in response to gytis)I understand the approach but JBTM-2658 Implement JMS integration classes for MessageListener by hasalex · Pull Request #1004 · jbosstm/narayana · Git… _is_ sort of a container IMO.
There are different ways to do/log the transaction handling for example.
How about if we allow some kind of lambda to be passed in to do the "container-lite" functionality however that would be a proprietary API then unless instead of a lambda we configure the connection factory with a class name of where the routine to use is?
-
19. Re: Use JMS integration classes for MessageListener
tomjenkinson May 17, 2016 9:14 AM (in response to tomjenkinson)Just to wrap up this thread. We did identify on the PR that the proposed solution was built on implementation conventions in a particular JMS vendor and was not portable from the JMS API point of view. As such Alexis closed his PR for further future analysis.
Thanks for the contribution anyway - if there is something further we can reopen.
-
20. Re: Use JMS integration classes for MessageListener
alon3392 Jan 21, 2018 2:12 AM (in response to gytis)One comment regarding this package (org.jboss.narayana.jta.jms). While it is present in the jar published on maven (http://central.maven.org/maven2/org/jboss/narayana/jta/narayana-jta/5.7.1.Final/narayana-jta-5.7.1.Final.jar) for some reason its source is not present in the corresponding -sources.jar: (http://central.maven.org/maven2/org/jboss/narayana/jta/narayana-jta/5.7.1.Final/narayana-jta-5.7.1.Final-sources.jar)
-
21. Re: Use JMS integration classes for MessageListener
tomjenkinson Jan 22, 2018 5:05 AM (in response to alon3392)Thanks for the report. I have raised it here: [JBTM-2984] Ensure that the JMS integration classes are in the Maven sources jar - JBoss Issue Tracker