[JBoss JIRA] (JBTM-2677) XATerminator.rollback does not invoke XAResource.rollback for failed resources when JTS is used
by Tom Jenkinson (JIRA)
[ https://issues.jboss.org/browse/JBTM-2677?page=com.atlassian.jira.plugin.... ]
Tom Jenkinson updated JBTM-2677:
--------------------------------
Fix Version/s: 5.next
> XATerminator.rollback does not invoke XAResource.rollback for failed resources when JTS is used
> -----------------------------------------------------------------------------------------------
>
> Key: JBTM-2677
> URL: https://issues.jboss.org/browse/JBTM-2677
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Components: JTS
> Affects Versions: 5.2.16.Final
> Reporter: Ondra Chaloupka
> Assignee: Tom Jenkinson
> Fix For: 5.next
>
>
> I do experience an issue of not rollbacking failed XAResource when XATerminator.rollback is called on jca inflow transaction. This works wrong when JTS is used. For the same testcase when JTA is used all in-doubt XAResources are rolled back.
> The scenario is following:
> There is a a test RA which drives an inflow transaction to a MDB. MDB then works with two TestXAResources which are enlisted to the supplied transaction.
> # RAR is deployed
> # RAR opens a java socket where listens for message
> # MDB of TestResourceMessageListener is deployed
> # test client sends prepare command
> # test client sends commit command
> # first TestXAResource commits, second TestXAResource throws XAException.XAER_RMFAIL
> # test client receives error code XAER_RMFAIL
> # test client sends recover command
> # test client receives number of in-doubt xid - which is one
> # test client sends rollback command
> # XATerminator calls rollback on the in-doubt xid
> # expecting TestXAResource.rollback would be called
> After the XATerminator.rollback is invoked there is no call of rollback for the unfinished XAResource. I can see that abort phase is invoked [1] (see attached jboss eap server.log) but the real invocation of the XAResource.rollback does not happen (for the JTA transaction it runs fine).
> [1]
> {code}
> 2016-05-18 11:20:20,385 TRACE [com.arjuna.ats.jts] (default-threads- 1) ServerTransaction::doPhase2Abort (0:ffff7f000001:-728dfa93:573c33bc:24 )
> 2016-05-18 11:20:55,416 TRACE [com.arjuna.ats.jts] (default-threads- 1) ArjunaTransactionImple::get_status for 0:ffff7f000001:-728dfa93:573c33bc:24 returning CosTransactions::StatusCommitted
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
7 years, 11 months
[JBoss JIRA] (JBTM-2677) XATerminator.rollback does not invoke XAResource.rollback for failed resources when JTS is used
by Tom Jenkinson (JIRA)
[ https://issues.jboss.org/browse/JBTM-2677?page=com.atlassian.jira.plugin.... ]
Tom Jenkinson commented on JBTM-2677:
-------------------------------------
public final int doPhase2Abort ()
{
if (jtsLogger.logger.isTraceEnabled()) {
jtsLogger.logger.trace("ServerTransaction::doPhase2Abort ( "
+ get_uid() + " )");
}
/*
* If the transaction has already terminated, then return the status. If
* there hasn't been a heuristic outcome then we try to massage the result
* to be consistent with what the caller expects: the fact that the
* transaction is marked as committed during prepare without any problems means
* that the intentions lists are zero so it's fine to say that it aborted instead.
*/
org.omg.CosTransactions.Status s = get_status();
if ((s == org.omg.CosTransactions.Status.StatusCommitted)
|| (s == org.omg.CosTransactions.Status.StatusRolledBack))
{
int status = finalStatus();
switch (status)
{
case ActionStatus.COMMITTED:
case ActionStatus.COMMITTING:
case ActionStatus.ABORTED:
case ActionStatus.ABORTING:
return ActionStatus.ABORTED;
default:
return status;
}
}
This was changed in https://issues.jboss.org/browse/JBTM-507. I have had a look at the mentioned particular test if we just return finalStatus it seems to still pass so I think the change may likely be safely reverted.
Prototype: https://github.com/jbosstm/narayana/pull/1019
> XATerminator.rollback does not invoke XAResource.rollback for failed resources when JTS is used
> -----------------------------------------------------------------------------------------------
>
> Key: JBTM-2677
> URL: https://issues.jboss.org/browse/JBTM-2677
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Components: JTS
> Affects Versions: 5.2.16.Final
> Reporter: Ondra Chaloupka
> Assignee: Tom Jenkinson
> Fix For: 5.next
>
>
> I do experience an issue of not rollbacking failed XAResource when XATerminator.rollback is called on jca inflow transaction. This works wrong when JTS is used. For the same testcase when JTA is used all in-doubt XAResources are rolled back.
> The scenario is following:
> There is a a test RA which drives an inflow transaction to a MDB. MDB then works with two TestXAResources which are enlisted to the supplied transaction.
> # RAR is deployed
> # RAR opens a java socket where listens for message
> # MDB of TestResourceMessageListener is deployed
> # test client sends prepare command
> # test client sends commit command
> # first TestXAResource commits, second TestXAResource throws XAException.XAER_RMFAIL
> # test client receives error code XAER_RMFAIL
> # test client sends recover command
> # test client receives number of in-doubt xid - which is one
> # test client sends rollback command
> # XATerminator calls rollback on the in-doubt xid
> # expecting TestXAResource.rollback would be called
> After the XATerminator.rollback is invoked there is no call of rollback for the unfinished XAResource. I can see that abort phase is invoked [1] (see attached jboss eap server.log) but the real invocation of the XAResource.rollback does not happen (for the JTA transaction it runs fine).
> [1]
> {code}
> 2016-05-18 11:20:20,385 TRACE [com.arjuna.ats.jts] (default-threads- 1) ServerTransaction::doPhase2Abort (0:ffff7f000001:-728dfa93:573c33bc:24 )
> 2016-05-18 11:20:55,416 TRACE [com.arjuna.ats.jts] (default-threads- 1) ArjunaTransactionImple::get_status for 0:ffff7f000001:-728dfa93:573c33bc:24 returning CosTransactions::StatusCommitted
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
7 years, 11 months
[JBoss JIRA] (JBTM-2674) JTA does not set transaction timeout for XAResource for propagated transactions
by Tom Jenkinson (JIRA)
[ https://issues.jboss.org/browse/JBTM-2674?page=com.atlassian.jira.plugin.... ]
Tom Jenkinson reassigned JBTM-2674:
-----------------------------------
Assignee: David Lloyd (was: Tom Jenkinson)
> JTA does not set transaction timeout for XAResource for propagated transactions
> -------------------------------------------------------------------------------
>
> Key: JBTM-2674
> URL: https://issues.jboss.org/browse/JBTM-2674
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Components: JTA
> Reporter: Ondra Chaloupka
> Assignee: David Lloyd
>
> I can see a fact that transaction timeout is not provided by subordinate transaction when passed by ejb remote call when JTA transaction are used.
> Even when transaction timeout is defined (it could be seen that timeout is used when xaresources is used on client) the server where transaction is propagated shows xa resources using the default timeou value.
> Client server (caller) - timeout is _6 seconds_
> {code}
> 2016-05-19 11:50:51,461 TRACE [com.arjuna.ats.jta] (default task-18) XAResourceRecord.topLevelCommit for XAResourceRecord < resource:TestXAResource(TestXAResourceCommon(id:483, xid:< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000001:57a802d4:573d8c57:11, node_name=1, branch_uid=0:ffff7f000001:57a802d4:573d8c57:20, subordinatenodename=null, eis_name=java:/TestXAResource-483 >, timeout:6, prepareReturn:0)), txid:< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000001:57a802d4:573d8c57:11, node_name=1, branch_uid=0:ffff7f000001:57a802d4:573d8c57:20, subordinatenodename=null, eis_name=java:/TestXAResource-483 >, heuristic: TwoPhaseOutcome.FINISH_OK, product: Crash Recovery Test/EAP Test, jndiName: java:/TestXAResource-483 com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord@7b44816f >, record id=0:ffff7f000001:57a802d4:573d8c57:21
> {code}
> Server (callee) - uses timeout _0 seconds_
> {code}
> 2016-05-19 11:50:39,374 TRACE [com.arjuna.ats.jta] (default task-12) XAResourceRecord.topLevelPrepare for XAResourceRecord < resource:TestXAResource(TestXAResourceCommon(id:502, xid:< formatId=131077, gtrid_length=29, bqual_length=37, tx_uid=0:ffff7f000001:57a802d4:573d8c57:11, node_name=1, branch_uid=0:ffff7f000001:3b603de1:573d8c5f:17, subordinatenodename=2, eis_name=java:/TestXAResource-502 >, timeout:0, prepareReturn:0)), txid:< formatId=131077, gtrid_length=29, bqual_length=37, tx_uid=0:ffff7f000001:57a802d4:573d8c57:11, node_name=1, branch_uid=0:ffff7f000001:3b603de1:573d8c5f:17, subordinatenodename=2, eis_name=java:/TestXAResource-502 >, heuristic: TwoPhaseOutcome.FINISH_OK, product: Crash Recovery Test/EAP Test, jndiName: java:/TestXAResource-502 com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord@4f35ed3f >, record id=0:ffff7f000001:3b603de1:573d8c5f:18
> {code}
> Scenario that I'm running is
> # enlist jms xa resource on client
> # call to second server, it means enlist ejb remoting xa resource to transaction
> # enlist test xa on server
> # enlist jms xa resource on server
> # enlist test xa on client
> # starting 2PC
> # prepare jms xa resource on server
> # prepare ejb remoting xa resource on server
> # prepare test xa resource on client
> # transaction timeout is hit
> # if underlying jms resource timeouts then XAResource.prepare call fails with XAER_NOTA and the whole transaction is rolled back
> #
> _(attaching server.log files for EAP 7.0.0/Narayana 5.2.16.Final where jbossts is caller and jbossts2 is callee)_
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
7 years, 11 months
[JBoss JIRA] (JBTM-2684) Connection pooling for JBossTS Narayana
by Tom Jenkinson (JIRA)
[ https://issues.jboss.org/browse/JBTM-2684?page=com.atlassian.jira.plugin.... ]
Tom Jenkinson closed JBTM-2684.
-------------------------------
Resolution: Won't Fix
As discussed on the forum, this is by design. If you have a pull request to address this we can reopen this issue but its not something we are looking at implementing at this point in time so I will close it for now.
> Connection pooling for JBossTS Narayana
> ---------------------------------------
>
> Key: JBTM-2684
> URL: https://issues.jboss.org/browse/JBTM-2684
> Project: JBoss Transaction Manager
> Issue Type: Enhancement
> Components: JTA
> Affects Versions: 5.2.9.Final
> Reporter: Abhijeet Kumar
>
> Hi,
> I'm using JBossTS (Narayana) version 5.2.9 Final. There is no supports for connection pooling through the TransactionDriver. Establishing new physical connection for every transaction will slow down my production service.
> Can you please guide me to develop a custom wrapper around the TransactionalDriver of Narayana?
> I'm using Apache Tomcat JDBC 8 for connection pooling. I'm also using MysQL as DBServer and MySQLXADataSource as the XADatasource for the TransactionalDriver.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
7 years, 11 months
[JBoss JIRA] (JBTM-2621) Tests that rely on the old perf benchmark harness need porting to use JMH
by Tom Jenkinson (JIRA)
[ https://issues.jboss.org/browse/JBTM-2621?page=com.atlassian.jira.plugin.... ]
Issue was automatically transitioned when Tom Jenkinson created pull request #1018 in GitHub
--------------------------------------------------------------------------------------------
Status: Pull Request Sent (was: Open)
> Tests that rely on the old perf benchmark harness need porting to use JMH
> -------------------------------------------------------------------------
>
> Key: JBTM-2621
> URL: https://issues.jboss.org/browse/JBTM-2621
> Project: JBoss Transaction Manager
> Issue Type: Task
> Components: Performance Testing
> Affects Versions: 5.2.13.Final
> Reporter: Michael Musgrove
> Assignee: Michael Musgrove
>
> The relevant tests are:
> com.hp.mwtests.ts.jts.orbspecific.local.performance.Performance1
> com.hp.mwtests.ts.jts.orbspecific.local.performance.Performance2
> com.hp.mwtests.ts.jts.orbspecific.local.performance.Performance3
> if there are no others then once ported the old performance benchmark harness can be removed.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
7 years, 11 months