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?
>> Is it a practise to make the connection on application initialisation
>> (talking about jsp, servlet type app.), so you don't make connections
[quoted text clipped - 7 lines]
>
> - Oliver
Oliver Wong - 25 Oct 2006 15:25 GMT
> it says on the given link
>>If you are using a J2EE Server, you should be able to access a connection
[quoted text clipped - 6 lines]
> 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
Arne Vajhøj - 26 Oct 2006 00:43 GMT
>> dose this mean that when i make a datasource (with JNDI) and call
>> datasource.getConnection(); i am getting a con from the pool not
[quoted text clipped - 16 lines]
>
> In other words, it depends on your drivers.
Yes or no.
Explanation:
It does not depend on anything in the JDBC driver.
It depends on the datasource class used in the app server
(or servlet container).
And in practice it will always use a connection pool.
Arne