File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Database timeout settings 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 "Database timeout settings" Watch "Database timeout settings" New topic
Author

Database timeout settings

Kris Philippaerts
Greenhorn

Joined: Oct 19, 2001
Posts: 25
Probarbly an easy question:

we have a query that performs some joins on big tables. When we execute it on our Informix database, it takes quite a while to execute. We had the query analyzed by our Informix specialists, but they say there are no big optimizations left.

When we use the query in our J2EE application (on Bea Weblogic 8.1), the application fails with a TimeOutException, and rolls back the transaction. The same application deployed at an other site with a smaller database does everything perfect.

The header of the exception is:



So my question is: how can I increase the timeout of.. I don't know, my beans? My connection? My...? Is this ejb-jar.xml configuration? Or application server configuration?

Any pointers are welcome!

Thanks a lot for your time!

Kris

----------------------

I just found out that bea weblogic default timout is 300 seconds. How come I get a timeout after 29 seconds? Can this also be a database setting?
[ April 21, 2005: Message edited by: Kris Philippaerts ]
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Kris,

You have two options here:
  • Check the <trans-timeout-seconds> element in weblogic-ejb-jar.xml.
  • Set the Timeout Seconds parameter for the JTA service using weblogic console (using wl console click on Services/JTA and see the JTA tab).


  • The first option will affect only the trans timeout for the bean(s) that give you trouble, while the second one will affect all transactions in your system. I would recommend the first choice, but you could test both of them and make sure that 1 overrides 2.

    I just found out that bea weblogic default timout is 300 seconds. How come I get a timeout after 29 seconds? Can this also be a database setting?

    It�s actually 30 seconds.
    Regards.


    I think, therefore I exist -- Rene Descartes
    Kris Philippaerts
    Greenhorn

    Joined: Oct 19, 2001
    Posts: 25
    Great! Thanks a lot. I'll have to think which option to choose, since the application runs at two sites. So I might want to leave the configuration as much applicationserver-sided as possible. But at least I can do some testing now.

    Really appreciate your help!

    Kris
    Valentin Tanase
    Ranch Hand

    Joined: Feb 17, 2005
    Posts: 704
    You're very welcome Kris
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Database timeout settings
     
    Similar Threads
    Transaction Timeout on Websphere
    Configuring transcation timeouts
    Transaction Timeout Issue - Weblogic
    Delete cached data and load from database
    EJB jar file Times Out - Poor System Performance in weblogic