Re: connection on application initialisation



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



.



Relevant Pages

  • Re: Connection pooling
    ... Each message spawns a new instance of a C# dll via COM. ... | I have only tested the dll's being created via a Console app, ... | use that pool. ... transaction, you close the connection. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Internal connection fatal error
    ... It's just the nature of the app... ... > 80 connections in the pool tells me this is a heavily loaded system. ... > Yes, if an operation fails at the server, the connection can be broken. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Close and Dispose argument
    ... > fact that even Microsoft is not clear on the issue. ... > connections from the pool is still a debate. ... > method removes the conneciton from the connection pool". ... > Your issue was forwarded to us here at Microsoft Courseware Support. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: too many cursors open
    ... Is the app java? ... This usually means you are not closing callable statements and result ... instrument it and instrument where you get the connection from the pool ...
    (comp.databases.oracle.misc)
  • Close and Dispose argument
    ... here is an email conversation between me and Microsoft ... connections from the pool is still a debate. ... Programming with Microsoft ADO.NET" module 2, p 18: "Calling the Dispose ... method removes the conneciton from the connection pool". ...
    (microsoft.public.dotnet.framework.adonet)