• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)
OCUP UML fundamental and ITIL foundation
Jan Cumps wrote:You will be able to handle 40 concurrent requests (if there are no other limiting pieces in your application and architecture). The other requests will wait until connections are returned to the pool.
Did you get a requirement of how soon the 800 concurrent requests have to be finished?
• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)
Depends on the connection pool library you are using. For the Apache Commons DBCP, this is set by the maxWait parameter.Vikrama Sanjeeva wrote:... I want to know how request will wait ? Means
1: user has submitted request
2: application received request, but no connection available
Now how long user/request will wait ? Where we can set the waiting time ? ....
Can you give us the details on that error?Vikrama Sanjeeva wrote:... In my case, I am getting ReadTimeOut error when no connections available....
OCUP UML fundamental and ITIL foundation
Jan Cumps wrote:Depends on the connection pool library you are using. For the Apache Commons DBCP, this is set by the maxWait parameter.
Jan Cumps wrote:Can you give us the details on that error?
• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)
That lookup you do is to find a database connection pool that is configured somewhere (in your application sever maybe?) .Vikrama Sanjeeva wrote:...We are not using any specific library at application level for connection pooling. We are using JDBC and doing Lookup on database which is maintaining a pool of connections.
Can you show us the outline of how you get the connection, what you do with it, and how you return it to the pool?Vikrama Sanjeeva wrote:...3rd request got error: SEVERE: java.sql.SQLException: Attempt to use a closed handle : 'oracle_jdbc_driver_LogicalConnection_Proxy@aaa205'. ...
OCUP UML fundamental and ITIL foundation
Jan Cumps wrote:That lookup you do is to find a database connection pool that is configured somewhere (in your application sever maybe?)
Jan Cumps wrote:Can you show us the outline of how you get the connection, what you do with it, and how you return it to the pool?
• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)
OCUP UML fundamental and ITIL foundation
OCUP UML fundamental and ITIL foundation
Jan Cumps wrote:Do you hold a reference to the pooled connection somewhere in your class?
In that case, if you call: if (connection == null || connection.isClosed() ...
The connection will not be null, because it still exists in the pool, and you don't set the variable to null after closing..
The connection is not closed, because calling close() on a pooled connection does not close the connection, but returns the still open connection to the pool.
You have a finally block without a try block. Does that ever execute?
• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)
Answer to both points is: no....
connection is available for GC (my understanding) JDBCCloser.close(connection): is suppose to close connection and return the connection back to the pool. This is JDBCCloser.close(con...) ...
OCUP UML fundamental and ITIL foundation
Jan Cumps wrote:
Answer to both points is: no....
connection is available for GC (my understanding) JDBCCloser.close(connection): is suppose to close connection and return the connection back to the pool. This is JDBCCloser.close(con...) ...
1: The connection is not available for garbage collection. It is returned to the pool, and will remain a living object.
2: calling close() on a pooled connection does *not* close it. It sends the connection back to the pool, without closing it.
• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)
OCUP UML fundamental and ITIL foundation
Jan Cumps wrote:No. You don't want to *really* close the connection. That is the whole point of a connection pool. It is a pool of open connections.
• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)
catch it before it slithers away! Oh wait, it's a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
|