> I am afraid that J2EE will not help you very much here. Normally J2EE
> applications are using connection pooling. The datasources are defined
[quoted text clipped - 22 lines]
>
> /Fredrik
> How do you propose database-access not using j2ee? Remember jdbc is part
> of j2ee ...
JDBC (java.sql and javax.sql) is a part of J2SE not J2EE.
>It also makes sense
> to persist the per-user-connection throughout the session in a pool
> instead of re-connecting each time the database needs to be accessed.
Correct. I didn't say that the connection should be closed after every server call.
/Fredrik
Jon Martin Solaas - 27 Aug 2004 09:28 GMT
>>How do you propose database-access not using j2ee? Remember jdbc is part
>>of j2ee ...
>
> JDBC (java.sql and javax.sql) is a part of J2SE not J2EE.
No. JDBC is described in version 1.4 J2EE.2.6.6. Also, JNDI is
J2EE.2.6.8. Both are distributed as enterprise features in J2SE, though,
along with a couple of other J2EE features as well.
>>It also makes sense
>>to persist the per-user-connection throughout the session in a pool
>>instead of re-connecting each time the database needs to be accessed.
>
> Correct. I didn't say that the connection should be closed after every server call.
So why do you absolutely not want to use a connection pool for this
purpose? You'll have the opportunity to let each user have more than one
connection at a time, the pool will handle the connection for you
automatically, you won't have to re-connect if the connection closes for
you and so on. Sounds much better to me ... writing code to handle such
standard stuff is just a waste and opens up for nasty bugs nobody really
needs (unless those who write debuggers, ofcourse :-)

Signature
jonmartin.solaas¤h0tm4i1