• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat 6 DBCP Configuration

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Pradeep JD", please check your private messages for an important administrative matter.
 
Pradeep JD
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Bhaskar Rao
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Pradeep JD" did you check the private message sent by sheriff
Bear?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic