Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8520497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:33:10+00:00 2026-06-11T06:33:10+00:00

I need to implement some mechanism to prevent users from editing same objects in

  • 0

I need to implement some mechanism to prevent users from editing same objects in the same time. Here’s my application flow:

  1. Go to ‘list’ page
  2. Select row to edit form datatable
  3. Click edit button (navigation to ‘edit’ page)
  4. Change data
  5. Click ‘Save’ or ‘Cancel’ (navigation back to ‘list’ page)

I wish I could check at step 3. if another user is editing same record (same id) and display information e.g. ‘Sorry, another user is editing this’.

My idea is to keep map of logged users and table names + ids, which they currently edit. I would use application scoped bean (e.g. EJB 3.1 @Singleton) for this purpose. Can you point weaknesses of this solution? Can you propose any other?

I use Java EE 6, Seam3, Glassfish 3 and Oracle DB 11. I use MyBatis, no JPA frameworks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:33:12+00:00Added an answer on June 11, 2026 at 6:33 am

    You would be much better off having some sort of mechanism to accept well identified changes, and when applying changes, detect if the change was initiated on a different copy of the data than now exists, and raise an exception.

    This kind of work flow prevents the dreaded, “I can’t save the company because someone in CA started to change the critical record but then went to lunch.”

    Read the first few chapters of the Subversion book. While you are currently not concerned with data version control, the conflict scenarios are more complete, and better thought out than the old “library” system, where shared items are not available as long as they are in possession of one person.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to implement some form of communication mechanism in my application, to send
I have an app where I need to prevent users from editing data while
I need some advice for a design which I have to implement in application.
I need some suggestions for how to implement a very basic mechanism that logs
I need to have some mechanism to backup and restore some data files from
I need to implement some new functions on an editor. I picked Emacs -
I need to implement for current project some secure login in php. I wrote
I need to implement something. Something that could do some certain task in my
SO buddies, greetings. I have some password requirements I need to implement and one
So, I need some way to implement an undirected network ( I think this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.