-
45. Re: Feedback on Narayana Spring integration required
gytis Apr 8, 2016 9:14 AM (in response to haskovec)Hi Jeffrey.
The feature has been merged into Spring Boot and is now available from their master branch: https://github.com/spring-projects/spring-boot. I assume it should be included in the 1.4.0 release, but I don't have the date for it.
-
46. Re: Feedback on Narayana Spring integration required
haskovec Apr 8, 2016 1:28 PM (in response to gytis)Thanks Gytis! I really like the Boot framework as it takes a lot of the work out of Spring and I am glad to see you guys are integrating into it.
-
47. Re: Feedback on Narayana Spring integration required
dominicalston Apr 27, 2016 4:07 AM (in response to gytis)Hello. I'm having problems with JMS and auto transaction enlistment - I'm using spring-boot 1.4.0.M2. Is this supported as I don't see an equivalent factory bean i.e. similar to AtomikosConnectionFactoryBean? Any pointers please?
-
48. Re: Feedback on Narayana Spring integration required
zhfeng Apr 27, 2016 4:50 AM (in response to dominicalston)I just download the spring-boot 1.4.0.M2 source and it looks like it supported narayana. You should check
spring-boot-1.4.0.M2/spring-boot/src/main/java/org/springframework/boot/jta/narayana/NarayanaXAConnectionFactoryWrapper.java
I think we have [JBTM-2634] Create Narayana Spring Boot starter quickstart - JBoss Issue Tracker and gytis had some work with quickstart/spring/narayana-spring-boot at master-JBTM-2634-spring-boot · gytis/quickstart · GitHub
Maybe you need to replace the pom.xml from '1.4.0-BUILD-SNAPSHOT' to' 1.4.0-M2' to see if it works.
-
49. Re: Feedback on Narayana Spring integration required
dominicalston Apr 27, 2016 6:51 AM (in response to zhfeng)Thanks - I autowired the NarayanaXAConnectionFactoryWrapper and manually called wrapConnectionFactory() which results in resources being enlisted correctly.
-
50. Re: Feedback on Narayana Spring integration required
tomjenkinson Apr 27, 2016 7:09 AM (in response to dominicalston)I would imagine that wrapConnectionFactory should not need to be called by you as the user, I would think Spring should be doing this. Something like this: quickstart/MessagesService.java at master-JBTM-2634-spring-boot · gytis/quickstart · GitHub
Maybe gytis has some input.
-
51. Re: Feedback on Narayana Spring integration required
dominicalston Apr 27, 2016 7:57 AM (in response to tomjenkinson)Without calling wrapConnectionFactory(), I was unable to see resources being enlisted. It doesn't appear to be called automagically.
-
52. Re: Feedback on Narayana Spring integration required
gytis Apr 28, 2016 3:19 AM (in response to dominicalston)Did you add org.springframework.boot:spring-boot-starter-jta-narayana:1.4.0.M2 dependency to your pom? It should pull in the JMS integration code.
There is a working example with JMS and Database here: https://github.com/spring-projects/spring-boot/tree/v1.4.0.M2/spring-boot-samples/spring-boot-sample-jta-narayana
p.s. in the future I would recommend to create a new discussion per issue.
-
53. Re: Feedback on Narayana Spring integration required
dominicalston Apr 28, 2016 3:28 AM (in response to gytis)Hi Gytis. Thanks for the reply. I am including the org.springframework.boot:spring-boot-starter-jta-narayana dependency. Everything get auto configured, including the connectionFactoryWrapper. However, the wrapConnectionFactory() method is never invoked meaning the Arjuna connection factory proxies are never created, thus XA resources are never enlisted with a transaction.
-
54. Re: Feedback on Narayana Spring integration required
gytis Apr 28, 2016 4:35 AM (in response to dominicalston)Dominic, could you share your code, please? Because I'm running the quickstart with the debugger and NarayanaXAConnectionFactoryWrapper.wrapConnectionFactory is invoked.
-
55. Re: Feedback on Narayana Spring integration required
dominicalston Apr 28, 2016 8:19 AM (in response to gytis)Hi Gytis. I've worked out what the problem was. I wasn't using a JMS broker that had a set of auto configure classes (IBM WebsphereMQ) and hence a XAConnectionFactoryConfiguration class, which would define a bean that would invoke the wrapConnectionFactory method.