Results 1 to 6 of 6
Thread: Servlets and threads.
- 05-05-2007, 05:57 PM #1
Member
- Join Date
- May 2007
- Posts
- 38
- Rep Power
- 0
Servlets and threads.
Hi everybody, I have a doubt respect to the synchronization in database access from servlet, ..but this servlet is multithread,Do I have to synchronizate the database access? o is the container (tomcat) that do this?
thank you !!
MartyLast edited by Marty; 06-01-2007 at 03:19 PM.
- 05-05-2007, 09:30 PM #2levent Guest
Isn't database synchronized itself? At the end it will not allow multiple writes to a data.
- 05-07-2007, 07:57 PM #3
Member
- Join Date
- May 2007
- Posts
- 39
- Rep Power
- 0
You have to create a pool connections
Anyway, I don't understand why do you should synchronizate. A RDBM
can manipulate n numbers of connections without problems.
To synchronize the threads means that you have to force some to wait.
mm follow the steps that other did it.
Please check this site
The Apache Tomcat 5.5 Servlet/JSP Container - JNDI Datasource HOW-TOLast edited by Alan; 06-01-2007 at 01:44 AM.
- 05-10-2007, 04:38 PM #4
Member
- Join Date
- May 2007
- Posts
- 38
- Rep Power
- 0
thanks guys
- 08-03-2007, 01:46 PM #5
Member
- Join Date
- Aug 2007
- Posts
- 47
- Rep Power
- 0
Hi,
I think u can use the Isolation property of a connection to solve the syncronization problem.
Try this: your_connection_name.setTransactionIsolation(TRANS ACTION_SERIALIZABLE);
- 08-10-2007, 12:20 AM #6
Member
- Join Date
- Aug 2007
- Posts
- 1
- Rep Power
- 0
Similar Threads
-
Servlets with J2ME
By Daniel in forum CLDC and MIDPReplies: 2Last Post: 05-27-2008, 05:56 PM -
Java Servlets
By kondalrao in forum Java ServletReplies: 0Last Post: 04-14-2008, 11:12 AM -
servlets or jsp
By krishnapal in forum Advanced JavaReplies: 1Last Post: 12-13-2007, 02:31 PM -
Servlets
By nagaroopanandha in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 02:09 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks