Hi all,
Could you please confirm me that when using JNDI DataSource described there
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
(just defining the Datasource in your server.xml file and configuring the resource in
web.xml) and adding the code below in every page (or better in a bean) i would get all
the DBCP functionalities.
So for instance, each time i'll made a getConnection i will use a connection from the
pool and not creating one.
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle");
Connection conn = ds.getConnection();
seems to be too simple to work this way, isn't it :-)
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]