Re: EJBs & CMP with real database users
From: Jon Martin Solaas (jonmartin.solaas_at_mail.link.no)
Date: 08/27/04
- Previous message: Fredrik Bertilsson: "Re: EJBs & CMP with real database users"
- In reply to: Fredrik Bertilsson: "Re: EJBs & CMP with real database users"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 27 Aug 2004 08:28:19 GMT
Fredrik Bertilsson wrote:
>>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 :-)
-- jonmartin.solaas¤h0tm4i1
- Previous message: Fredrik Bertilsson: "Re: EJBs & CMP with real database users"
- In reply to: Fredrik Bertilsson: "Re: EJBs & CMP with real database users"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|