#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    14
    Rep Power
    0

    synchronization question


    I've got quite far with a project (student), and now I'm thinking I should synchronize some of my database access methods.

    I've got one class called DataBean which is an application scope bean, and which contains all of the methods that access the database. What I'm trying to figure out is how I should organise synchronizing some of its methods. I can't seem to relate this situation to the chapter I read about threads, which specifically creates and destroys threads. With JSP, I'd have thought it's different sessions whose access I want to synchronize?

    Please can anyone throw any light on the question?
    Thanks
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    I think you just have to specify that the methods are synchronized. The app server handles all the threading issues. Try it. If it breaks, I was wrong
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    14
    Rep Power
    0
    Thanks, that's what I did... At least one thing with a simple solution!

IMN logo majestic logo threadwatch logo seochat tools logo