I have a piece of code as below in a DAO which is called by
a stateless bean UserMgrBean:
Get Connection from TxDataSource;
while enumeration has more elements
For the enumeration entry, Insert row into table T1;
The problem I am facing is when the enumeration has like 20000 entries, obviously the while loop lasts more than 30 seconds and hence my bean fails with following server log:
....... .. Exception Message - The transaction is no longer active
(status = Marked rollback. [Reason = weblogic.transaction.internal.TimedOutException: Transaction timed out after 31seconds
tx = transaction=(IdHash=5834535,Name = [EJB UserMgrBeanImpl.addUserObject()],Xi
onds since begin=31,seconds left=30,activeThread=Thread[ExecuteThread: '13' for
queue: 'default',5,Thread Group for Queue: 'default'],ServerResourceInfo[weblogi
()], weblogic.jdbc=t3://172.24.4.97:7001}))]). No further JDBC access is allowed
within this transaction.
Does Anyone know how to overcome this problem.