wood burning stoves 2.0*
The moose likes Web Services and the fly likes Web -Services connection Handling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web -Services connection Handling" Watch "Web -Services connection Handling" New topic
Author

Web -Services connection Handling

Gireesh Giri
Greenhorn

Joined: Apr 23, 2010
Posts: 23
Hi All,
1. I have implemented a web service with connection pooling(oracle-ds.xml) with JBoss server. In My business class, i am getting connection from pool and performing 4 to 5 DB operations, at last closing connection, statements and result set. It is working fine for one request.
2.If i tried for concurrent requests (Consider 5) only 1 or 2 processed, remaining failed with several reasons like (connection closed, statement closed, unusable connection, result set closed etc).
3.If i keep business class method as "synchronized" it is working fine. But it is serving only one request at a time (for concurrent request also). - This is slow downs my response time.

I came to know, This is connections problem, if one thread is doing DB operation, other thread is closing the connection or statement or result set.

Can any one help and tell me how to handle concurrent requests with out synchronized keyword.

Thanks in Advance.

 
jQuery in Action, 2nd edition
 
subject: Web -Services connection Handling
 
Similar Threads
long post IBM.158
application hangs at closing the database connection
JDBC Program Design Question
Thrad Pooling
J2EE Recommended Reading