views:

663

answers:

2

The oracle data source is returning null connection when the no of connection request is more. I have the implict cache enabled.The oracle specs says null is returned only is ConnectionWaitTimeout is set. I do not have a value set for ConnectionWaitTimeout in the cache properties.

This is what the spec says about

ConnectionWaitTimeout

Specifies cache behavior when a connection is requested and there are already MaxLimit connections active. If ConnectionWaitTimeout is greater than zero, then each connection request waits for the specified number of seconds or until a connection is returned to the cache. If no connection is returned to the cache before the timeout elapses, then the connection request returns null.

Default: 0 (no timeout)

What are other possiblies where the Datasource could return a null connection?

+1  A: 

I think the default may vary depending on what version of Oracle you are using. Some of the information is contradictory, e.g. Oracles "Optimizing Connection Pool Behavior" implies the default is 3 seconds (11g?) wheras other sources state that it is zero as mentioned in the question.

I'd suggest explicitly setting it to zero and see if the behavior still manifests itself.

BenM
A: 

I tried setting this value. Though the docs says the default is no time out, when I was not setting this property the datasource was returning null.. When I explicitly specified a value the connection was waiting, even the value to 0 was giving me a null connection.

Java Guy