[JBoss JIRA] Created: (JBAS-5042) forceClearOnShutdown
by Adrian Brock (JIRA)
forceClearOnShutdown
--------------------
Key: JBAS-5042
URL: http://jira.jboss.com/jira/browse/JBAS-5042
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: JCA service
Affects Versions: JBossAS-4.2.3.GA
Reporter: Adrian Brock
An undocmentated feature has been added to the jms rar in 4.2.3
"forceClearOnShutdown".
Sadly it doesn't work properly. This needs fixing, documentating and testing.
It should also be made the default since we don't want to wait forever when we stop an MDB.
If an MDB doesn't shutdown in the time then we should log a warning.
Discussion from the mailing list:
"
c) forceClearOnShutdown, et. al.
The idea looks good, but the implementation is rubbish.
It shows a fundamental misunderstooding on how the pool works.
The notification happens once for each session that ends
(and hence so does your loop).
In practice with the default config, it will leave
the loop after the first session ends (almost immediately) when in the
default config there are still 14 other sessions to go.
A 1 second default wait is also unrealistic. Many people have MDBs
that take longer than this to process something.
In fact, this should be the default behaviour (but with different
configuration). Nothing should wait forever! :-)
The defaults should be specified in conf/standardjboss.xml
and the ejb3 equivalent aop interceptors file such that
users can easily change them.
"
--
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
17 years
[JBoss JIRA] Created: (JBAS-5040) Locked entities won't be released correctly after transaction timeout
by Christian Michels (JIRA)
Locked entities won't be released correctly after transaction timeout
---------------------------------------------------------------------
Key: JBAS-5040
URL: http://jira.jboss.com/jira/browse/JBAS-5040
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Transaction Manager
Affects Versions: JBossAS-4.2.2.GA
Reporter: Christian Michels
Assigned To: Adrian Brock
When locking an entity in a (outer) user transaction and trying to lock the same entitity in a inner transaction (with a smaller txTimeout), the entity will not be released, if the inner transaction timed out.
The entity won't be released until the outer transaction timed out.
With JBoss 4.0.4, the inner transaction rollback will be resolved after a short while:
18:56:14,237 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=PCTR694/17, BranchQual=, localId=17] timed out. status=STATUS_ACTIVE
18:56:17,237 ERROR [BeanLock] Thread[RMI TCP Connection(2)-172.22.6.85,5,RMI Runtime]Saw rolled back tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=PCTR694/17, BranchQual=, localId=17] waiting for txLock
18:56:17,237 ERROR [LogInterceptor] TransactionRolledbackException in method: public abstract void kam.jbosstest.transactionlocking.LockedEntityEJBRemote.loadIntoTransaction() throws java.rmi.RemoteException, causedBy:
java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
...
e.g.
EntityLockingEJBHome entityLockingHome = (EntityLockingEJBHome) ctx.lookup("EntityLockingEJB");
kam.jbosstest.transactionlocking.EntityLockingEJBRemote entityLockingRemote = entityLockingHome.create();
LockedEntityEJBHome lockedEntityHome =
(LockedEntityEJBHome) ctx.lookup("LockedEntityEJB");
LockedEntityEJBRemote entity = null;
try {
entity = lockedEntityHome.findByPrimaryKey(1);
} catch (FinderException e) {
throw new Exception(e);
}
UserTransaction ut = (UserTransaction) ctx.lookup("UserTransaction");
ut.setTransactionTimeout(10);
System.out.println("Starting transaction (timeout=10s)...");
Date start = new Date(System.currentTimeMillis());
ut.begin();
System.out.println("Date:" + start);
System.out.println("...locking entity in client context...");
entity.loadIntoTransaction();
try{
System.out.println("...trying to lock the same entity in a new transaction with 2s txTimeout...");
entityLockingRemote.lockResource(1, 2);
}catch(Exception e){
e.printStackTrace();
}
Date end = new Date(System.currentTimeMillis());
System.out.println("Application was locked for: " + (end.getTime() - start.getTime()) + "ms instead of about 2s");
--
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
17 years
[JBoss JIRA] Created: (JBAS-5037) Unable to handle timed out user transactions without getting an exception
by Christian Michels (JIRA)
Unable to handle timed out user transactions without getting an exception
-------------------------------------------------------------------------
Key: JBAS-5037
URL: http://jira.jboss.com/jira/browse/JBAS-5037
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Transaction Manager
Affects Versions: JBossAS-4.2.2.GA
Reporter: Christian Michels
Assigned To: Adrian Brock
When getting an user transaction timeout, the transaction will be rolled back immediately (in JBoss 4.0.4 it is just marked for roleback). It's not possible to handle the transaction without getting an exception:
- calling 'roleback', 'commit' etc. --> IllegalStateException : The transaction is not active!
- ignoring --> Application error (ERROR [TxInterceptorBMT] Application error: BMT stateless bean TestBean should complete transactions before returning (ejb1.1 spec, 11.6.1), suspended tx=TransactionImple < ac, BasicAction: -53e9f9ab:f44:473af993:31 status: ActionStatus.ABORTED >)
--
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
17 years