Re: connection on application initialisation
- From: "polilop" <fmatosic@xxxxxxx>
- Date: Wed, 25 Oct 2006 08:35:24 +0200
it says on the given link
If you are using a J2EE Server, you should be able to access a connection
pool via >JNDI and retreive the a connection. If you are not using a J2EE
Server, you can >download (or write) a connection pool, and install it into
your JSP/Servlet >application, and share it via the application space.
dose this mean that when i make a datasource (with JNDI) and call
datasource.getConnection(); i am getting a con from the pool not
establishing con to the database?
"Oliver Wong" <owong@xxxxxxxxxxxxxx> wrote in message
news:DPo%g.71439$E67.37151@xxxxxxxxxxx
"filip" <fmatosic@xxxxxxx> wrote in message
news:ehkqev$goo$1@xxxxxxxxxxxxxxxxx
Is it a practise to make the connection on application initialisation
(talking about jsp, servlet type app.), so you don't make connections
every time you query database, you have it all the time, and then just
grab it from app. scope/context and execute Statements?
if so, any tips on how to do it.
I believe what's usually done is a connection pool is established and
shared throughout your webapp. See
http://www.jguru.com/faq/view.jsp?EID=112097
- Oliver
.
- Follow-Ups:
- Re: connection on application initialisation
- From: Oliver Wong
- Re: connection on application initialisation
- References:
- connection on application initialisation
- From: filip
- Re: connection on application initialisation
- From: Oliver Wong
- connection on application initialisation
- Prev by Date: Re: connection on application initialisation
- Next by Date: jdbc software architecture design, best practice
- Previous by thread: Re: connection on application initialisation
- Next by thread: Re: connection on application initialisation
- Index(es):
Relevant Pages
|
|