Hi, 

I'm trying to build a small pilot application with Struts. 
My ultimate goal is a dynamic web application with 
intensive use of database. 
My database is Oracle 8. 
The problem is following: 
in 'LoginAction' I set up a database connection 
(java.sql.Connection variable) with Oracle 
database. I "save" it 
in the User session bean as a bean-variable. 
Then I test it in a jsp-page. 
Everything seems to work: the variable containing 
the database connection is created and put into 
User bean (something like ...setConnection(connection)). 
The first time the jsp-page works well: the connection 
comes from "conn=user.get_connection()", I can send 
a select-query to the database and display the 
outcome etc. 
But if I refresh the jsp-page, then at a certain 
moment an error message is displayed: 
java.sql.SQLException: Closed Connection 

I undestand that the connection gets somehow 
lost in the session bean. This happens especially 
when I test with two parallel sessions 
(one from IE and another from Netscape). 

Can anyone help me? Where could the connection go lost? 

Thanks, 
George. 


P.S 
I have to save a connection with every session 
because this way I can get user info from 
the database and administer database privileges. 
I can't use just a connection pool and 
get a connection from there every time I need 
something from the database. 
I have to lock records, maintain transactions etc., 
so every user/session needs to have an 
individual database connection. 





-----------------------------------------
Teatri- , kino- ja kontserdipiletid n��d hiirekliki kaugusel!
http://www.hot.ee

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to