In the statefull session beans deployment descriptor, i mentioned session timeout 20 secs. But my Transaction is running more than 20 secs.. Whether it throws System exception / Application exception ?
If bean is in Transaction, Container does not persist the bean or remove bean from pool, even you set timeout. Use web containter maintain the session invalidation to solve this problem.
Or you can keep the wait time in session bean, you can know when the session begins transaction by checking afterBegin() method of SessionSynchronization interface (In case of CMP only). Wait for certain time and roll back transaction EJBContext.setRollbackOnly().
In case of BMT you can roolback your tranasaction by explicitly calling rollback after certain time.
Using session management at webcontainer level is better stretegy.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop