Get your CodeRanch badge!*
The moose likes JDBC and the fly likes Data Source in TOMCAT 5.5.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Data Source in TOMCAT 5.5.4" Watch "Data Source in TOMCAT 5.5.4" New topic
Author

Data Source in TOMCAT 5.5.4

AnirbanAgartala Bhattacharjee
Greenhorn

Joined: Mar 10, 2006
Posts: 4
Does anyone know how to create data source in TOMCAT 5.5.4? I successfully created data sources in earlier versions of TOMCAT. So if anyone has become able to do this, pls do post a response.
Sujith Kanaparthi
Ranch Hand

Joined: Sep 04, 2005
Posts: 45
I'm not sure how you are trying to create the datasource.But you can use org.apache.commons.dbcp and org.apache.commons.pool package classes to create the DataSource in Tomcat(5.5.12) and I myself used them for DataSource creation.Hope you too can implement the same and try it out
-----
Class.forName(jdbcDriverClassName);
connectionPool = new GenericObjectPool(null);
connectionFactory = new DriverManagerConnectionFactory(jdbcConnectionURL,UserID,Password);
poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
dataSource = new PoolingDataSource(connectionPool);
--------

Regards,
Sujith
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data Source in TOMCAT 5.5.4
 
Similar Threads
Tomcat deployment environment
404 /listenerTest/Listen.do
Data Source in TOMCAT 5.5.4
installing Tomcat 5.5 for Head First JSP
Can I call a servlet directly from HTML