I ma using tomcat 6. I want to configure database connection pool, If i use the below method it works fine <Context path="/test"> <Resourcename="jdbc/test" auth="Container" type="com.ibm.db2.jcc.DB2SimpleDataSource" factory="com.ibm.db2.jcc.DB2DataSourceFactory" user="test" password="Password!" serverName="172.16.2.234" databaseName="db2" portNumber="2668" driverType="4" testOnBorrow="true" url="jdbc:db2://172.16.2.234:2668/db2"/> </Context>
But I need to make global.
I tried by giving the same under <GlobalNamingResources> without the context but it is not working.
Please suggest me whether it is possible to create DBCP without context ?
There is a way of defining global datasources. By global do you imply being accessible to all web apps? I think you can achieve it by removing the 'Path' attribute from the <context> element. The Resources thus defined should be available to all the web apps.