BAPI_ALM_NOTIF_SAVE to rollback or not

Hi Everyone,
When you use BAPI_ALM_NOTIF_SAVE and it returns errors do you need to use BAPI_TRANSACTION_ROLLBACK?
The documentation in SE37 implies that you need to run BAPI_TRANSACTION_COMMIT regardless of the result otherwise further changes are not possible. Does this mean that BAPI_ALM_NOTIF_SAVE effectively do a rollback internally?
regards
Julian

Julian,
I have used this in the past:
lv_subrc = 0.
  loop at yt_return into ls_return.
    if ls_return-type = 'A' or       "abort
       ls_return-type = 'X' or       "dump
       ls_return-type = 'E'.         "Error
      lv_subrc = 4.
      exit.
    endif.
  endloop.
  IF lv_subrc EQ 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
  ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
  ENDIF.
PeteA

Similar Messages

  • Operation Connection.rollback is not allowed during a global transaction.

    Hi
    I am getting the following exception when i try to deploy my application in the server. Is any body got the same error. please help me to solve this problem.
    com.ibm.mm.beans.CMBException: DSRA9350E: Operation Connection.rollback is not allowed during a global transaction.
    java.sql.SQLException: DSRA9350E: Operation Connection.rollback is not allowed during a global transaction.
         at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.rollback(WSJdbcConnection.java:2270)
         at com.ibm.mm.sdk.internal.sql.PConnectionICM.rollback(PConnectionICM.java:230)
         at com.ibm.mm.sdk.server.DKDatastoreICM.connect(DKDatastoreICM.java:3273)
         at com.ibm.mm.beans.CMBConnection.connect(CMBConnection.java:1685)
    Thanks.

    Are you using an XA driver for two-phase commit?
    %

  • Rollback is not working when "The server threw an exception" error

    Hi
    These are my transaction steps
    1) Call the StartTransaction method of the company object (Function AA)
    2) Add  Goods Issue (Rollback if error occurs) (Function BB)
    3) Create record with oRecordSet object (Rollback if error occurs) (Function BB)
    4) Add Journal Entry (Rollback if error occurs) (Function CC)
    5) Add Goods Receipt (Rollback if error occurs) (Function DD)
    6) Create record with oRecordSet object (Rollback if error occurs) (Function DD)
    7) Call EndTransaction (with commit) to complete the whole process (Function AA)
    These are working fine usually.
    But problem is when user has "The server threw exception" error message.
    Whole transaction must be rollback but still step 2 and 3 records are exist on DB.
    Rollback is working fine with another error messages.
    I programmed call Rollback transaction if calling function has any error.
    Function BB, CC and DD are calling from Function AA.
    I never have "The server threw an exception" error on my development machine with B1 2005 PL 51.
    This is happened only  LIVE server with B1 2005 PL 51.
    B1 was upgraded from PL29 to PL51 recently becaseu of Locking issue.
    Then Locking issue was solved but have "The server threw an exception" error and rollback is not working properly.
    I hope someone can help me!!!!.
    Thank you
    2) & 3) steps

    Hi Joanne,
    There are 2 things to check here.
    1. is the Transaction
    2. is the RPC_E_SERVERFAULT.
    for the first one,
    in step 2, just before you add the Good Issue, can you try to check first if you are still in a transaction ?
    Just to make sure.
    If it is, maybe you should open a ticket to SAP support.
    BTW, Which version is your Live environment ?
    for the second one,
    try to search the error in this forum. there is a lot of posting about this.
    The problem might also go away if you upgraded your SBO.
    Please search and see if there is anything the same with your problem.
    Regards
    Edy

  • ORA-08176: consistent read failure; rollback data not available

    Hi,
    We implemented UNDO management on our servers and started getting these errors for few of our programs.:
    ORA-08176: consistent read failure; rollback data not available
    These errors were not coming when we were using the old rollback segments and we have not changed any code on our server.
    1. What is possibly causing these errors?
    2. Why did they not surface with rollback segments but started appearing when we implemented AUM and Temporary TS (instead of fixed TS used as temporary TS).
    Our environment:
    RDBMS Version: 9.2.0.5
    Operating System and Version: Windows 2000 AS SP5
    Thanks
    Satish

    NOt much in the alert.log. I looked at the trace file, it also does not have much information:
    ORA-12012: error on auto execute of job 7988306
    ORA-20006: ORA-20001: Following error occured in Lot <4407B450Z2 Operation 7131> Good Bad rollup.ORA-08176: consistent read failure; rollback data not available
    ORA-06512: at "ARIES.A_SP$WRAPPER_ROLLUPS", line 106
    ORA-06512: at line 1
    *** SESSION ID:(75.13148) 2004-11-23 09:16:14.281
    *** 2004-11-23 09:16:14.281
    ORA-12012: error on auto execute of job 7988556
    ORA-20006: ORA-20006: Following error occured in Lot <3351A497V1 Operation 7295> For No FL Rollup, Updating T_GOOD.ORA-08176: consistent read failure; rollback data not available
    ORA-06512: at "ARIES.A_SP$WRAPPER_ROLLUPS", line 106
    ORA-06512: at line 1
    *** SESSION ID:(75.16033) 2004-11-23 09:28:10.703
    *** 2004-11-23 09:28:10.703
    The version we have is :
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
    PL/SQL Release 9.2.0.5.0 - Production
    CORE 9.2.0.6.0 Production
    TNS for 32-bit Windows: Version 9.2.0.5.0 - Production
    NLSRTL Version 9.2.0.5.0 - Production
    Thanks
    Satish

  • Why rollback is not working....

    it's 10g
    as far as I know, dbms_scheduler.create_job is not a DDL. So why this is saving insert ...
    SQL*Plus: Release 10.2.0.3.0 - Production on Sat May 10 20:58:31 2008
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> @y
    SQL> drop table junk_34;
    Table dropped.
    SQL> create table junk_34(f varchar2(10));
    Table created.
    SQL> set serveroutput on
    SQL> declare
      2   command varchar2(20000) ;
      3    job_name varchar2(200) := 'TEST';
      4   temp_name varchar2(200) := DBMS_SCHEDULER.GENERATE_JOB_NAME ;
      5  begin
      6   command := 'BEGIN null; END;';
      7   insert into junk_34 values('a_value');
      8  dbms_scheduler.create_job(
      9    job_name => temp_name,
    10    job_type => 'PLSQL_BLOCK',
    11   job_action => command,
    12    start_date => systimestamp,
    13    enabled => true);
    14  dbms_output.put_line(command);
    15  rollback;
    16  end;
    17  /
    BEGIN null; END;
    PL/SQL procedure successfully completed.
    SQL> set line 2000
    SQL> select * from junk_34;
    F
    a_value
    SQL>
    SQL>

    it wont even compile with autonomous_transaction
    Read my comments carefully. I said you should create "your own wrapper package for the dbms_scheduler that simply surrounds each call to dbms_scheduler with an autonomous transaction". I did not say "stick your code inside an anonymous pl/sql block with an autonomous transaction pragma".
    Stripped to the bare minimum, this looks about right - but since I've only spent a few minutes writing it, I'm not going to guarantee that it's doing anything other than giving you the general idea:
    create or replace package my_scheduler
    as
         procedure create_job(
              i_job_name     in     varchar2,
              i_job_type     in     varchar2,
              i_job_action     in     varchar2,
              i_start_date     in     timestamp with time zone,
              i_enabled     in     boolean
    end;
    create or replace package body my_scheduler as
    procedure create_job (
         i_job_name     in     varchar2,
         i_job_type     in     varchar2,
         i_job_action     in     varchar2,
         i_start_date     in     timestamp with time zone,
         i_enabled     in     boolean
    is
         pragma autonomous_transaction;
    begin
         dbms_scheduler.create_job(
              i_job_name,
              i_job_type,
              i_job_action,
              i_start_date,
              i_enabled
    end;
    end;
    /If you've got your privileges sorted out correctly, you should be able to create this package, then make a call to my_scheduler.create_job rather than dbms_scheduler.create_job.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • My commit rollback is not working, can anyone tell me why please?

    Can anyone please help me figure out what is the problem with this code? it suppose to be correct but not for some unknown reason it didnt.
    Here are the code --
    * comiiit.java
    * Created on March 23, 2006, 8:38 AM
    package rib;
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * @author Rizal Ikhwan
    * @version
    public class comiiit extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    doPost(request,response);
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    Connection conn = null;
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    conn = DriverManager.getConnection("JDBC:ODBC:MyAccessSource");
    conn.setAutoCommit(false);
    Statement st = null;
    PreparedStatement stmt = null ;
    stmt = conn.prepareStatement("INSERT INTO Transaction values (?,?,?,?,?,?,?,?,?) ");
    st = conn.createStatement();
    String tType = "Ac2Db";
    String ac ="0000";
    String db ="0000";
    String acBal = "1";
    String cdBal = "0";
    String amt = "1";
    String nwacBal = "0";
    String nwcdBal ="1";
    String d = "date";
    stmt.setString(1,d);
    stmt.setString(2,ac);
    stmt.setString(3,db);
    stmt.setString(4,acBal);
    stmt.setString(5,cdBal);
    stmt.setString(6,amt);
    stmt.setString(7,nwacBal);
    stmt.setString(8,nwcdBal);
    stmt.setString(9,tType);
    stmt.executeUpdate();
    conn.commit();
    out.println("success");
    }catch (Exception e){
    try{
    conn.rollback();
    }catch(SQLException ignored){}
    out.println("Fail");
    }finally{
    //clean up conn
    try{
    if(conn !=null) conn.close();
    catch(SQLException ignored){ }
    // conn.setAutoCommit(true);
    /** Returns a short description of the servlet.
    public String getServletInfo() {
    return "Short description";
    // </editor-fold>
    //*************************

    I think the problem is that you are using a database that does not support transactions.

  • SqlTransaction.Rollback() does not throw InvalidOperationException in case the transaction has already been rolled back.

    According to
    MSDN SqlTransaction.Rollback() method must throw InvalidOperationException in case the transaction has already been committed or rolled back. 
    However, in my tests I don't get any exceptions. Here is the code:
    CREATE PROCEDURE dbo.USP_TEST_TX_PROC
    AS
    BEGIN
    SELECT 1/0;
    ROLLBACK TRANSACTION;
    END
    GO
    using(SqlConnection con = new SqlConnection(@"Data Source=XXX;Initial Catalog=TestDB;Integrated Security=True"))
    con.Open();
    SqlTransaction tr = con.BeginTransaction();
    SqlCommand cmd = new SqlCommand("dbo.USP_TEST_TX_PROC", con, tr) { CommandType = CommandType.StoredProcedure};
    try
    cmd.ExecuteNonQuery();
    tr.Commit();
    catch (Exception ex)
    try
    tr.Rollback();
    catch (Exception ex2)
    Console.WriteLine(" Message: {0}", ex2.Message);
    What am I doing wrong?
    Thank you.
    Alexey

    Hello Alexey,
    I created a client side demo which could throw the InvalidOperationException:
    using (SqlConnection connection = new SqlConnection(@"Server=(localdb)\Projects;Database=DFDB;Trusted_Connection=True;"))
    connection.Open();
    SqlCommand command = connection.CreateCommand();
    SqlTransaction transaction;
    transaction = connection.BeginTransaction("SampleTransaction");
    command.Connection = connection;
    command.Transaction = transaction;
    try
    command.CommandText = "ProInsertIntoOrder 1,'1'";
    command.ExecuteNonQuery();
    transaction.Rollback();
    throw new Exception();
    catch (Exception ex)
    // Attempt to roll back the transaction.
    try
    transaction.Rollback();
    catch (InvalidOperationException ex2)
    Console.WriteLine("Rollback Exception Type: {0}", ex2.GetType());
    Console.WriteLine(" Message: {0}", ex2.Message);
    You could have a try. However, it is not clear why it could detect the ROLLBACK statement on the server side, I suggest that you could post this feedback to:
    https://connect.microsoft.com/VisualStudio/feedback/LoadSubmitFeedbackForm
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to rollback synced notes

    Hi,
    I just synced the Notes from my E5-00 with my Nokia PC Suite 3.7.22.
    I want to rollback the sync as it has replaced my new notes in the phone with their old copies from Outlook.
    I have lost significant valuable data from a note which had a lot of information in the phone copy of the note and was alomost empty in Outlook. It got replaced in the phone by the old version of note from Outlook.
    Please help.
    Regards,
    Ameya
    Phone: E5-00
    Phone OS: 101.003 Symbian
    PC Suite: Nokia Suite 3.7.22
    PC OS: Windows Vista Home Premium

    Update:
    In the Nokia Suite, for Notes, the option for 'Sync conflict resolution' was selected as 'Microsoft Outlook' (default) which caused this to happen. I had forgotten to change this option. :-(
    I would still like to recover my notes. Any help will be appreciated.
    Thanks,
    Ameya

  • When start rollback segment not online

    hi to all,
    i have a one problem regarding rollback segment. i have created a new database & give five rollback segment, but when i start it is offline it will not start as online.
    [email protected]
    Pradip Mistry,
    null

    Hello Tina,
    If the overflow in a DMTS is triggered by a very high value for
    NEXT_EXTENT, sometimes you can reduce the NEXT_EXTENT value instead of
    extending the tablespace. Of course, the best way is to migrate to Automatic UNDO Management and set retention instead of using rbs, depending on your Oracle version.
    If you have access to OSS, please also review OSS note 3155 - Termination due to tablespace overflow, it details the cause and how to avoid that in the future.
    You may also review note 3807 for related error messages regarding rollback and undo segments.
    Hope this helps, if you found them useful, please do award some points.
    Thanks,
    George

  • Rollback does not work between two databases

    I have two databases, A and B and a database link.
    I have a procedure in database A that has calls to procedures of database B. When commit in A then gives error (ora-06512), then I make rollback, but only does for database A, in database B has recorded the data. It's normally? What's happens?
    Thanks

    I'm afraid you'll need to give as more information; ORA-06512 is a very generic message and is used to indicate which line another error occured. Can you tell us what that error was, and exactly what you're trying to do?
    Thanks,
    Colin

  • Failed update is doing rollback, but not exiting.

    Hi ,
    I have written some update FM.I am doing this based on the records(1 to many) in the table parameter.
    The requirement is,during the updation if any error happens,I need to rollback the work and need to stop the further processing.As of now,it is roll backing the work.
    But it is going to the next line.I have used 'EXIT' statement in my pgm.
    Please suggest me a solution.
    Thanx,
    Selva
    Edited by: Julius Bussche on Dec 15, 2008 11:04 AM

    Hi,
    Let us assume there is a header and an Item table and that the header table is the check table for the item table.
    So
    lt_header type standard table of header_table,
    lt_item     type standard table of item_table.
    Assume all data is in and you are ready for updation.
    insert header_table from tablelt_header.
    if sy-subrc eq 0.
    insert item_table from lt_item.
      if sy-subrc eq 0.
        commit work and wait.
      else.
       rollback work.
      perform issue_error_message_to_user.
    else.
      perform issue_error_message_to_user.
      endif.
    I have written this code in this reply only. Please use proper syntax as required. I just shared the concept i had in mind.Please Check and tell

  • To Rollback or not to Rollback

    I have a form with two blocks: block_I and block_II. Block_I is built around table_I and block_II is built around table_II. The two blocks are linked together via a master/detail relation. I have an post_change and a Key_Next_Item trigger of an item (Item_I) in block_I that do the following:
    Post_Change: does an update on table_II based upon the change in its value (the value of Item_I)
    Key_Next_Item: performs a go_block('block_II') and an execute_query command.
    When I change the value of Item_I and move out of it the values of table_II are changed accordingly in block_II.
    When I do the following steps:
    1. Enter query (in block_I)
    2. Execute query in block_I
    3.change the value in Item_I and move out of the item.
    4. Enter query again (upon which I am asked if I want to save the changes, I respond with NO)
    5. execute query again in block_I using the same data in step 1, I get the following results:
    item1 has the value it had before the change in step 3 while the block_II still retains the updated values (due to the update statement in the Post_Change trigger)
    After I close the form and reopen it and run a query on the same data, I find that BOTH item_I and block_II have their original values.
    This kind of behavior is confusing to the user. Any help?

    You are issuing an update statement to the database in the post_change trigger? If so you are in effect disconnecting Forms from the database because Forms now is wrong in its internal representation of what has happened to the data. Unless you have very unique requirements for the coordination, just let Forms handle the master detail coordination. If you must meddle with it you will have to handle almost everything with your code so you need to duplicate what Forms does and add your stuff. Try to do it without actually update the database (if that is what you meant).

  • OSB JMS Proxy XA Transaction Rollback not occuring to queue

    Hi All
    We are dequeuing a message from JMS queue via an XA connection factory and then calling a web service. If any error occurs in the web service we catch the error handler, log and notify it and want to send this message back to the queue for retrial (The retry settings are defined at the Queue Level from weblogic console).
    Problem is rollback is not occurring, we have tried the below:
    1) There is no OSB reply with either success or failure in the error handler (This should have done the trick)
    2) We have also tried addiing an explicit Raise Error (Uncaught Error) to roll the message back, but its not working.
    This rollback is not occurring because JMS Resource is XA and web service call is NON XA, hence the entire message flow becomes NON XA. Is this understanding correct?
    How can we fix this? Please help

    Hi atheek1
    Thanks for the reply, it worked. Before I mark this question as answered, pls. answer the below queries (Thanks a lot!)
    1) Well, i just ticked transaction required and same transaction for response and it started working. I did not add routing options like you mentioned to QOS Exactly Once. Its working without it fine. So, my questions is what is the use of adding this QOS to exactly once. Is it mandatory?
    2) I have a couple of OSB services in which rollback is working automatically (XA JMS to JCA FTP Adapter) and (XA JMS to JCA DB adapter XA data source), here rollback works automatically. I dont have to tick transaction required. So my question is, when an XA based connection factory picks a message from the queue, a transaction is started at the container level. So why tick transaction required at the message flow level, when the weblogic has already initiated a transaction. Since you said that HTTP transport commits a transaction even if 500 or 404 occurs, it makes sense to tick is transaction required and same transaction for response in OSB proxy service. But the remaining scenarios work without these options. Hence will it be wise to say that these settings are only required for HTTP transport coz of the way it behaves (commits 404 and 500).
    Thanks

  • CacheFullException not recovered after rollback

    I have been encountering a problematic entity-bean-related CacheFullException situation: after a CacheFullException has been thrown (for good reasons), and the transaction is rolledback, I keep getting CacheFullException in later transactions, which shouldn't get it.
    It seems as though the rolled-back transaction due to CacheFullException is not cleanning-up the cache. It's not marking the entity beans that did manage to enter the cache in that failed transaction as no longer active.
    I'm using WLS 8.1 SP 3. The entity bean is CMP. It's PK class is Integer. Using Container Managed Transaction.
    I originally encountered the problem when using the default max-beans-in-cache = 1000 during load.
    In order to better understand the problem, I now reduced max-beans-in-cache to 5 and am performing manual testing, not load.
    Now, if I try to get more than 5 entity beans into the cache in a single transaction (returned from a finder and accessed), I get CacheFullException (rightfully).
    Then when I try, in a new transaction, to simply create one entity bean of that type, I get CacheFullException.
    I'm stuck in repeating CacheFullException, and must restart the server in order to solve it.
    The repeating CacheFullException has a growing 'size' value. For
    example:
    weblogic.ejb20.cache.CacheFullException: size=7, target=5, incr=1, then
    weblogic.ejb20.cache.CacheFullException: size=8, target=5, incr=1, then,
    weblogic.ejb20.cache.CacheFullException: size=9, target=5, incr=1, etc.
    In the original load scenario, it grew from close to 1000 up to 6 digits!
    Using the Monitoring of the Weblogic Server Console, I see that "Cached Beans Current Count" is 0. This leaves me puzzled.
    Has anyone else encountered this problem? And possibly has an idea if this is a problem in my WLS configuration / descriptors / code, or a WLS problem?
    Thanks,
    Eynat

    I have been encountering a problematic
    entity-bean-related CacheFullException situation: after a
    CacheFullException has been thrown (for good reasons),
    and the transaction is rolledback, I keep getting
    CacheFullException in later transactions, which shouldn't
    get it.I appear to have the same problem. At some point (whether it's after a rollback or not, I don't yet know), I get a CacheFullException when trying to create a new Entity Bean.
    The CacheFullException exception shows a size that increments by one each time this error occurs. The reported size in the exception continually increases way past the max-beans-in-cache amount of 1000. Yet, the Administrator console reports the "Cached beans current count" as zero. So, the cache appears empty, yet every attempt to create a new entity bean fails with a CacheFullException!
    I am using Weblogic Server 8.1 SP3, BMP, and Oracle 9i. The Entity Bean's primary key class was generated by EJBGen (primary key is a java long).
    Stopping and restarting the Weblogic server fixes the problem temporarily.
    Any help would be greatly appreciated.
    Jim

  • Transaction rollback in stateless session EJB 3.0

    Hello everyone !
    I have a stateless session EJB as per 3.0 spec.
    /*Remote Interface*/
    package com.nseit.ncfm2.data.ejb;
    import java.sql.SQLException;
    import java.util.Collection;
    import javax.ejb.Remote;
    import javax.ejb.TransactionAttribute;
    import javax.ejb.TransactionAttributeType;
    import javax.naming.NamingException;
    import com.nseit.ncfm2.security.Audit;
    @Remote
    public interface ProductionDataChangesRequestsRemote {
         @TransactionAttribute(TransactionAttributeType.REQUIRED)
         public boolean shiftCandidateDetails(String sourceNcfmId,
                   String destinationNcfmId, Collection<String> specialCasesList, String shiftingRemarks, String user, Audit updtAudit) throws NamingException, SQLException;
    /*Bean Class*/
    package com.nseit.ncfm2.data.ejb;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    import javax.ejb.TransactionAttribute;
    import javax.ejb.TransactionAttributeType;
    import javax.ejb.TransactionManagement;
    import javax.ejb.TransactionManagementType;
    import javax.naming.NamingException;
    import com.nseit.ncfm2.security.Audit;
    import com.nseit.ncfm2.util.server.lookup.LookUpServerResources;
    import java.sql.*;
    import java.util.*;
    * Session Bean implementation class ProductionDataChangesRequestsBean
    @Stateless(name = "ProductionDataChangesRequestsBean", mappedName = "ProductionDataChangesRequestsEJB")
    @Remote(ProductionDataChangesRequestsRemote.class)
    @TransactionManagement(TransactionManagementType.CONTAINER)
    public class ProductionDataChangesRequestsBean implements
              ProductionDataChangesRequestsRemote {
         * Default constructor.
         public ProductionDataChangesRequestsBean() {
              // TODO Auto-generated constructor stub
         @Override
         @TransactionAttribute(TransactionAttributeType.REQUIRED)
         public boolean shiftCandidateDetails(String sourceNcfmId,
                   String destinationNcfmId, Collection<String> specialCasesList,
                   String shiftingRemarks, String user, Audit updtAudit)
                   throws NamingException, SQLException {
              // TODO Auto-generated method stub
              Connection conn = null;
              PreparedStatement pstmt = null;
              int updtCnt = 0;
              boolean areDetailsShifted = false;
              try {
                   /* Start: update table-1 */
                   updtCnt = pstmt.executeUpdate();
                   /* End: update table-1 */
                   /* Start: update table-2 */
                   updtCnt = pstmt.executeUpdate();
                   /* End: update table-2 */
                   areDetailsShifted = true;
              } /*catch (SQLException e) {
                   // TODO Auto-generated catch block
                   System.out
                             .println("SQLException in ProductionDataChangesRequestsBean.shiftCandidateDetails(...) "
                                       + e.getMessage());
                   // e.printStackTrace();
                   context.setRollbackOnly();
              } */finally {
                   LookUpServerResources.closeStatement(pstmt);
                   LookUpServerResources.closeConnection(conn);
              return areDetailsShifted;
    Currently,if the 1st table update succeeds and the 2nd table update gives an exception,a rollback is not taking place i.e records in 1st table are updated.
    I want the transaction to be rolled back in case an SQLException occurs(or for that matter,any runtime exception occurs).
    I tried two approaches :
    i: Use of context.setRollbackOnly() in catch block for SQLException
    ii:Throwing the SQLException
    In both the cases, the transaction didn't roll back.
    How can I achieve this :
    i: Without the usage of @ApplicationException annotation(as I do not have any application exceptions)
    ii: Without catching the SQLException and then calling context.setRollbackOnly()
    Or what is the standard way?
    Thanks !

    Where is your connection object coming from?

Maybe you are looking for

  • How to find a row of a table

    I create VO, EO, AM. I create a form based on VO. It shows the data of the first row. How to set the AM that the form can shows a specific row? For example, after adding some code (set getting the 5th row) in AM, the form can show the data of the 5th

  • Gregorian to hijri and viceversa javascript

    I have a Javascript for a Hijri / Gregorian calendar. I need to get it into Adobe Acrobat PDF. The business requirements for this are easy. Just take the script i give you and get it to work in Adobe Acrobat PDF. The technical side is tricky. I haven

  • How to perform a WS-transaction between two webservices implemented in EJB3

    Hello, I would like to have an example of how to perform a WS-Transaction between two web services implemented with EJB 3.0. It should be done through code. Thanks in advance.

  • Update of QMEL-QWRNUM field

    Hi experts, how to update field QMEL-QWRNUM ? I found BAPI_ALM_NOTIF_DATA_MODIFY, but there is no field QWRNUM to change. Thank you in advance. BR Paul

  • I can't open InDesign6 since I've downloaded OSX Mavericks.

    I try to open InDesign6 and get the "InDesign6 quit unexpectedly" error message. I have uninstalled and installed the program and still nothing.