[JBoss JIRA] (JBTM-3162) Remove superfluous double check at validTransaction method
by Ariel Carrera (Jira)
[ https://issues.jboss.org/browse/JBTM-3162?page=com.atlassian.jira.plugin.... ]
Ariel Carrera edited comment on JBTM-3162 at 7/24/19 10:31 AM:
---------------------------------------------------------------
I committed the changes in a fork. Tell me if you need a junit test for these little lines removed that doesn't change any function.
was (Author: arielcarrera):
I created the ticket and committed changes in a fork. Tell me if you need a junit test for these little lines removed that doesn't change any function.
> Remove superfluous double check at validTransaction method
> ----------------------------------------------------------
>
> Key: JBTM-3162
> URL: https://issues.jboss.org/browse/JBTM-3162
> Project: JBoss Transaction Manager
> Issue Type: Enhancement
> Components: Transactional Driver
> Affects Versions: 5.9.5.Final
> Reporter: Ariel Carrera
> Priority: Trivial
>
> There is a superfluous check at BaseTransactionalDriverXAConnection.validTransaction method.
> {code:java}
> public final boolean validTransaction(javax.transaction.Transaction tx) {
> boolean valid = true;
> if (_theTransaction != null) {
> valid = _theTransaction.equals(tx);
> * if (!valid) {
> valid = _theTransaction.equals(tx);
> } *
> }
> return valid;
> }
> {code}
> link:
> [github|https://github.com/jbosstm/narayana/blob/9f42d45b664483c9f0e17cb20...]
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 6 months
[JBoss JIRA] (JBTM-3161) Nested LRA doesn't start in the Spring Boot + JAX-RS application
by Matej Kralik (Jira)
Matej Kralik created JBTM-3161:
----------------------------------
Summary: Nested LRA doesn't start in the Spring Boot + JAX-RS application
Key: JBTM-3161
URL: https://issues.jboss.org/browse/JBTM-3161
Project: JBoss Transaction Manager
Issue Type: Bug
Reporter: Matej Kralik
Attachments: flight.zip
For demonstrating purpose, I migrated flight service from [narayana quickstart|https://github.com/jbosstm/quickstart/tree/master/rts/lra/flig...] to the Spring Boot application and uploaded it to the attachment.
When I stop debugger in the original swarm flight service (FlightParticipant [line 64|https://github.com/jbosstm/quickstart/blob/3b848517086c2abc32bff6895b2...]), the *_@HeaderParam(LRA_HTTP_CONTEXT_HEADER) String lraId_*, is new for that service. When I stop debugger in the SpringBoot+JAX-RS, the lraId is the same as for a parent. It looks that the _ServerLRAFilter_ doesn't start the new LRA.
I add a breakpoint to the *_ServerLRAFilter.filter(...)_* to see when the filter is applied and create new LRA before the JAX-RS method. When I call original swarm flight service, the filter is used however when I call SpringBoot flight service, the filter is not used so it looks that the filter is not used at all in the SpringBoot+JAX-RS application.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 6 months
[JBoss JIRA] (JBTM-3160) Start LRA returns first URI all the time
by Matej Kralik (Jira)
Matej Kralik created JBTM-3160:
----------------------------------
Summary: Start LRA returns first URI all the time
Key: JBTM-3160
URL: https://issues.jboss.org/browse/JBTM-3160
Project: JBoss Transaction Manager
Issue Type: Bug
Components: LRA
Reporter: Matej Kralik
Assignee: Michael Musgrove
Attachments: reporoducer-source.zip, reproducer.jar
The function {code:java}lraNarayanaLRAClient.startLRA(...){code} doesn't return the new URI but the URI of the first transaction all the time even though the first transaction is already closed. This happens only with coordinator 5.9.6-SNAPSHOT. For coordinator 5.9.5-Final, the function returns new URI all the time.
So when I run this code more times, the function returns the same URI all the time. In the second iteration, the URI which is returned from the startLRA() is the same as in the first iteration. That transaction is already closed so the closeLRA() failed.
{code:java}
for (int i = 0; i < 10; i++) {
URI uri = null;
uri = lraClient.startLRA(getClass().getCanonicalName() + i);
lraClient.closeLRA(uri);
}
{code}
I uploaded reproducer for it. It is spring boot application which compares returned URI from the startLRA() and the URI which is on the `http://localhost:8080/lra-coordinator`
For debugging, just import source project to IDE (I use Intelij IDEA) and run/debug _TestingApplication_.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 6 months
[JBoss JIRA] (JBTM-3150) Upgrade the version of maven that we use to build with and migrate from swarm to thorntail
by Thomas Jenkinson (Jira)
[ https://issues.jboss.org/browse/JBTM-3150?page=com.atlassian.jira.plugin.... ]
Thomas Jenkinson updated JBTM-3150:
-----------------------------------
Summary: Upgrade the version of maven that we use to build with and migrate from swarm to thorntail (was: Upgrade the version of maven that we use to build with)
> Upgrade the version of maven that we use to build with and migrate from swarm to thorntail
> ------------------------------------------------------------------------------------------
>
> Key: JBTM-3150
> URL: https://issues.jboss.org/browse/JBTM-3150
> Project: JBoss Transaction Manager
> Issue Type: Task
> Components: Build System
> Affects Versions: 5.9.5.Final
> Reporter: Michael Musgrove
> Assignee: Michael Musgrove
> Priority: Major
> Fix For: 5.next
>
>
> Narayana builds with version 3.3.9 of maven. This version is quite old and does not work with containers such as thorntail and quarkus. This JIRA is to upgrade our build to use version 3.6.1
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 6 months
[JBoss JIRA] (JBTM-3157) LRA participant does not respect JAX-RS path definitions
by Thomas Jenkinson (Jira)
[ https://issues.jboss.org/browse/JBTM-3157?page=com.atlassian.jira.plugin.... ]
Thomas Jenkinson commented on JBTM-3157:
----------------------------------------
See https://docs.oracle.com/javaee/7/api/javax/ws/rs/Path.html which indicates the initial slash can be ignored
> LRA participant does not respect JAX-RS path definitions
> --------------------------------------------------------
>
> Key: JBTM-3157
> URL: https://issues.jboss.org/browse/JBTM-3157
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Components: LRA
> Affects Versions: 5.9.5.Final
> Reporter: Martin Stefanko
> Assignee: Martin Stefanko
> Priority: Major
>
> When LRA participant defines paths for participant methods like this:
> {code:java}
> @PUT
> @Path("compensate")
> @Compensate
> public void compensate((a)HeaderParam(LRA.LRA_HTTP_CONTEXT_HEADER) URI lraId) {
> System.out.println("Compensate: " + lraId);
> }
> {code}
> instead of:
> {code:java}
> @PUT
> @Path("/compensate")
> @Compensate
> public void compensate((a)HeaderParam(LRA.LRA_HTTP_CONTEXT_HEADER) URI lraId) {
> System.out.println("Compensate: " + lraId);
> }
> {code}
> The participant methods are never executed because the constructed URL is not valid. However, even the first code snippet is still a valid JAX-RS resource definition and thus it should be respected.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 7 months