[
http://jira.jboss.com/jira/browse/JBTM-116?page=comments#action_12343733 ]
Kevin Conner commented on JBTM-116:
-----------------------------------
Okay, just looked at the code again and I missed a step.
Setting the default timeout to 0 means that it defers to the default timeout in the
property file.
So
-1 = don't call the reaper (no timeout)
0 = don't replace the property file value (i.e. use the property default)
0 = timeout
So the code in the mbean should read
public void setTransactionTimeout(int timeout) throws javax.transaction.SystemException
{
if (timeout != 0)
{
TxControl.setDefaultTimeout(timeout);
}
}
Ignore 0 and set the others.
setting of default timeout logic broken in mbean
------------------------------------------------
Key: JBTM-116
URL:
http://jira.jboss.com/jira/browse/JBTM-116
Project: JBoss Transaction Manager
Issue Type: Task
Security Level: Public(Everyone can see)
Components: JTA Implementation
Affects Versions: 4.2.1
Reporter: Mark Little
Assigned To: Kevin Conner
Fix For: 4.2.2
The mbean code for setting the default timeout says:
public void setTransactionTimeout(int timeout) throws javax.transaction.SystemException
{
if (timeout > 0)
{
TxControl.setDefaultTimeout(timeout);
}
else
throw new javax.transaction.SystemException("Transaction Timeout <
0");
}
This means that it's not possible for anyone to provide a value of -1, which means:
transactions never timeout. Also, the if clause should say >= 0 if the else clause is
to be accurate.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira