Re: Oracle/JAVA Connections

  • From: ryan_gaffuri@xxxxxxxxxxx
  • To: lkemnitz@xxxxxxxx, oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 01 Jun 2005 16:52:03 +0000

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. 

-------------- Original message -------------- 

> 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 - 
> 
 

--
//www.freelists.org/webpage/oracle-l

Other related posts: