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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:40:26+00:00 2026-05-19T22:40:26+00:00

So I’m using container managed transactions in OpenEJB and Hibernate and I have a

  • 0

So I’m using container managed transactions in OpenEJB and Hibernate and I have a fairly simple transaction rollback scenario I’m trying to get to work. My DBMS is MySQL.

I start off with a stateless EJB that has default transaction propagation (required) that performs some basic entity manipulation / creation.

I also have a second stateless EJB that has an annotation for specified propagation (but it’s still just ‘required’). From this second EJB method, I call the first EJB’s method that does that basic entity manipulation / creation. I get back an entity that does not yet have an ID, so I called entityManager.flush(), which gives me an ID to work with on my entity returned from that first EJB.

Here’s where I get a problem. That second EJB now has a problem, be it a System Exception, or some kind of exception. I’d like to force a rollback, so this EJB has a @Resource SessionContext ctx member that I use to call ctx.setRollbackOnly().

This is what I see in the log:

DEBUG – TX Required: Started transaction org.apache.geronimo.transaction.manager.TransactionImpl@540eb4ca

….stuff, eventually stack trace I’m logging….

DEBUG – TX Required: setRollbackOnly() on transaction org.apache.geronimo.transaction.manager.TransactionImpl@540eb4ca
DEBUG – TX Required: Rolling back transaction org.apache.geronimo.transaction.manager.TransactionImpl@540eb4ca

But when I check the database, the changes from the first EJB are still in the database. What am I missing?

  • 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-19T22:40:26+00:00Added an answer on May 19, 2026 at 10:40 pm

    Perhaps you use MyISAM as a storage engine for your table. It doesn’t support transactions, use InnoDB instead.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
I am trying to loop through a bunch of documents I have to put
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't

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.