File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Weblogic 6.0 connection get stuck Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Weblogic 6.0 connection get stuck" Watch "Weblogic 6.0 connection get stuck" New topic
Author

Weblogic 6.0 connection get stuck

zan zang
Greenhorn

Joined: Jan 15, 2008
Posts: 6
Hi All,

I hope someone can help me with an issue when I have my EJB talk to Oracle DB by weblogic 6.0 connection pool.

My sql data query takes around 15 minutes to finish(I have tested with JDBC to run the query, it works). but when I do the same sql query via connection pool, it just stuck there forever.
I have checked the database that the query has been finished in 15 minutes but somehow connection pool does not return the result to Java.

I think it might be the problem that webloigc 6.0 has considered the connection as a "stuck thread" (http://edocs.bea.com/wls/docs70/perform/WLSTuning.html#1125714)
But the thing is that document is for weblogic 7.0 and I am using 6.0 at the moment, can someone help me please.

Thanks a lot!

Cheers,
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Have you tried running the query with nothing else on the server.

Have you tried a small SQL query to verify that the Connection pool is functioning.

What driver are you using?

What timeouts have you set?

What is the code which does the query?

Also, WebLogic Server 6.0 is now very old, can you upgrade to 10?


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
zan zang
Greenhorn

Joined: Jan 15, 2008
Posts: 6
Hi Roger,

Thanks for the reply,

Have you tried a small SQL query to verify that the Connection pool is functioning. Yes I did, and it works.

What driver are you using? I am using Oracle JDBC driver classes12.jar which works for all the other SQL query

What timeouts have you set? I don't know where I can set the timeout, but I have set the following:
Login Delay Seconds:0
Refresh Period:20 minutes
Shrink Period:30 minutes

What is the code which does the query? I am calling from Toplink with this API: executeQuery(query, arguments); As I said, all the other query work but just this one get stuck because it takes database more than 15 minutes to finish

Also, WebLogic Server 6.0 is now very old, can you upgrade to 10? No I cannot since I am not the boss and the application is very old.
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Another question: are you doing a read-only query. If not, what sort of transaction do you have. OK, that was two questions ...

Post the code which is failing.

Also, check the WebLogic Server logs and post any relevant entries such as stacktraces.
zan zang
Greenhorn

Joined: Jan 15, 2008
Posts: 6
Hi,

Yes, I am doing a read only query.

I think I have found the reason. It is because my SQL query takes more than 15 minutes to finish but weblogic has the capability to monitor all the thread, if a thread does not get a response in 10 minutes, weblogic will consider it as "stuck thread".

The solution is to either set the maximun idel time longer or stop having weblogic handle the connection. However, weblogic 6 does not have the option to change the default idel time (Which weblogic 7 does!), I just create my own JDBC connection to the database and the problem has been resolved.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Weblogic 6.0 connection get stuck
 
Similar Threads
getting errors while running duke's bank application
using DataSource in WebLogic to access DB2
How to make a data source connection without writing a User name & Password and the -ds.xml file
equivalent query
Trying to make a connection pool with WebLogic 6.1 and SQL Server 2000