File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Transaction time out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction time out" Watch "Transaction time out" New topic

Transaction time out

meka toka
Ranch Hand

Joined: Dec 11, 2002
Posts: 75
JBoss 3.0.6, EJB 2.0, CMP 2.0
Transaction is failing when trying to retrieve data with many records. It times out or rolls back
I have a session bean A that needs to return some results packaged in a stub to the client. It gets the results by using a finder method on an entity bean.
Each of the record contains 3 CMF's of type What i noticed is if the finder method yields more than 40 records i get a transaction roll back or timed out.
The finder method returns a collection, i can even print the size of the collection as below,
Collection coll = sessionBean.findByXYZ(xyz);
System.out.println("The size of collection is " + coll.size() );
I can even get the local interface objects from the collection but cant seem to do any more operation on that object
Can somebody point me in right direction ? Also is there a way i can get only a part of the result set ? As i am using CMP i assume i will not have flexibility to get only a fixed number of records ?
Also, i know about increasing the transaction time out in the xml files but wouldnt really help me, cuz there might be any number of records resulting from finder method

Meka Toka

Thanks<br />MekaToka<br />SCJP 1.4
I agree. Here's the link:
subject: Transaction time out
It's not a secret anymore!