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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:43:04+00:00 2026-05-21T16:43:04+00:00

Transactions are defined at the service level, as is typical. But upon occasion we

  • 0

Transactions are defined at the service level, as is typical.

But upon occasion we have a DAO method which requires a higher, SERIALIZABLE, isolation level.

But knowledge of whether the SERIALIZABLE isolation level is necessary is encapsulated in the DAO method, the service method need not know about this.

How can I enforce SERIALIZABLE isolation level at the DAO method level? I can’t even find a way to identify what the isolation level is in Spring.

  • 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-05-21T16:43:05+00:00Added an answer on May 21, 2026 at 4:43 pm

    The service layer typically defines the transactional semantics.

    But … you can add the following annotation to achieve the serializable isolation level on the DAO implemenation method to achieve the effect:

    @Transactional(isolation=Isolation.SERIALIZABLE,propagation=Propagation.MANDATORY)
    

    The MANDATORY is so that the DAO method will not create a transaction if none exists. This will force all invocations to start from a service method. You can change that if desired.

    Let me know how it works out.

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

Sidebar

Related Questions

i have a service method addAgent defined as @Override @Transactional(readOnly=false) public void addAgent(Agent agent,
I have a declarative table defined like this: class Transaction(Base): __tablename__ = transactions id
I have a table Transactions(store_id, item_id, price). I want to find store_id's which sell
If two transactions (both at RR isolation level) ask for the same item which
Hi have the following tables defined in my database: Transactions: - TransactionID (PK, Identity)
I have out.load(output, transactions, columnHeaders, dataFormat); Where load is defined as: public boolean load(String
I have two transactions managers defined in applicationContext, referencing two completely different sessionFactories. I
I have a defined idl file, which looks like this: module Banking { typedef
I have an extension method defined like so: public static TSource MaxBy<TSource, TResult>(this IEnumerable<TSource>
I am using @Transactional on my service class which call DAO methods and I

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.