Hi! ALL, I have a question regarding synchronization in Java when I
write servlet.

public synchronized void a(){
String table_name = "user";
access_db(table_name); //access table "user" in database DB
}

public synchronized void b(){
String table_name = "user";
access_db(table_name); //access table "user" in database DB
}

private void access_db(String db_table_name) {
......
}

I think method a and b can go into access_db at the same time since they
are 2 distinct methods. right? so, that means they are not really
synchronized at the program level. So, I am wondering if the database
(Oracle for example) can synchronized the accesses itself automatically.
if so, can the database administrator control the level of
synchronization (database, table or the record level)? Also, do method a
and b really need to be synchronized if the database can synchronize
itself?

I am puzzled.. Can anyone help?

thanks!

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to