File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes threads-database connection-servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "threads-database connection-servlet" Watch "threads-database connection-servlet" New topic

threads-database connection-servlet

Ann Kanu
Ranch Hand

Joined: Feb 01, 2004
Posts: 30
In my application running on weblogic, I am using the MVC pattern with jsps for creating views, a controller servlet and java classes for business logic. I have a seperate class for establishing database connection / checking out database connection from the connection pool. In the service() method of my controller servlet, I use one of the classes, performing business logic, which in turn uses the Database connection class for performing select/updates on the database tables. This is a portion of my code from the service() method.
if ( functionCode.equalsIgnoreCase("EDIT")) {
School school = new school(req,loginUserId,functionCode);
String function = "Edit";
In this scenario, should I be concerned about multithreading issues regarding database connectivity in the class School? If so, what portions of my code would I need to synchronize.
I agree. Here's the link:
subject: threads-database connection-servlet
It's not a secret anymore!