Interview Question in SQL Server Configurations
Interview Question :: Example applications using DBCP and JNDI
Are there any straight-forward examples containing the correctly configured context.xml and web.xml files for a Tomcat 6 web app....enabling the following code to be used from inside of a servlet?
--------------------------------------...
....
Context initialContext = new InitialContext();
Context env = (Context) initialContext.lookup("java:comp/env");
DataSource dataSource = (DataSource) env.lookup("jdbc/"+databaseName);
connection = dataSource.getConnection();
.....
--------------------------------------...
I would like to implement connection pooling for a few different sql server 2005 data-sources, but my configuration seems to be incorrect.

Loading ...