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: <ryan_gaffuri_at_comcast.net>
Date: Wed, 01 Jun 2005 16:52:03 +0000
Message-Id: <060120051652.18980.429DE7B30008025200004A242205886014079D9A00000E09A1020E979D@comcast.net>


I don't know struts well, but I do know it's a view level architecture and should have nothing to do with your connections to the database. It's basically used to manage flow of control of your screens and pass data to and from your screens to the layer that accesses the database. When using an application server(websphere in your case) and connection pooling, you as the developer do not make any connections to the database. The application server opens a series of database connections, when you use the jdbc you are essentially grabbing one of those connection from the 'pool'. You will keep one until you commit,rollback, or go out of scope(definition of this varies from vendor to vendor). If you do selects, you will grab whatever is free.

When you disconnect, you just release the connection back to the pool. This happens when you issue a 'close' in your jdbc. Make sure you are both closing the statement and closing the connection in the jdbc code. You can get memory leaks with some vendors if you don't do both(with websphere you probably won't have the problem, but I don't know that application server).

The definition of a 'logout' to a developer varies depending on how you code it. Usually what you do is just flip a boolean session level variable to say 'not logged in', you have code to check to see if you are logged in your middle tier (i think struts can handle this). Has nothing to do with your connections to the database. Those connections will stay open.

Are you having any problems with your applications? It sounds like its functioning properly. Though you may want to check the JDBC code to make sure it's correct.

If you are using entity type EJBs, then your developers have no control over when DML is performed in the database. It's entirely up to the middle tier. Your developers are simply changing in memory variables in the middle tier.

> All -
>
> I am having problems with our Java app and hope someone here can help.
> We are using Oracle dedicated connections. We tried the Connection
> pooling with Oracle Impl but had no luck. The problems we are having
> are this -
>
 

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 01 2005 - 12:57:01 CDT

Original text of this message

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