• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best Practices1: A Question

 
Mark Fletcher
Ranch Hand
Posts: 897
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there friends,
Im just getting into this Servlet and JSP business so that I can sit the SCWCD exam... Ive been working through the Core Servlets and Java Server Pages book by Marty Hall and I have a question regarding web.xml and JDBC settings...
Is there anything wrong with setting your JDBC settings in web.xml as a combination of <init-param> tags...
For example

Cheers,
Mark
 
L Goundalkar
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
There is nothing wrong in it.
If you are using the these parameters in your application to create connection or even connection pool and use it.
But in some servers you can explicitly create a datasource object which will have connection pool and you can use it in your custom application. This can be done in JRun.
In this case you need not worry about database properties at all.
Just check out with your application server about the Connection Pool feature and implement the same in your application. Then you need not worry about Connection Management.
Cheers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic