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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:11:36+00:00 2026-05-15T02:11:36+00:00

There are some good explanations of EJB Transaction Attributes (and annotations) out there, for

  • 0

There are some good explanations of EJB Transaction Attributes (and annotations) out there, for example, OpenEJB’s.

But sometimes when I try to cover this with someone who hasn’t worked with many transactional resources, I see their eyes start to glaze over.

So my question – how would you explain EJB Transaction Attributes to your grandmother?

  • Required
  • RequiresNew
  • Mandatory
  • NotSupported
  • Supports
  • Never

I’m thinking a contrived example, analogy, or a concise real-world use case would be helpful.

  • 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-15T02:11:37+00:00Added an answer on May 15, 2026 at 2:11 am

    I think it makes sense to think about this in terms of the container’s interaction with a caller to the EJB method as a true monitor… so I’d like to use a bouncer metaphor in various different scenarios.

    See this page for a good description/overview of the transaction attributes.

    Required (REQUIRED @TransactionAttribute)
    Night club

    Show up at the club, need a ticket to enter. If you don’t have one it will be (purchased?) given to you at the door.

    Transaction is the TICKET.
    Container is the BOUNCER.

    Requires New (REQUIRES_NEW @TransactionAttribute)
    Comedy clubs, 1 drink-minimum, no re-entry

    Show up at the club, no outside food/drink, you must leave them at the door. To get in you must purchase 1-drink minimum every time you leave and re-enter.

    Transaction is the DRINK.
    Container is the BOUNCER.
    Suspending the transaction is LEAVING AT THE DOOR.

    Supports (SUPPORTS @TransactionAttribute)
    House party

    Show up at the party, alcohol is permitted. We’ll let you in with it if you have your own alcohol, if you don’t we’ll let you in too.

    Transaction is the ALCOHOL.
    Container is the HOST.

    Mandatory (MANDATORY @TransactionAttribute)
    Invite-only party

    Show up at the party, need a invitation to enter: If you don’t have one and try to get in, the bouncer calls the authorities.

    Transaction is the INVITATION.
    Container is the HOST.
    Throwing an exception is CALLING THE AUTHORITIES.

    Not Supported (NOT_SUPPORTED @TransactionAttribute)
    Concert, cameras are prohibited.

    Show up at the concert, cameras are prohibited. You can leave it at the door and pick it up when you leave.

    Transaction is the CAMERA.
    Container is the DOORMAN.
    Suspending the transaction is LEAVING AT THE DOOR.

    Never (NEVER @TransactionAttribute)
    High school dance

    Show up at the dance, alcohol is prohibited. If you try to get in with it and are caught, the chaperone calls the authorities.

    Transaction is the ALCOHOL.
    Container is the CHAPERONE.
    Throwing an exception is CALLING THE AUTHORITIES.

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

Sidebar

Related Questions

Can I use recaptcha with apache wicket 1.5.3? Is there some good example?
Are there some good tools that can analyze the performance issues in an asp.net
Is there a good application (that has some kind of gui) for testing memory
I would like to declare some integer constants in PowerShell. Is there any good
There is a plenty of very good post and explanations how to implement validation
Is there good example code or a test project for explaining the Model–view–presenter (MVP)
Is there a good explanation out there on what exactly lazy=extra is capable of?
I've seen some explanations of these, but nothing that really compares where they start,
Is there some way when sending this message to specify that I rather have
Is there some way to compile (with the CSC task) a WPF Application with

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.