[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 …
[View More]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)
[View Less]
5 years, 8 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}…
[View More]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)
[View Less]
5 years, 8 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/…
[View More]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)
[View Less]
5 years, 9 months