Transaction Time Out


EJB programming & troubleshooting: Transaction Time Out

  1. Transaction Time Out (2 messages)



    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

    Threaded Messages (2)

  2. Transaction Time Out[ Go to top ]

    Most probably, it has to do with the configuration of "max instances of the entity bean in the pool". This value is configured in the application server specific deployment descriptor (In your case JBOSS).

    Look into JBOSS specific delpoyment descriptor and the corresponding parameter which configures this value.

    Most probably this value is set to 40 by default in your app. server. Increasing this number should solve your problem.

    In production, you will have to configure this value based on how many records will typically be retrievd by your application.

  3. Transaction Time Out[ Go to top ]

    In my case, the max values of instances is set to 100. So i guess thats not the problem.

    I am running the server as a test server in my lab .. its not production quality. It is a 1.6 GHz P4 384 MB

    Well even if its becuz of server capacity (dont know if thats exact reason) i want to be able to solve this. How can i over come this situation ?


    Meka Toka