+1  A: 

The timeout needs to be set before the transaction is started.

instead of

tran = dbSession.beginTransaction();
tran.setTimeout(10);// 10 seconds

try

tran = dbSession.getTransaction();
tran.setTimeout(10);
tran.begin();
JMM
Sorry of the late response. I was pulled out to work on another task. I tried out as per your suggest. Unforunately, the timeout setting does not work for the "saveOrUpdate" method. The timeout setting works for "select for update". I am confused as to why it behaviours in this manner.
chinhw
A: 

you can see that

http://community.jboss.org/wiki/TransactionTimeout

Dorra