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 122367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T04:07:03+00:00 2026-05-11T04:07:03+00:00

Prevayler guarantees that all the writes ( through its transactions) are synchronized. But what

  • 0

Prevayler guarantees that all the writes ( through its transactions) are synchronized. But what about reads?

Is it right that dirty reads are possible if no explicit synchronizing is used (in user code)?

Are they possible if a business object is read as:

// get the 3rd account Accont account = (Bank)prevayler.prevalentSystem().getAccounts().get(2); 

?

If so what synchronizing strategies are good for a user code?

(Consider a business object A contains a collection of business objects Bs),

  • using a synchronized collection (of Bs inside of A), for example from java.util.concurrent package?
  • synchronize collection reads outside transactions with the collection writes inside transactions, for example using ‘synchronized( collection )’ code around reads and writes?
  • 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. 2026-05-11T04:07:03+00:00Added an answer on May 11, 2026 at 4:07 am

    The recommended way is to use JMatch Query and Prevayler.execute(Query). Either directly or by using subclassing.

    The returned results must be either primitive values or immutable objects. If you plan to return mutable objects you should subclass JMatch Query to do these deep copies. This way you get a system that locks every sensible read with other (sensible) reads and writes. This can speed up and simplify development, especially for developers without multithreaded programming expirience.

    If you need more performance under high concurrent load, which is supposed to be a rare case, you indeed can use described above fine grained locking – using ‘synchronized’ and java.util.concurrent.

    See this discussion for more details.

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

Sidebar

Related Questions

The demos included in the Prevayler distribution show how to pass in a couple
I used to run the default bash terminal that comes with Mac Os X
I have a application that stores passwords in a ms sql database, I wish
I have a C# WinForms application with a database backend (oracle) and use NHibernate
I recently spent days trying to get my .htaccess to rewrite URLs, of which
(Only managed to find one other question on this - Object persistence strategy for
I have been working on an iPhone App for a couple of weeks now
Is there an SSJS implementation of the Prevalence System Design Pattern, as implemented in
I'm looking to automate the sending of multi-part emails. Now I need to format
Here's the problem. I am using AVCaptureVideoDataOutput to get video frames from camera and

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.