Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-05-2007, 07:57 PM
Member
 
Join Date: May 2007
Posts: 38
Marty is on a distinguished road
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 !!
Marty

Last edited by Marty : 06-01-2007 at 05:19 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-05-2007, 11:30 PM
Senior Member
 
Join Date: Dec 2006
Posts: 748
levent is on a distinguished road
Isn't database synchronized itself? At the end it will not allow multiple writes to a data.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-07-2007, 09:57 PM
Member
 
Join Date: May 2007
Posts: 39
Alan is on a distinguished road
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-TO

Last edited by Alan : 06-01-2007 at 03:44 AM.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 05-10-2007, 06:38 PM
Member
 
Join Date: May 2007
Posts: 38
Marty is on a distinguished road
thanks guys
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 08-03-2007, 03:46 PM
Member
 
Join Date: Aug 2007
Posts: 47
henry_78 is on a distinguished road
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);
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 08-10-2007, 02:20 AM
Member
 
Join Date: Aug 2007
Posts: 1
gsahoo is on a distinguished road
New Member
Hi Every buddy,

Today I am joined in Java Forums Family.

Thanks
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Servlets with J2ME Daniel CLDC and MIDP 2 05-27-2008 07:56 PM
Java Servlets kondalrao Java Servlet 0 04-14-2008 01:12 PM
servlets or jsp krishnapal Advanced Java 1 12-13-2007 04:31 PM
Servlets nagaroopanandha Advanced Java 1 08-07-2007 04:09 PM
Introduction to Servlets JavaForums Java Blogs 0 08-04-2007 04:24 AM


All times are GMT +3. The time now is 08:36 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org