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

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
              >>>
              >>
              >
              

  • 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.

  • 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 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.

  • 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.
              >
              >
              

  • Transaction not rolling back in stateless session bean

              Hi,
              I am facing a problem...
              I have one stateless session bean which does multiple updates in SYBASE database.I
              am using non-transactional datasource. Bean calls a method of data access obejct
              whcih internally calls more than one one mehtod to update different tables.If
              any of update fails then I am explicitly thorwing EJBException. Still it is not
              rolling back.
              I have one more application where similar situation is there but only difference
              is that there we have Entity bean and updates are being done through store method.
              In that case with same datasource it is rolling back perfectly.
              I have tried with transactional datasource as well but it didn't work.Then I tried
              to put setAutoCommit(false) in my connection class which gives me connection.But
              then it is not allowing me to enter into my application.
              In deployment descriptor for both the beans transaction attribute is required
              for all methods.
              Regards.
              Rahul.
              

              Hi,
              I am facing a problem...
              I have one stateless session bean which does multiple updates in SYBASE database.I
              am using non-transactional datasource. Bean calls a method of data access obejct
              whcih internally calls more than one one mehtod to update different tables.If
              any of update fails then I am explicitly thorwing EJBException. Still it is not
              rolling back.
              I have one more application where similar situation is there but only difference
              is that there we have Entity bean and updates are being done through store method.
              In that case with same datasource it is rolling back perfectly.
              I have tried with transactional datasource as well but it didn't work.Then I tried
              to put setAutoCommit(false) in my connection class which gives me connection.But
              then it is not allowing me to enter into my application.
              In deployment descriptor for both the beans transaction attribute is required
              for all methods.
              Regards.
              Rahul.
              

  • Stateless SessionBean  Transaction not Rolling Back

    I have a situation to create two Entity Beans within a single Transaction,
              so I created a Session Bean to create the two Entity Beans.
              I have the Session bean with attribute
              <session-type>Stateless</session-type>
              <transaction-type>Container</transaction-type>
              And 2 Entity beans with attributes:
              <persistence-type>Container</persistence-type>
              <trans-attribute>Required</trans-attribute>
              Inside the Session Bean I have a method which calls the create on the two
              Entity Beans.
              create ContactInfo(){
              Phone ph = phoneHome.Create(phoneData);
              Address ad = addressHome.Create(addressData);
              When the secound bean fails to create (Key voilation), my transaction is not
              getting rolled back.
              The Phone Create did not roll back eventhough the address create failed.
              Please give me some suggetion which transaction attributes to use
              I am using Weblogic 6.0
              

    For Create Exceptions , the transactions may or may not rollback. Mostly it
              wont rollback. You have to set the sessionctx.setRollbackOnly() to mark it
              for rollback in the catch block of the Create Exception.
              Regards,
              Swaminathan K.N.
              santo comar <[email protected]> wrote in message
              news:3b8dbb61$[email protected]..
              > I have a situation to create two Entity Beans within a single Transaction,
              > so I created a Session Bean to create the two Entity Beans.
              >
              > I have the Session bean with attribute
              >
              > <session-type>Stateless</session-type>
              > <transaction-type>Container</transaction-type>
              >
              > And 2 Entity beans with attributes:
              >
              > <persistence-type>Container</persistence-type>
              > <trans-attribute>Required</trans-attribute>
              >
              > Inside the Session Bean I have a method which calls the create on the two
              > Entity Beans.
              >
              > create ContactInfo(){
              > Phone ph = phoneHome.Create(phoneData);
              > Address ad = addressHome.Create(addressData);
              > }
              >
              > When the secound bean fails to create (Key voilation), my transaction is
              not
              > getting rolled back.
              > The Phone Create did not roll back eventhough the address create failed.
              > Please give me some suggetion which transaction attributes to use
              >
              > I am using Weblogic 6.0
              >
              >
              >
              

  • 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.

  • 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
              >
              

  • Toplink 9.0.4.8 and JTS on OAS 10.1.2.0.0 and 10.1.2.0.2 not rolling back

    Re-Posting message with more information.
    Toplink 9.0.4.8 and JTS not rolling back transaction
    Hi
    Scenario:
    I have a session bean (EJB1) calling a session bean (EJB2).
    When an EJB1 is called, EJB1 persists data on to Table1 in database.
    And EJB1 makes multiple calls to EJB2 to create entries in three different tables. Trans-attribute is set as required on both EJBS.
    Problem:
    EJB1 gets a Runtime Exception while inserting the data into TABLE1 (ORA-12899: value too large for column), EJB1 transaction is rollback, but all other transactions related to EJB2 are getting committed. I assume that they should roll back too.
    Also, I did JAD on external transaction controller and listener and noticed that there is a transaction associated to each call. Meaning EJB1 had Transaction T1 and EJB2 had T2, T3, and T4 for the subsequent calls. When EJB1 is getting runtime exception in the method beforeCompletion(), the it calls rollbackGlobalTransaction() which is calling T1.setRollbackonly(). But not on on T2, T3, and T4 rollback
    Am I missing anything?
    Please help me
    Here are my configuration details:
    The datasource configuration:
    <data-source name="myTxDataSource"
    class="com.evermind.sql.OrionCMTDataSource"
    location="jdbc/myTxDataSourceCoreDS"
    xa-location="jdbc/xa/myTxDataSourceXADS"
    ejb-location="jdbc/myTxDataSourceDS"
    pooled-location="jdbc/myTxDataSourcePooledDS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="duser"
    password="d123"
    url="jdbc:oracle:thin:@localhost:1521:ORCL"
    inactivity-timeout="30"
    />
    Sessions.xml
    <login>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>
    <datasource>jdbc/DimpleTxDataSourceCoreDS</datasource>
    <user-name>duser</user-name>
    <encryption-class-name>oracle.toplink.internal.security.JCEEncryptor</encryption-class-name>
    <encrypted-password>22F7AFE6F6B9672435537CE1189E123DD62D1A19DF561D1E</encrypted-password>
    <uses-native-sequencing>true</uses-native-sequencing>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    </login>
    <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
    Toplink Helper class that is used by both EJB's
    This one uses SessionBroker. here is how it is initialized:
    SessionManager manager = SessionManager.getManager();
    sessionBroker = (SessionBroker) manager.getSession(xmlLoader,
    sessionBrokerName, this.getClass().getClassLoader());
    Oracle9iJTSExternalTransactionController extController = new Oracle9iJTSExternalTransactionController();
    sessionBroker.setExternalTransactionController(extController);
    It has common following commong methods:
    public UnitOfWork getUnitOfWork() {
    UnitOfWork uow = sessionBroker.getActiveUnitOfWork();
    return uow;
    public Object create(Object o)
    UnitOfWork uow = getUnitOfWork();
    uow.registerNewObject(o);
    // added so that the assigned sequence number will be available before the commit happens
    uow.assignSequenceNumber(o);
    return o;
    }

    A couple of this appear different in your sessions.xml. To do what you want you need to configure TopLink to:
    1. Use an external XT controller - requires flag to be set and controller provided
    2. Use the OC4J data source - requires flag to be set and data source name provided
    I notice that your sessions.xml has both a data source name as well as a direct connection URL.
    Here is a sample that shows the proper settings for the external TX and data source usage:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!DOCTYPE toplink-configuration PUBLIC "-//Oracle Corp.//DTD TopLink Sessions 9.0.4//EN" "sessions_9_0_4.dtd">
    <toplink-configuration>
       <session>
          <name>default</name>
          <project-xml>META-INF/tlMap1.xml</project-xml>
          <session-type>
             <server-session/>
          </session-type>
          <login>
             <datasource>jdbc/DimpleTxDataSourceCoreDS</datasource>
             <platform-class>oracle.toplink.platform.database.oracle.Oracle10Platform</platform-class>
             <uses-external-connection-pool>true</uses-external-connection-pool>
             <uses-external-transaction-controller>true</uses-external-transaction-controller>
          </login>
          <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
          <enable-logging>true</enable-logging>
          <logging-options>
             <print-thread>false</print-thread>
             <print-date>false</print-date>
          </logging-options>
       </session>
    </toplink-configuration>Doug

  • Toplink 9.0.4.8 and JTS on OAS 10.1.2.0.0 and 10.1.2.0.2 not rolling back t

    Toplink 9.0.4.8 and JTS not rolling back transaction
    Hi
    Scenario:
    I have a session bean (EJB1) calling a session bean (EJB2).
    When an EJB1 is called, EJB1 persists data on to Table1 in database.
    And EJB1 makes multiple calls to EJB2 to create entries in three different tables. Trans-attribute is set as required on both EJBS.
    Problem:
    EJB1 gets a Runtime Exception while inserting the data into TABLE1 (ORA-12899: value too large for column), EJB1 transaction is rollback, but all other transactions related to EJB2 are getting committed. I assume that they should roll back too.
    Also, I did JAD on external transaction controller and listener and noticed that there is a transaction associated to each call. Meaning EJB1 had Transaction T1 and EJB2 had T2, T3, and T4 for the subsequent calls. When EJB1 is getting runtime exception in the method beforeCompletion(), the it calls rollbackGlobalTransaction() which is calling T1.setRollbackonly(). But not on on T2, T3, and T4 rollback
    Am I missing anything?
    Please help me
    Here are my configuration details:
    The datasource configuration:
    <data-source name="myTxDataSource"
    class="com.evermind.sql.OrionCMTDataSource"
    location="jdbc/myTxDataSourceCoreDS"
    xa-location="jdbc/xa/myTxDataSourceXADS"
    ejb-location="jdbc/myTxDataSourceDS"
    pooled-location="jdbc/myTxDataSourcePooledDS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="duser"
    password="d123"
    url="jdbc:oracle:thin:@localhost:1521:ORCL"
    inactivity-timeout="30"
    />
    Sessions.xml
    <login>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>
    <datasource>jdbc/DimpleTxDataSourceCoreDS</datasource>
    <user-name>duser</user-name>
    <encryption-class-name>oracle.toplink.internal.security.JCEEncryptor</encryption-class-name>
    <encrypted-password>22F7AFE6F6B9672435537CE1189E123DD62D1A19DF561D1E</encrypted-password>
    <uses-native-sequencing>true</uses-native-sequencing>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    </login>
    <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
    Toplink Helper class that is used by both EJB's
    This one uses SessionBroker. here is how it is initialized:
    SessionManager manager = SessionManager.getManager();
    sessionBroker = (SessionBroker) manager.getSession(xmlLoader,
    sessionBrokerName, this.getClass().getClassLoader());
    Oracle9iJTSExternalTransactionController extController = new Oracle9iJTSExternalTransactionController();
    sessionBroker.setExternalTransactionController(extController);
    It has common following commong methods:
    public UnitOfWork getUnitOfWork() {
    UnitOfWork uow = sessionBroker.getActiveUnitOfWork();
    return uow;
    public Object create(Object o)
    UnitOfWork uow = getUnitOfWork();
    uow.registerNewObject(o);
    // added so that the assigned sequence number will be available before the commit happens
    uow.assignSequenceNumber(o);
    return o;
    }

    Doug, Andrei and others
    I found the problem. I have a Delegate that provides access to all EJBS. This delegate is used by both the webtier and middle tier.It is written in a generic fashion so that the web server and middle tier does not have to be co-located in one container. getInitialContext() which is implemented as follows:
    private static Context getInitialContext() throws NamingException
    // Get InitialContext for Embedded OC4J.
    // The embedded server must be running for lookups to succeed.
    // actual code reads from the external parameters
    String contextFactory = "com.evermind.server.rmi.RMIInitialContextFactory";
    String principal = "admin";
    String passwd = "admin123";
    String providerURL = "ormi://localhost:3201/shc";
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, contextFactory);
    env.put(Context.SECURITY_PRINCIPAL, principal);
    env.put(Context.SECURITY_CREDENTIALS, passwd);
    env.put(Context.PROVIDER_URL, providerURL);
    env.put("dedicated.rmicontext","true");
    return new InitialContext(env);
    When the EJB1 tries to look up for EJB2, container thinks that the call is from outside the container and it is starting a new transaction.
    When I changed the EJB1 to look up EJB2 to get the context as shown below,every thing seems to rolling back.
    private static Context getInitialContext() throws NamingException
    return new InitialContext();
    Thanks again for pointing me in the right direction.
    I will post the same message in other threads.
    Raju

  • 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.

  • Transaction not rolled back

              Configuration:
              - WLS 5.10 SP8
              - Oracle 8.1.6
              - TX DataSource connected to a Connection pool of oracle JDBC connections
              I have a stateless session with a method register() that performs three insert operations in the oracle database via a connection fetched from tha TX Datasource object.
              The method register has been marked with the transaction attribute required.
              I recieve a SQLException from Oracle when trying to insert in one of the three tables and want to rollback the transaction.
              I have tried to use setRollBackOnly(), throw an EJB exception
              and i get the following message from WLS:
              java.sql.SQLException: ORA-00001: unique constraint (ISACOWN.UK_ISIS_REFERENCE2) violated
              at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
              at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java, Compiled Code)
              at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAccess.java, Compiled Code)
              at oracle.jdbc.oci8.OCIDBAccess.parseExecuteFetch(OCIDBAccess.java:1235)
              at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java, Compiled Code)
              at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
              at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1353)
              at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java, Compiled Code)
              at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java, Compiled Code)
              at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java, Compiled Code)
              at weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:47)
              at weblogic.jdbc20.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:54)
              at weblogic.jdbc20.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:55)
              at net.astrazeneca.cmi.data.Crud.execDML(Crud.java:283)
              at net.astrazeneca.cmi.data.dao.MolStructDAO.insertIsisRef(MolStructDAO.java:136)
              at net.astrazeneca.cmi.data.dao.MolStructDAO.insert(MolStructDAO.java, Compiled Code)
              at net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS.java, Compiled Code)
              at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStructureDSEOImpl.java, Compiled Code)
              at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(MolStructureDSEOImpl_WLSkel.java, Compiled Code)
              at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java, Compiled Code)
              at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandler.java, Compiled Code)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java, Compiled Code)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              ti jan 23 11:12:20 GMT+01:00 2001:<I> <EJB JAR deployment F:\Projects\MolStructureDS\MolStructureDS.jar> Transaction: '980237619834_1326' rolled back
              due to EJB exception:
              javax.ejb.EJBException
              at net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS.java, Compiled Code)
              Anybody got an idea ? at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStructureDSEOImpl.java, Compiled Code)
              at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(MolStructureDSEOImpl_WLSkel.java, Compiled Code)
              at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java, Compiled Code)
              at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandler.java, Compiled Code)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java, Compiled Code)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              ti jan 23 11:12:20 GMT+01:00 2001:<E> <Adapter> Exception thrown by rmi server: [-3565031217135527434S157.96.215.53:[7001,7001,7002,7002,7001,-1]/466]
              javax.ejb.EJBException
              at net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS.java, Compiled Code)
              at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStructureDSEOImpl.java, Compiled Code)
              at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(MolStructureDSEOImpl_WLSkel.java, Compiled Code)
              at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java, Compiled Code)
              at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandler.java, Compiled Code)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java, Compiled Code)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              No matter what I have tried so far the two inserts that are OK are commited in Oracle. What I want is to make all three inserts in the transaction rolled back.
              Anybody got an idea ?
              

              Yes, all through the same connection and the connection is from a TX data source in
              WLS 5.1 with SP8
              But.... I do NOT fetch the connection inside the transaction..but I didn't think
              that was nescessery... is it ?
              When I tried this and checked the JDBC log the auto-commit was turned to off and
              everything worked smoothly.
              /Paul
              "Cameron Purdy" <[email protected]> wrote:
              >All through the same connection? And the connection is from a tx data
              >source? And auto-commit is off?
              >
              >If so, then someone is committing the transaction.
              >
              >Is this 5.1?
              >
              >--
              >Cameron Purdy
              >Tangosol, Inc.
              >http://www.tangosol.com
              >+1.617.623.5782
              >WebLogic Consulting Available
              >
              >
              >"Paul Eriksson" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> I've already tried this but still... the tho first inserts are commited
              >and the third that causes the rollback of course is not.
              >>
              >> /P
              >>
              >> "Cameron Purdy" <[email protected]> wrote:
              >> >Don't set rollback only, just throw a runtime exception (like
              >EJBException).
              >> >
              >> >--
              >> >Cameron Purdy
              >> >Tangosol, Inc.
              >> >http://www.tangosol.com
              >> >+1.617.623.5782
              >> >WebLogic Consulting Available
              >> >
              >> >
              >> >"Paul Eriksson" <[email protected]> wrote in message
              >> >news:[email protected]...
              >> >>
              >> >> Configuration:
              >> >>
              >> >> - WLS 5.10 SP8
              >> >> - Oracle 8.1.6
              >> >> - TX DataSource connected to a Connection pool of oracle JDBC
              >connections
              >> >>
              >> >> I have a stateless session with a method register() that performs three
              >> >insert operations in the oracle database via a connection fetched from
              >tha
              >> >TX Datasource object.
              >> >>
              >> >> The method register has been marked with the transaction attribute
              >> >required.
              >> >>
              >> >> I recieve a SQLException from Oracle when trying to insert in one of
              >the
              >> >three tables and want to rollback the transaction.
              >> >>
              >> >>
              >> >> I have tried to use setRollBackOnly(), throw an EJB exception
              >> >> and i get the following message from WLS:
              >> >>
              >> >>
              >> >> java.sql.SQLException: ORA-00001: unique constraint
              >> >(ISACOWN.UK_ISIS_REFERENCE2) violated
              >> >>
              >> >> at
              >> >oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
              >> >> at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java,
              >> >Compiled Code)
              >> >> at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAccess.java,
              >> >Compiled Code)
              >> >> at
              >> >oracle.jdbc.oci8.OCIDBAccess.parseExecuteFetch(OCIDBAccess.java:1235)
              >> >> at
              >> >oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java,
              >> >Compiled Code)
              >> >> at
              >>
              >>oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232
              >)
              >> >> at
              >>
              >>oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:
              >1
              >> >353)
              >> >> at
              >> >oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java,
              >Compiled
              >> >Code)
              >> >> at
              >>
              >>oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.jav
              >a
              >> >, Compiled Code)
              >> >> at
              >>
              >>oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStat
              >e
              >> >ment.java, Compiled Code)
              >> >> at
              >>
              >>weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java
              >:
              >> >47)
              >> >> at
              >>
              >>weblogic.jdbc20.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedSt
              >a
              >> >tementImpl.java:54)
              >> >> at
              >>
              >>weblogic.jdbc20.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedSta
              >t
              >> >ement.java:55)
              >> >> at net.astrazeneca.cmi.data.Crud.execDML(Crud.java:283)
              >> >> at
              >>
              >>net.astrazeneca.cmi.data.dao.MolStructDAO.insertIsisRef(MolStructDAO.java:1
              >3
              >> >6)
              >> >> at
              >> >net.astrazeneca.cmi.data.dao.MolStructDAO.insert(MolStructDAO.java,
              >Compiled
              >> >Code)
              >> >> at
              >>
              >>net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS
              >..
              >> >java, Compiled Code)
              >> >> at
              >>
              >>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStruc
              >t
              >> >ureDSEOImpl.java, Compiled Code)
              >> >> at
              >>
              >>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(Mol
              >S
              >> >tructureDSEOImpl_WLSkel.java, Compiled Code)
              >> >> at
              >>
              >>weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAd
              >a
              >> >pter.java, Compiled Code)
              >> >> at
              >>
              >>weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandl
              >e
              >> >r.java, Compiled Code)
              >> >> at
              >>
              >>weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java,
              >> >Compiled Code)
              >> >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
              >Compiled
              >> >Code)
              >> >> ti jan 23 11:12:20 GMT+01:00 2001:<I> <EJB JAR deployment
              >> >F:\Projects\MolStructureDS\MolStructureDS.jar> Transaction:
              >> >'980237619834_1326' rolled back
              >> >> due to EJB exception:
              >> >> javax.ejb.EJBException
              >> >> at
              >>
              >>net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS
              >..
              >> >java, Compiled Code)
              >> >>
              >> >> Anybody got an idea ? at
              >>
              >>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStruc
              >t
              >> >ureDSEOImpl.java, Compiled Code)
              >> >> at
              >>
              >>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(Mol
              >S
              >> >tructureDSEOImpl_WLSkel.java, Compiled Code)
              >> >> at
              >>
              >>weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAd
              >a
              >> >pter.java, Compiled Code)
              >> >> at
              >>
              >>weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandl
              >e
              >> >r.java, Compiled Code)
              >> >> at
              >>
              >>weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java,
              >> >Compiled Code)
              >> >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
              >Compiled
              >> >Code)
              >> >>
              >> >> ti jan 23 11:12:20 GMT+01:00 2001:<E> <Adapter> Exception thrown by
              >rmi
              >> >server:
              >> >[-3565031217135527434S157.96.215.53:[7001,7001,7002,7002,7001,-1]/466]
              >> >>
              >> >> javax.ejb.EJBException
              >> >> at
              >>
              >>net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS
              >..
              >> >java, Compiled Code)
              >> >> at
              >>
              >>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStruc
              >t
              >> >ureDSEOImpl.java, Compiled Code)
              >> >> at
              >>
              >>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(Mol
              >S
              >> >tructureDSEOImpl_WLSkel.java, Compiled Code)
              >> >> at
              >>
              >>weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAd
              >a
              >> >pter.java, Compiled Code)
              >> >> at
              >>
              >>weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandl
              >e
              >> >r.java, Compiled Code)
              >> >> at
              >>
              >>weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java,
              >> >Compiled Code)
              >> >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
              >Compiled
              >> >Code)
              >> >>
              >> >>
              >> >>
              >> >> No matter what I have tried so far the two inserts that are OK are
              >> >commited in Oracle. What I want is to make all three inserts in the
              >> >transaction rolled back.
              >> >>
              >> >> Anybody got an idea ?
              >> >
              >> >
              >>
              >
              >
              

  • 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.

Maybe you are looking for