MDB transaction getting silently rolled back?

          I have an MDB that is doing a delete of a database record in the onMessage method.
          It seems to work fine. I see no errors in the log, in fact I have some debug
          statements that indicate everything was completed normally. I even do a count
          sql using the same where clause and print the results and see a '0'.
          However, when I check the database, the record is still there.
          It seems as if the transaction is getting rolled back somehow. The MDB is transaction
          required/container tx. I never setRollbackOnly anywhere.
          The topic was originally published in a transaction that was rolled back, if that
          makes any difference. In fact, the point of the MDB is to clean up a record that
          was created during the transaction but not within the transaction.
          Any help is appreciated!
          ken
          

          It turned out that the MDB was using a different connection pool than it should
          have, which was pointed to an old copy of the database. So it wasn't really rolling
          back, it really was deleting records as desired, just in the wrong database.
          Thanks
          ken
          Tom Barnes <[email protected].bea.com>
          wrote:
          >Some random ideas:
          >
          >Is the app sending a delete request to the MDB, and
          >the MDB acting on it, before the record is even inserted?
          >
          >Does the delete request have the correct row-id/PK?
          >
          >Is the MDB app failing without your knowledge? You
          >can instrument the MDB onMessage() with a
          >"try catch Throwable" to see.
          >
          >Is the MDB tx timing out trying to get a lock
          >on the row? You can instrument the onMessage
          >with timestamps to see if its taking longer than 30 seconds...
          >
          >Tom
          >
          >Ken Clark wrote:
          >
          >> I have an MDB that is doing a delete of a database record in the onMessage
          >method.
          >> It seems to work fine. I see no errors in the log, in fact I have
          >some debug
          >> statements that indicate everything was completed normally. I even
          >do a count
          >> sql using the same where clause and print the results and see a '0'.
          >>
          >> However, when I check the database, the record is still there.
          >>
          >> It seems as if the transaction is getting rolled back somehow. The
          >MDB is transaction
          >> required/container tx. I never setRollbackOnly anywhere.
          >>
          >> The topic was originally published in a transaction that was rolled
          >back, if that
          >> makes any difference. In fact, the point of the MDB is to clean up
          >a record that
          >> was created during the transaction but not within the transaction.
          >>
          >> Any help is appreciated!
          >>
          >> ken
          >
          

Similar Messages

  • Transaction is not Rolling Back in Stateless Session Bean

              Hi,
              I am using UserTransaction in Stateless Session bean .
              Transaction is not rolling back.
              The following code is writen in stateless session bean. In UserTransaction i am
              calling Two methods of another stateless session bean.
              The problem is if doJob2() method fails, doJob1() method is rolling back. These
              two methods consist of SQL statement with different Connection Object from TXDataSource.And
              session bean(TestSession) is set to CMT, attribute as "Required".
              try{
              Context ictx=new InitialContext();
              TestHome home=(TestHome)ictx.lookup("TestSession");
                   utx = sessionCtx.getUserTransaction();
                   utx.begin();
              TestRemote remote=home.create();
                   remote.doJob1();
                   remote.doJob2();
                   utx.commit();
              }catch(Exception e)
                   try{
                   utx.rollback();
              }catch(Exception ex)
                   System.out.println("unable to rollback"+ex);
              if any SQL Exception as occured in doJob2(), its calling method utx.rollback()
              in catch block. but SQL statements executed thru. doJob1() are not rolling back.
              what might be the reason?
              thanks
              Ranganath
              

              Thanx Priscilla ,
              Transaction is working.
              ranganath
              "Priscilla Fung" <[email protected]> wrote:
              >
              >In your ejb-jar.xml, you should specify <transaction-type> element to
              >be "Container"
              >for container-managed transaction. If you specified it to be "Bean" for
              >bean-managed
              >transaction, EJB ontainer will suspend the caller's transaction before
              >starting
              >a new transaction for your doJobX() methods. Thus, doJob1()nd doJob2()
              >will be
              >executing in different transactions, and thus rolling back doJob2()'s
              >transaction
              >will have no effect on work done and committed in doJob1()'s transaction.
              >
              >Regards,
              >
              >Priscilla
              >
              >
              >"Ranganath" <[email protected]> wrote:
              >>
              >>
              >>
              >>I am sending config.xml,deployment descriptors, code snippet for TestSession.
              >>i
              >>am using weblogic6.0sp2.
              >>if you need any aditional info. please let me know.
              >>
              >>thanks
              >>ranganath
              >>
              >>EJB-JAR.xml
              >>
              >><?xml version="1.0"?>
              >>
              >><!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
              >JavaBeans
              >>1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
              >>
              >><ejb-jar>
              >>     <enterprise-beans>
              >>     <session>
              >>          <ejb-name>TestSession</ejb-name>
              >>          <home>com.apar.sslbridge.test.TestHome</home>
              >>          <remote>com.apar.sslbridge.test.TestRemote</remote>
              >>          <ejb-class>com.apar.sslbridge.test.TestBean</ejb-class>
              >>          <session-type>Stateless</session-type>
              >>          <transaction-type>Bean</transaction-type>
              >>          <resource-ref>
              >>     <res-ref-name>jdbc/oraclePool</res-ref-name>
              >>     <res-type>javax.sql.DataSource</res-type>
              >>     <res-auth>Container</res-auth>
              >>          </resource-ref>
              >>     </session>
              >>     </enterprise-beans>
              >>     <assembly-descriptor>
              >>     <container-transaction>
              >>          <method>
              >>          <ejb-name>TestSession</ejb-name>
              >>          <method-intf>Remote</method-intf>
              >>          <method-name>*</method-name>
              >>          </method>
              >>          <trans-attribute>Required</trans-attribute>
              >>     </container-transaction>
              >> </assembly-descriptor>
              >></ejb-jar>
              >>
              >>
              >>TestSession CODE:
              >>
              >>
              >>     public void doJob1() throws RemoteException
              >>     {
              >>     Statement st = null;
              >>     String query=null;
              >>     try{
              >>     con=getConnection();
              >>     st=con.createStatement();
              >>     query="insert into x values("+x+++")";
              >>     System.out.println(query);
              >>     int rec=st.executeUpdate(query);
              >>     }catch(SQLException sqle)
              >>     {
              >>     System.out.println("SQL Exception "+sqle);
              >> throw new RemoteException("RemoteException*****SQLError");
              >>     } catch (Exception e) {
              >>     System.out.println("Exception "+e);
              >> throw new RemoteException("RemoteException*****GenralError");
              >> }
              >>}
              >>
              >>
              >> public void doJob2()throws RemoteException
              >> {
              >> Connection con=null;
              >> Statement st = null;
              >> String query=null;
              >> try{
              >> con=getConnection();
              >> st=con.createStatement();
              >> query="insert into y values("+x+++")";
              >> System.out.println(query);
              >> int rec=st.executeUpdate(query);
              >> }catch(SQLException sqle)
              >> {
              >> System.out.println("SQL Exception "+sqle);
              >> throw new RemoteException("RemoteException*****SQLError");
              >> } catch (Exception e) {
              >> System.out.println("Exception "+e);
              >> throw new RemoteException("RemoteException*****GenralError");
              >>}
              >>}
              >>private Connection getConnection(){
              >>try {
              >>Connection con = StaticParams.POOL_DATASOURCE.getConnection();
              >>return con;
              >>     } catch(Exception e) {
              >>     System.out.println("TestBean.getConnection() Unable to get get pool
              >>connection
              >>" + e);
              >>     }
              >>}
              >>
              >>
              >>
              >>
              >>"Priscilla Fung" <[email protected]> wrote:
              >>>
              >>>It should work if you are using TxDataSource. Could you post your
              >config.xml,
              >>>deployment descriptors, code snippet for TestSession?
              >>>
              >>>Regards,
              >>>
              >>>Priscilla
              >>>
              >>>"Ranganath" <[email protected]> wrote:
              >>>>
              >>>>Hi,
              >>>>
              >>>> I am using UserTransaction in Stateless Session bean .
              >>>> Transaction is not rolling back.
              >>>>
              >>>>The following code is writen in stateless session bean. In UserTransaction
              >>>>i am
              >>>>calling Two methods of another stateless session bean.
              >>>> The problem is if doJob2() method fails, doJob1() method is rolling
              >>>> back. These
              >>>>two methods consist of SQL statement with different Connection Object
              >>>>from TXDataSource.And
              >>>>session bean(TestSession) is set to CMT, attribute as "Required".
              >>>>
              >>>> try{
              >>>> Context ictx=new InitialContext();
              >>>> TestHome home=(TestHome)ictx.lookup("TestSession");
              >>>>     utx = sessionCtx.getUserTransaction();
              >>>>     utx.begin();
              >>>> TestRemote remote=home.create();
              >>>>     remote.doJob1();
              >>>>     remote.doJob2();
              >>>>     utx.commit();
              >>>> }catch(Exception e)
              >>>> {
              >>>>     try{
              >>>>      utx.rollback();
              >>>> }catch(Exception ex)
              >>>> {
              >>>>     System.out.println("unable to rollback"+ex);
              >>>>     }
              >>>> }
              >>>>if any SQL Exception as occured in doJob2(), its calling method utx.rollback()
              >>>>in catch block. but SQL statements executed thru. doJob1() are not
              >>rolling
              >>>>back.
              >>>>what might be the reason?
              >>>>
              >>>>thanks
              >>>>Ranganath
              >>>
              >>
              >
              

  • Transaction - the subprocess rolling back parent JTA

    According to Oracle documentation,
    "if the caller partner link specifies transaction=participate and the subprocess also specifies transaction=participate, the subprocess rolls back the client JTA transaction."
    But what I experience is if I just set transaction=participate for the partner link alone (and not having transaction=participate in the subprocess), when the subprocess rolls back, it rolls back parent JTA transaction also.
    In fact, if we have just transaction=participate for the partner link (and not having transaction=participate in the subprocess), then the rollback in either Parent or Subprocess, is rolling back both Parent and Subprocess.
    Can somebody provide the exact usage of using transaction=participate at the subprocess level?
    Thanks,
    Joe

    Joe,
    You are seeing expected behaviour. Even though both flags are called "transaction" and both are set to "participate", they do different things.
    By specifying transaction=participate on the partner link, you are instructing the subprocess to enlist in the transaction. When the subprocess starts, it will then enlist itself. That's all. Now if a rollback occurs, all participating processes will be rolled back.
    If you specify transaction=participate at the process level, it has a different effect, and doesn't affect whether or not the transaction is rolled back or not. As I said in the previous paragraph, if the partner link specified transaction=participate, the subprocess will roll back if a rollback is issued, no matter what other settings you have.
    So what effect does that setting have at the process level? According to the doc:
    When transaction=participate, the process produces a fault that is not handled by fault handlers, which calls the transaction to be rolled back.
    This is not exactly crystal clear, to me, anyway. In practice if this is set and your subprocess throws an unhandled fault, it triggers a rollback instead of throwing a fault as it normally would. This exception goes immediately back to the calling process since it is participating on the transaction as well.
    If the property is not set, and the subprocess throws an unhandled fault, you get the normal behavior. Namely, the process will be flagged as faulted, and the calling process will wait until it gets a transaction timeout (no relation to the JTA transaction we're talking about here).
    It's a simple test. Create two processes, then run it twice. Once with that property set, and one without.
    The key is to remember that although they are both called "transaction=participate", the effect they have is very different. It was probably not a good move to use the same name and value like that. Hope this helps.
    Regards,
    Robin.

  • ORA-06519: active autonomous transaction detected and rolled back

    I am getting this error. when i am doing insert from my package Any solution to reslove this issue
    ORA-06519: active autonomous transaction detected and rolled back . thanks
    I am doing select - insert...

    Also, if you have any exception handler sections in the code,
    then you have to add a commit or rollback statement for
    every exception that is handled.

  • Can't install itunes 11.0.1 on windows 7...get a Rolling Back Action message

    Hi...I cannot install iTunes 11 on my Windows 7 PC. The installation goes all the way through and I get a "Rolling Back Action" dialog at the end and the progress bar just goes backwards.
    Why is this happening?

    Not an error that I've seen. What stage of the process are you at when this happens?
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • Once Again: Transaction is not rolled back...

    Hi all,
    I'm almost at the end of my project with Toplink. but I have to solve this transaction rollback problem. Here is my previous message. any comment is more than welcome.
    The problem is this, I pass 2 objects to Toplink to update in database using activeUnitOfWork.shallowMergeClone() method.
    one of the updates fails then I expect everything to be rolled back within the same unitofwork. but NOT. the other object is quite well updated in database even though they are merged in the same unit of work... please HELP...
    here is the log :
    UnitOfWork(31228)--JTS#beforeCompletion()
    UnitOfWork(31228)--#executeQuery(WriteObjectQuery(com.vnu.publitec.axis.persistence.Parameters@7a0b))
    UnitOfWork(31228)--Connection(31249)--UPDATE PARAMETERS SET PARAM_VALUE = '26' WHERE (PARAM_NAME = 'TEST_PARAMETER_2')
    UnitOfWork(31228)--#reconnecting to external connection pool
    UnitOfWork(31228)--#executeQuery(WriteObjectQuery(com.vnu.publitec.axis.persistence.Parameters@7a06))
    UnitOfWork(31228)--Connection(31249)--UPDATE PARAMETERS SET PARAM_MAX_SIZE = 666666, PARAM_COMMENTS = 'updated by new axis...', PARAM_VALUE = '18' WHERE (PARAM_NAME = 'TEST_PARAMETER_1')
    UnitOfWork(31228)--EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-01438: value larger than specified precision allows for this column
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-01438: value larger than specified precision allows for this column
    ...... //some more message
    UnitOfWork(31228)--JTS#afterCompletion()
    UnitOfWork(31228)--release unit of work
    ClientSession(31229)--client released
    environment information is :
    J2EE Server is Oracle9iAS (9.0.3.0.0) Containers for J2EE
    and following is a piece of sessions.xml file related to external transaction controller settings :
    <session-type>
    <server-session/>
    </session-type>
    <login>
    <datasource>java:comp/env/jdbc/xxx</datasource>
    <uses-native-sql>true</uses-native-sql>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    </login>
    <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
    thanks
    Erdem.

    Hi James,
    As Erdem is not available, I am now taking care of the issue. The datasource name in session.xml refers to the one defined in OC4J data-sources.xml "ejb-location" attribute of "data-source" element. Below, I attach the relevant sections of both files
    session.xml
    <session>
    <name>Axis_session</name>
    <project-xml>AxisCDM.xml</project-xml>
    <session-type>
    <server-session/>
    </session-type>
    <login>
    <datasource>java:comp/env/jdbc/AXIS_323DS</datasource>
    <uses-native-sql>true</uses-native-sql>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    </login>
    <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
    data-sources.xml:
    <data-source     
    class="com.evermind.sql.DriverManagerDataSource"
    name="AXIS_323DS"
    location="jdbc/AXIS_323CoreDS"
    xa-location="jdbc/xa/AXIS_323XADS"
    ejb-location="jdbc/AXIS_323DS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="XXX"
    password="XXX"
    url="jdbc:oracle:oci8:@ddb"
    inactivity-timeout="30"
    connection-retry-interval="1"
    />
    On the client we get the following exception:
    com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: Error in transaction: EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-01438: value larger than specified precision allows for this column
    On the server, we have implemented SessionSynchronization to monitor the transaction. afterCompletion method gets a boolean value "true" indicating that the transaction was comitted.
    Any database operation that was successful before the erroneous case was saved in DB.
    Thanks,
    Melih

  • Transaction Process not rolling back

    Hi Experts,
    I am testing the Transaction Process which uses a DB Adapter (which calls a procedure) to insert data into a table. There are 2 fileds in the table (employee id and employee name) and in this employee id is the primary key. In the same scope I invoke this DB Adapter PL twice and for the first invoke it went fine but for the second invoke it has thrown me a unique constraint exception (as again I am passing the same data). I am catching the exception with a catch all block which is working absolutely fine.
    The problem is in the table I am getting the data entry for the first invoke which should have roll backed as i am using the *'transaction=participate'* property and respective changes have been done in bpel.xml for supporting the transaction.
    There should be no entry in the table but yet I am getting it. Please help me.
    Where could I have gone wrong?????
    I am using BPEL-10.1.3.1 version.
    Thanks in advance.
    Cheers,
    Ankit
    Edited by: user11083689 on Apr 24, 2009 4:41 AM

    hi,
    There are two mechanisms to force a rollback from a BPEL process.
    Explicitly — throw a bpelx:rollback fault within your flow:
    <throw name="Throw" faultName="bpelx:rollback"/>
    Invoke a partner link that marks the JTA transaction for rollback only.
    For example, in Oracle SOA Suite for 10.1.3.1.0, if Oracle BPEL Process Manager invokes an Oracle Enterprise Service Bus (ESB) flow that in turn fails to call a Web service endpoint, the JTA transaction is marked for rollback. Since the Oracle ESB flow enlists its local transaction in the JTA transaction, a rollback on the JTA transaction impacts Oracle BPEL Process Manager's ability to dehydrate (as the JTA transaction is used by Oracle BPEL Process Manager for persistence).
    regards
    Rajesh

  • Transaction doesn't roll back to Oracle

              Hello, I would like to ask does webloogic support transaction controlled by client
              which is out of container? My case is that i use UserTransaction in the client
              application(not within bean). Bean methods (CMP) are invoked between the UserTransaction.begin()
              and UserTransaction.rollback(). However, row are inserted into database and the
              rollback fail at the end.
              Any ideas?
              Thanks
              

              Joseph Weinstein <[email protected]> wrote:
              >
              >
              >Leo Choi wrote:
              >
              >> Hello, I would like to ask does webloogic support transaction controlled
              >by client
              >> which is out of container? My case is that i use UserTransaction in
              >the client
              >> application(not within bean). Bean methods (CMP) are invoked between
              >the UserTransaction.begin()
              >> and UserTransaction.rollback(). However, row are inserted into database
              >and the
              >> rollback fail at the end.
              >>
              >> Any ideas?
              >
              >I assume you get the UserTransaction from Weblogic. How are the bean's
              >transactional
              >behavior specified? TX-SUPPORTS, TX-REQUIRES, etc? What version of weblogic
              >are you running? To answer your question in the general, if the beans
              >are involved in the
              >transaction, then all DBMS updates they do should roll back if you roll
              >back the UserTransaction.
              >If, however, the beans are not part of the tx, such as if they are marked
              >as TX-REQUIRES-NEW,
              >then each invoke of the bean will start it's own tx during the invoke,
              >and commit it separately
              >at each method, so any later rollback of the bigger tx won't involve
              >any of the little
              >already-committed
              >EJB tx's...
              >Joe
              >
              >>
              >>
              >> Thanks
              >
              Thanks for you reply. I am new to transaction.
              The version i am using is 7.0. I get the UserTransaction by ctx.lookup("UserTransaciton......)
              where ctx is the InitialContext.
              You are right, i found that the transaction is committed at each method.
              If i call setRollBackOnly() before calling the bean method, the transaction
              cannot committed.
              But it is meaningless to me since the transaction should be able to roll
              back at any points before the UserTansaction.commit();
              TX-SUPPORTS, TX_REQUIRES....are you talking about the deployment descriptor?
              I have check the deployment descriptor, the transaction attr is Required.
              The rollback() method doesnt work. Are there any things missing?
              Thanks
              

  • Statement in Transaction Does Not Roll Back

    I have a group of MySQL statements in a method of a Java application.
    I include an SQL error in the last statement to test the rollback of the transaction.
    All the statements roll back, EXCEPT for the one detailed below.
    The MySQL table:
         CREATE TABLE Counter (
              number INT( 4 ) NOT NULL DEFAULT 0,
              account_id VARCHAR( 12 ) NOT NULL PRIMARY KEY
         ) ENGINE = InnoDB;I have run the staement as a PreparedStatement and a Statement:
    PreparedStatement:
         String updateCounterStr =
              " UPDATE Counter " +
                   " SET number = number + 1 " +
                   " WHERE account_id = ? "
         updateCounter = con.prepareStatement ( updateCounterStr );
              updateCounter.setString( 1, accountID );
              int uc = updateCounter.executeUpdate();     Statement:               
         Statement updateCounterStatement = con.createStatement();
              int updatecounter = updateCounterStatement.executeUpdate(
                   "UPDATE Counter SET number = number + 1 " +
                   "WHERE account_id = \'" + accountID + "\'"
              con.setAutoCommit( true );     //     ------------------------------------ Transaction ENDS
              updateCounterStatement.close();
    //               updateCounter.close();
              ... several more
              con.close();
         } catch(SQLException ex) {
              System.err.println("SQLException: " + ex.getMessage());
              if (con != null) {
                   try {
                        System.err.print("Transaction is being ");
                        System.err.println("rolled back");
                        con.rollback();     //     < ------------------------------------ con.rollback() HERE
                   } catch(SQLException excep) {
                        System.err.print("SQLException: ");
                        System.err.println(excep.getMessage());
    }     //     ---------------------------------------- END the methodIn both cases Counter is incremented, but does NOT roll back.
    The other statements in the transaction do roll back,
    I am using:
    mysql Ver 14.12 Distrib 5.0.18, for apple-darwin8.2.0 (powerpc) using readline 5.0
    on Mac OS X 10.4.x
    I would greatly appreciate a solution to this problem.
    Many thanks in advance

    I think autocommit is true by default. Also, it looks like your'e setting it to true, and then executing more SQL.
    Explicitly set it to false, and DON'T set it back to trueif there's any chance you're going to want to rollback after that.

  • Fading Rollover Widget - How to get it roll back in again on Rolloff?

    Hey there,
    sorry for that confusing title
    For a nice menu effect, I would like to use the Fading Rollover Widget.
    As fading type I went for "horizontal", however, once it has completed this action, the menu does not roll back in again on Rolloff.
    Is there a way to fix this?
    You can visit the site at kundenservice.n90media.de/n90media (regarding the menu on top of the page).
    -Markus

    You can use accordion menu , where menu items can be inserted in container.
    Also , check the available ones here :
    http://musewidgets.com/search?q=menu
    Thanks,
    Sanjit

  • Multiple Transaction with Fully Rolled Back

    Hi there,
    I've the scenario for a project that require multiple transaction as a subsequent process. I'll have one RFC Function Module that wrap multiple BAPI inside there. This RFC will be publish as a webservice and will be consumed by .NET application.
    The problem that I've, the subsequent process will depend each other. For the example : Create SO, Purch Requisition, and with Reference to PR, I need to create the PO. So I need to commit the transaction for Sales Order creation before I can't continue to create the purchase order.
    If there is a problem during the creation of PO, the Sales Order already committed to the database and I can't roll it back.
    Any suggest, how I can handle this situation with concept of Complete the whole transaction and not at all if there is an error for one of the transaction.
    Thanks in advance for any help.
    Cheers,
    Danny

    Hi Danny,
    Unfortunately this is the only option for you because you cannot rollback after you commit to the database. The other option would be to trigger Check BAPIs or BAPIs with test mode = 'X'....but that will be a problem for e.g. if you want to create a PO with reference to a PR created in the earlier step. If you can omit the part of creating with reference, then I think this is possible by first triggering BAPIs in test mode for all the documents that have to be created - if the whole chain is successful then you trigger BAPIs in update mode to post the docs (Commit) or else exit the process. Hope it made sense.
    Cheers,
    Sougata.

  • How many of the transactions woill be Roll backed?

    Hi friends,
    Could you please clarify That How many of the transactions will be rollbacked when we say ROLLBACK....?
    (For e.g., As a first transaction i used delete command to delete one row from a table of 10 rows....As a second transaction i used update command two times to update two records in the same table....Now i created one table ...after that i said rollback....So how many of the transactions will be rollbacked?)

    I'm sure blushadow has heard of all of those, but what does it have to do with the original question?
    SQL> CREATE TABLE t AS
      2  SELECT rownum id, TO_CHAR(TO_DATE(rownum, 'J'), 'Jsp') descr
      3  FROM all_objects WHERE rownum < 10;
    Table created.
    SQL> SELECT * FROM t;
            ID DESCR
             1 One
             2 Two
             3 Three
             4 Four
             5 Five
             6 Six
             7 Seven
             8 Eight
             9 Nine
    SQL> DELETE FROM t WHERE id = 1;
    1 row deleted.
    SQL> SAVEPOINT a;
    Savepoint created.
    SQL> UPDATE t SET descr = 'Deux'
      2  WHERE id = 2;
    1 row updated.
    SQL> SAVEPOINT b;
    Savepoint created.
    SQL> UPDATE t SET descr = 'Trois'
      2  WHERE id = 3;
    1 row updated.
    SQL> SELECT * FROM t;
            ID DESCR
             2 Deux
             3 Trois
             4 Four
             5 Five
             6 Six
             7 Seven
             8 Eight
             9 NineI agree that at this point, I can rollback to any point in these three statements, however, as soon as I do:
    SQL> CREATE TABLE t1 (id NUMBER);
    Table created.then the savepoints are gone
    SQL> ROLLBACK TO b;
    ROLLBACK TO b
    ERROR at line 1:
    ORA-01086: savepoint 'B' never establishedNow, the documentation says "If you use a SET TRANSACTION statement, then it must be the first statement in your transaction.", and the very first DELETE starts a transaction. and the fact that:
    SQL> SET TRANSACTION AUTONOMOUS;
    SET TRANSACTION AUTONOMOUS
    ERROR at line 1:
    ORA-00900: invalid SQL statementis invalid, even if you could use SET TRANSACTION within an already started transaction. I suppose you could do:
    SQL> DROP TABLE t1;
    Table dropped.
    SQL> TRUNCATE TABLE t;
    Table truncated.
    SQL> INSERT INTO T
      2  SELECT rownum id, TO_CHAR(TO_DATE(rownum, 'J'), 'Jsp') descr
      3  FROM all_objects WHERE rownum < 10;
    9 rows created.
    SQL> COMMIT;
    Commit complete.
    SQL> DELETE FROM t WHERE id = 1;
    1 row deleted.
    SQL> SAVEPOINT a;
    Savepoint created.
    SQL> UPDATE t SET descr = 'Deux'
      2  WHERE id = 2;
    1 row updated.
    SQL> SAVEPOINT b;
    Savepoint created.
    SQL> UPDATE t SET descr = 'Trois'
      2  WHERE id = 3;
    1 row updated.
    SQL> DECLARE
      2  PRAGMA AUTONOMOUS_TRANSACTION;
      3  BEGIN
      4     EXECUTE IMMEDIATE 'CREATE TABLE t1 (id NUMBER)';
      5  END;
      6  /
    PL/SQL procedure successfully completed.
    SQL> ROLLBACK to b;
    Rollback complete.but it seems like a lot of effort to get around something that you shouldn't be doing in the first place.
    John

  • Transaction is not rolling back

    I have statefull session CMT bean and I have a method
    public void meth1() {
    try {
    dao1.method1(connection);
    dao2.method2(connection);
    } catch (SQLException ex) {
    sessioncontext.setRollbackOnly();
    throw (application exception);
    If dao2.method2 raises sqlexception then whatever happend in dao1.method1 is committed. I have "Required" as transaction attribute for this session method.
    Also I cannot raise system exception as this removes the session bean instance. We are using j2ee 1.2.
    How to rollback for application errors.
    Thanks in advance

    I've never used oracle, so I can't say what your setup should be, however...
    databases can have transactions and the syntax is different between databases, e.g.
    start {start the transaction}
    update table X .....
    rollback {rollback the transaction}
    should not update the database
    but if table X does not support transactions, you can't do this.
    I had this problem with mysql, where everything worked fine until I had an exception or called setRollbackOnly. Some stuff would rollback (ovbiously cached in the app server), but other stuff wouldn't.
    I configured the tables in mysql to support transactions and it all worked.

  • Adding #FROM_ROLE TO wf_notifications.send is giving error :active autonomous transaction detected and rolled back

    Hello all,
    I'm using the below code to send the notication using plsql package. It works fine and sends notification if i don't use '#FROM_ROLE' and 'SENDER' attributetext in the code. If i use them, i get the error message. Please advice
        L_MESSAGE_TYPE := 'WFMAIL';
        L_MESSAGE_NAME := 'OPEN_MAIL_FYI';
        L_NID          := WF_NOTIFICATION.SEND(UPPER(P_USER_NAME),
                                               L_MESSAGE_TYPE,
                                               L_MESSAGE_NAME);
        WF_NOTIFICATION.SETATTRTEXT(L_NID, 'SUBJECT', P_SUBJECT);
        WF_NOTIFICATION.SETATTRTEXT(L_NID, 'BODY', P_TEXT_BODY);
        WF_NOTIFICATION.SETATTRTEXT(L_NID, '#FROM_ROLE', 'USERNAME1'); 
        WF_NOTIFICATION.SETATTRTEXT(L_NID, 'SENDER', 'USERNAME1');
        WF_NOTIFICATION.DENORMALIZE_NOTIFICATION(L_NID);
    Thanks
    KK

    Hi KK,
    What error you are getting when you set the attributes '#FROM_ROLE' and 'SENDER'?
    when you set '#FROM_ROLE' then  Wf_Notification.Denormalize_Notification(nid) API will be called.  If the attribute is 'sender' then event 'oracle.apps.wf.notification.setattrtext wll be rasied.

  • Container transaction NOT rolled back after a long period of time.

    Hi, I am using Weblogic 6.1SP5 on RedHat 7.1 and I have seen an unexpected
              behaviour with an MDB and I would like to know if there is any circumstance
              in which a transaction is not rolled back automatically by the container
              after the transaction timeout specified on MDB descriptor expired.
              The fact is I have seen a thread locked for 3 entire days without any
              exception being raised (the trans timeout was set to 900 seconds for
              debugging porpouses)
              Sadly I didn't thought on issuing a ps -ax and a netstat -np in order to see
              if there was any connection active for any of the JVM threads.
              As an aside note I had to throw a kill -9 to Weblogic's JVM in order to
              completely stop it because using the standard "stopWeblogic.sh" script it
              got stalled.
              The only unusual thing that I can think of the MDB is doing is opening a
              connection against a remote system via a socket.
              My question is. Is it possible that a thread locked on I/O (in this case a
              socket) to be out of control in terms of throwing at it a "Transaction
              rolled back exception"?
              I have modified my code in order to set SO_TIMEOUT on the socket just in
              case the other peer hangs and never returns control. But I would like to
              know the problem could be there.
              I know for sure that at the time the thread stalled the other peer died
              (exceptions on other MDBs trying to connect to remote system) but I expected
              a "socket exception" to be thrown by the O.S. to the stalled thread instead
              of having the thread waiting forever on that "open" socket.
              Thanks in advance.
              Ignacio.
              

    While a tramsaction may be rolled back at the transaction timeout,
              the thread is not stopped. The actual exception won't occur until
              the MDB completes. If the MDB doesn't complete (as in this case),
              you won't get the exception.
              "Ignacio G. Dupont" <[email protected]> wrote in message news:[email protected]...
              > Hi, I am using Weblogic 6.1SP5 on RedHat 7.1 and I have seen an unexpected
              > behaviour with an MDB and I would like to know if there is any circumstance
              > in which a transaction is not rolled back automatically by the container
              > after the transaction timeout specified on MDB descriptor expired.
              >
              > The fact is I have seen a thread locked for 3 entire days without any
              > exception being raised (the trans timeout was set to 900 seconds for
              > debugging porpouses)
              >
              > Sadly I didn't thought on issuing a ps -ax and a netstat -np in order to see
              > if there was any connection active for any of the JVM threads.
              >
              > As an aside note I had to throw a kill -9 to Weblogic's JVM in order to
              > completely stop it because using the standard "stopWeblogic.sh" script it
              > got stalled.
              >
              > The only unusual thing that I can think of the MDB is doing is opening a
              > connection against a remote system via a socket.
              >
              > My question is. Is it possible that a thread locked on I/O (in this case a
              > socket) to be out of control in terms of throwing at it a "Transaction
              > rolled back exception"?
              >
              > I have modified my code in order to set SO_TIMEOUT on the socket just in
              > case the other peer hangs and never returns control. But I would like to
              > know the problem could be there.
              >
              > I know for sure that at the time the thread stalled the other peer died
              > (exceptions on other MDBs trying to connect to remote system) but I expected
              > a "socket exception" to be thrown by the O.S. to the stalled thread instead
              > of having the thread waiting forever on that "open" socket.
              >
              > Thanks in advance.
              >
              > Ignacio.
              >
              >
              

Maybe you are looking for

  • PowerMacG4 won't start without old Cinema Display attached

    PowerMacG4 867dp (Mirror Door) NVidia GeForce4mx w/ADC+DVI 20" Cinema Display w/ power switch, on ADC port Acer 23" G23HL, on DVI port     I replaced my failing ADC with a new display (with much-appreciated help from this board!) Works fine as domina

  • Adobe Lightroom Mobile

    Anything Adobe has is pretty Good and from what I read this Apps that is now available on Android is one that is Very Popular..  It does however have a Cost of $9.99 and you'll have to use in conjunction with the Desktop App L-5  it sounds fun to try

  • Retrieving specific information from a website

    Ok, here's my problem. I want to display the current weather conditions on my site. Just the text for now, dont need pictures or anything. But i have absolutely no idea how i would retrieve the webpage and then take only the part i need (the weather)

  • SRM - SUS on two different hardware

    Dear All, We use SRM 5.0 (SRM server 5.5) and SRM-SUS (SRM server 5.5) on two different servers.  This is because of security reasons. Purchasers access the internal server, suppliers access ONLY the server running SUS. How is it possible that (what

  • HT4914 Can you stream itunes match to an iphone or does it have to download?

    Can you stream itunes match to an iphone or does it have to download to the device?  I do not have space on my phone and just want to be able to stream. thank you