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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:12:04+00:00 2026-05-27T01:12:04+00:00

In my application we are using TX Manager. My application is built on JSF

  • 0

In my application we are using TX Manager.
My application is built on JSF and RF3.3 with JDBC connectivity to MYSQL
Here’s the scenario:-

  1. User enter value on GUI.
  2. after collecting all data in Backing Bean I get the instance of Transaction Manager.
  3. Then i begin the TX.
  4. All the values are inserted in DB1.
  5. SOAP call is made to insert values in another DB2.
  6. In case insertion in DB2 fails entry from DB1 should roll back.
    7.For this I use tx.rollBack().

Problem is although tx.rollBack is executed even then the entry is not removed.
I tried declaring afterRollBackAction and fired a delete query in DB1 but it gives me an exception

org.jboss.util.NestedSQLException: Transaction TransactionImple < ac, BasicAction: a7c198d:6:4eccc549:a status: ActionStatus.ABORTED > cannot proceed STATUS_ROLLEDBACK; - nested throwable: (javax.transaction.RollbackException: Transaction TransactionImple < ac, BasicAction: a7c198d:6:4eccc549:a status: ActionStatus.ABORTED > cannot proceed STATUS_ROLLEDBACK)

I checked my code properly..There is not exception (NPE or SQL or Any other kind of exeption thrown)..

Can you please tell me why the TX is not rolling back and deleting entry from the DB1?

Code Snippet :-

try
{
txManager.begin()

cStmt.setString(1,Name);
cStmt.setString(2,Address);
cStmt.setString(3,Number);
cStmt.registerOutParameter(10, java.sql.Types.INTEGER);
cStmt.execute();
int errorCode=cStmt.getShort(10);
if(errorCode==0)
{
WebService Stub =new WebServiceStub();
CreateIdentity create=new CreateIdentity();
create.setName(Name);
create.setAddress(Address);
create.setNumber(Number);
CreateIdentityResponse createResponse=stub.createIdentity(create);
int errorCodeFromWebService=createResponse.getMsg();
 switch(errorCodeFromWebService)
{
case 0:
errorCode=0;
 txmanager.commit();

break;
case -1:
txManager.rollback();
break;
default:
txManager.rollback();
}
else
{
txManager.rollback();
}
return errorCode;

Although txManager.rollback gets called but rollback itself is not happening. I tried using actions before and after rollback but to no avail.

  • 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-27T01:12:04+00:00Added an answer on May 27, 2026 at 1:12 am

    As @Mark Rotteveel pointed out if your tables use MyIsam engine transactions does not work. If you are using InnoDB engine check the autocommit property of your jdbc connection/jdbc driver, it should be set to false.

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

Sidebar

Related Questions

In my application I am using user settings as explained here . Then I
I'm currently developping an application in java using Hibernate as a persistence manager and
We have an application that is built with Excel as the front end using
I've built a Django web application and some Django-Piston services. Using a web interface
Scenario: I have built an ASP.NET MVC application that manages my cooking recipes. I
I am trying to secure my application which is built using JSF2.0. I am
I need to deploy datanucleus using JCA. My application is built on ejb3 and
I was using Qt to build a basic GUI for an application and I
When starting a django application using python manage.py shell , I get an InteractiveConsole
I'm using the Django manage.py runserver for developing my application (obviously), but it takes

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.