Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Oracle/JAVA Connections

Re: Oracle/JAVA Connections

From: Giovanni Cuccu <giovanni.cuccu_at_gmail.com>
Date: Wed, 1 Jun 2005 18:02:53 +0200
Message-ID: <23e0d117050601090222cc6e36@mail.gmail.com>


Hi,
 comments inline.=20
> All -

>=20

> 1. When we try the dedicated connections (no pooling), the app starts
> up and the first user logs in fine. They retrieve and all is fine. The
> same person logs in again in new and 2nd browser, the connection is made
> just fine. But when we logout, just the last connection shows as being
> disconnected fro Oracle. The other connection is left as orphan. The
> orig browser can no longer function and needs to be closed. What are we
> missing? Do we need to name each connection uniquely and call the close
> for each one as they close? I thought Java would attach one connection
> to each session and close it when requested.

When you use a dedicated connection it just means (at least to me) that you have a single private connection for each 'user'. In this case user can be a (servlet) session on the server. It's up to you to save and restore the connection in the user session when needed and to close when the user logs out.

>=20

> 2. When we use connection pooling, the pool is defined as Dynamic and
> using the OracleImpl. We connect outside the pool first to be sure of
> good login. Once we have good login we move the connection to the pool
> and getConnection. This disconnects the orig connection and is added to
> the pool. This works great. Now we try to login incorrectly the first
> time. This works and prompts you telling us to 'Login with Correct
> Username/password'. But if we give it a correct set of
> username/password then it returns database error. It seems as though it
> keeps the error in memory for that userid. We can go out and whack the
> Work files for Tomcat and force it to re-compile and then it works great
> the first time. We change the struts-config to not cache but it still
> did it. We then tried to check with the Tomcat Admin to see if he knew
> of a caching parm for Tomcat. He said 'Not that he knew of.' Is there
> a parm for Tomcat to force re-compile each time? Are we missing
> something else? Any help would be appreciated.

Can you post some sample code that lease/release the db connection in order to have a better idea of what is happening inside tomcat?

Giovanni
> --
> http://www.freelists.org/webpage/oracle-l
>=20

--=20



Another free oracle resource profiler
http://sourceforge.net/projects/oraresprof/ New version 0.8 with many bug fixes
and warnings on file truncated, timed_statistics=3Dfalse, incorrect tracing deactivation and more
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 01 2005 - 12:08:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US