Re: connection on application initialisation




"polilop" <fmatosic@xxxxxxx> wrote in message
news:ehn0jd$j6b$1@xxxxxxxxxxxxxxxxx
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?

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/DataSource.html
<quote>
The DataSource interface is implemented by a driver vendor. There are three
types of implementations:

1. Basic implementation -- produces a standard Connection object
2. Connection pooling implementation -- produces a Connection object that
will automatically participate in connection pooling. This implementation
works with a middle-tier connection pooling manager.
3. Distributed transaction implementation -- produces a Connection object
that may be used for distributed transactions and almost always participates
in connection pooling. This implementation works with a middle-tier
transaction manager and almost always with a connection pooling manager.
</quote>

In other words, it depends on your drivers.

- Oliver


.



Relevant Pages

  • 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)
  • 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)
  • Re: MinPoolSize behaviour
    ... Min Pool Size, The first time you open a connection we will open the 1 ... > Is the pool created forever? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Q:Multithreaded ADO.Net Connections Are Non Pooled?
    ... different you get a new pool. ... > the process/app domain differences, does running on a thread created by ... If you're using SSPI, each connection must be ... >> connect to the SQL Server machine, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: connection on application initialisation
    ... pool via>JNDI and retreive the a connection. ... Server, you can>download a connection pool, and install it into ... grab it from app. ...
    (comp.lang.java.databases)