-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Srikanth,

On 11/15/13, 2:36 AM, Srikanth wrote:
> I was unwrapping each connection before returning it using the
> below piece of code.
> 
> con =
> ds.getConnection().unwrap(oracle.jdbc.OracleConnection.*class*);
> 
> *return* con;
> 
> As explained by you, this is where the problem was.

That will definitely do it. You end up closing the underlying
connection to the DB and never returning the real object to the pool
(unless you are managing the relationship between pooled-connections
and unwrapped-connections).

> I needed a OracleConnection in some parts of my application as I
> was creating ArrayDescriptor, which failed when I passed the proxy
> Connection.

I have yet to see a use case where downcasting to Oracle's Connection
is truly required. What can't you do with the JDBC API?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJShijSAAoJEBzwKT+lPKRYpmgP/0mQ667wWM8RvdCK+/YOafO4
Xb3o8B2/cfnIRohoAnQPeLnq0O6eP7xlAG+GNi8cB3iS3EilJY9YqwCrIAaFML82
cR095yVUgR69oiL6oZFwR6UrONzf6ow7vu0QkQhm8MqFQKrvso21Q96A8ypdPizg
M7TPVfKYGTeD5Ug3SGMkCIPfLOHE+rDdqggKX7eaIf+2kh4yTufHzjXSRu2xSvwE
8Qf1nByMMXjnD8OJ02Td2tgMR6FG4drICCjJdZPpdM1LRmTmz3NqRd8ZiXJDd7vC
Bng/u/+N3pMoP1XrYguhRI+Riskr1rKHXB2e2ldszqGP1CiyG/1RVeRwAKLoYzZp
gv63e7FPtw6MXpPYL/ToACOecxqTPJmVGhmR9JPTxHOcyigQ1IRt4xgUbzqPK0MO
raI90wIPO5LspR/ToptrS8KzZQwOLDEsT33G4UUzyFiYqqX0ZtLoIqB5KKMITphW
JCUehv3fzIyd4A5vdBGoRtN+GXKgHrIgrC7la2WPScFc5TtxF82hV79ntZwY18Nw
JEp7AFJFnzUctWzsSuAzK46+4moUfN3x0j+hUE2OfjL3NUDg+5cyqdiAc/OuEiZD
d4WFIO8CqLIivH3eNY88phtyF6s3wRMMeinaL4dRz036/xU6EUrAsp1DN+Z4iUKR
wrtS2cBs0ZWjl7f1mBjN
=KEnf
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to