2 Phase commit from ADF UI

We have a requirement to commit database changes (Entity Objects) and Send of JMS Message (Weblogic JMS) in 2 phase transaction. How do we achieve that in ADF when using Faces and BC?

Well, for real 2PC you need XA data source, but ADF apps don't like XA data sources :) http://andrejusb.blogspot.com/2012/05/dont-use-oracles-driver-thin-xa-to.html
Maybe you can use this as starting point:
http://docs.oracle.com/cd/E13222_01/wls/docs90/jms/trans.html
http://jobinesh.blogspot.de/2010/07/running-applicationmodule-using.html
Dario

Similar Messages

  • ADF Service Interface: two-phase commit issue for multiple data sources

    In FusionApps, For a service interface we had to use two DataSource resources (in the ejb-jar.xml),
    one is ApplicationServiceDBDS for SI and the other one is ApplicationDBDS(I don’t know the exact reason why this is needed, but when running the webservice, Framework was throwing an error asking for this) After adding these two, now(while running the webservice) we’re caught up with an error saying that unable to participate in two phase commit. I think this is because we added two dataSources, if we just use one dataSource everything is working fine.
    Error message from app server:
    "JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the GlobalTransactionsProtocol attribute to LoggingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source=ApplicationDB"
    we have made the changes to ApplicationDB as said in the error message, but then the server is failing to start because of this.

    Hi,
    this is what the doc says - though not about two phase commit but transaction sharing:
    "At runtime, the calling client and the ADF service may or may not participate in the same transaction, depending on the protocol used to invoke the service (either SOAP or RMI). Only the RMI protocol and a Java Transaction API (JTA) managed transaction support the option to call the service in the same transaction as the calling client."
    When your application accesses a remote ADF Business Components service, each remote call is stateless, and the remote service will not participate in the same transaction as the business component that uses a service-enabled application module's service interface.
    In the majority of the cases, calls to remote services will be informational in nature and will not make changes to remote objects. However, if you must use a remote service to make changes, then keep these points in mind:
    An exception thrown by the remote service will cause the local transaction to fail.
    If you successfully call a remote service that results in modifying data, and then subsequently your local transaction fails for any reason, then it is the responsibility of your error handling code to perform a compensating transaction against the remote service to "undo" the previous change made."
    http://docs.oracle.com/cd/E23943_01/web.1111/b31974/bcextservices.htm
    Frank

  • Two phase commit and bean managed transactions

    To all the Transaction GURUS!
              Hi guys (-and gals).
              I've been doing J2EE for quite a while, but today was my first at
              XA-Transactions and Bean Managed Transactions.
              Why am I doing this?
              ====================
              Well I have to be able to controll the transactionalbehaviour of my
              bean
              during runtime, since some bean calls would cause a transactional
              overflow due to the stress they would cause to the system, whereas
              smaller bean calls need to run in one transaction.
              -> Therefore I need Bean Managed Transactions
              Since the bean does a call on two Database Connections it has to use a
              XA-Transaction.
              -> Therefore I need XA-Transactions.
              Abstract
              ========
              - I just can't get a User TransAction into the right Status it stays
              in 'STATUS_NO_TRANSACTION' all the time
              - Therefore the SQL Commands can be comitted 'java.sql.SQLException:
              Does not support SQL execution with no global transaction'
              - Therefore I can't do a rollback 'java.lang.IllegalStateException:
              Transaction does not exist'
              - Therefore I wrote this mail.
              I don't want to be a smart-"ass" writing such a detailed and indepth
              mail. I just would like to show that I tried, and would like to have
              some replies from you guys.
              Below are my configurations, code and logfiles.
              Thanx for taking your time and hope that the other people may learn
              something as well.
              cu
              Stefan
              Scenario
              ========
              used Software
              Bea Weblogic (WL) 6.0 SPx (not real sure which SP i have)
              Oracle 8.1.6 using the API-Version 8
              I configured the system as follows:
              (ofcourse I 'xxx'ed out all of the confidential data, sorry guys;-))
              excerpt from:
              config.xml
              <JDBCConnectionPool CapacityIncrement="5"
              DriverName="oracle.jdbc.driver.OracleDriver" InitialCapacity="2"
              LoginDelaySeconds="1" MaxCapacity="5" Name="oraclePool"
              Properties="user=xxx;password=xxx;dll=ocijdbc8;protocol=thin"
              RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
              TestTableName="languages" URL="jdbc:oracle:thin:@xxx:1521:xxx "/>
              <!-- Since this is our Main Datasource I would not like to use a XA
              Transaction due to performance Issues
              and the TxDataSource:
              -->
              <JDBCTxDataSource EnableTwoPhaseCommit="true"
              JNDIName="finstral.datasource.fbs" Name="finstral Content Datasource"
              PoolName="oraclePool" Targets="fbsserver"/>
              <!-- no comment required -I hope.
              Next comes the "special" Pool
              -->
              <JDBCConnectionPool CapacityIncrement="5"
              DriverName="weblogic.jdbc.oci.xa.XADataSource" InitialCapacity="1"
              LoginDelaySeconds="1" MaxCapacity="2" Name="oracleSecurityPool"
              Properties="user=xxx;password=xxx;server=xxx.xxx.xxx"
              RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
              TestTableName="Users" SupportsLocalTransaction="true"/>
              <!-- Well since there can only be one none XARessourceManager involved
              in a 2PC
              (keyword: Two Phase Commit) I will have to use a XACapable Driver for
              the other
              Datasource. Due to all the bugs in the oracle.xxx driver. I'll be
              using the jdriver for oci.
              I activated 'SupportsLocalTransaction' hoping it would solve my
              problem - without effect. I just left in there now, since it made
              sense me. Not?
              Again the TxDataSource:
              -->
              <JDBCTxDataSource EnableTwoPhaseCommit="true"
              JNDIName="finstral.datasource.fbssecurity" Name="finstral Security
              Datasource" PoolName="oracleSecurityPool" Targets="fbsserver"/>
              <!-- The System starts right up and can locate the test tables and
              everything. So I think all of this stuff is working here -->
              ejb-jar.xml
              <ejb-jar>
                   <enterprise-beans>
                        <session>
                             <ejb-name>TPCTestBean</ejb-name>
              <home>de.sitewaerts.futuna.common.test.tpcbean.TPCHome</home>
              <remote>de.sitewaerts.futuna.common.test.tpcbean.TPC</remote>
              <ejb-class>de.sitewaerts.futuna.common.test.tpcbean.TPCBean</ejb-class>
                             <session-type>Stateless</session-type>
                             <transaction-type>Bean</transaction-type>
                        </session>
                   </enterprise-beans>
                   <assembly-descriptor/>
              </ejb-jar>
              <!-- Originally I had the assembly-descriptor full of transaction
              requirements. I thought since
              the bean is handling all of the transaction stuff itself, it might get
              confused by the 'container-transaction'
              properties, and deleted them. Do I need them anyway?-->
              weblogic-ejb-jar.xml
              <weblogic-ejb-jar>
                   <weblogic-enterprise-bean>
                        <ejb-name>TPCTestBean</ejb-name>
                        <stateless-session-descriptor/>
                        <jndi-name>finstral/ejb/test_tpc</jndi-name>
                   </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              <!-- Nothing I have to explain here -->
              BeanCode (from the implementingBeanClass:
              'de.sitewaerts.futuna.common.test.tpcbean.TPCBean')
              public void setupTables() throws RemoteException
              UserTransaction tx = getTransaction();
              //getTransaction calls: 'tx = sCtx.getUserTransaction()' and does
              some errorhandling
              log.info("Die Transaktion vor den Connections: "+tx.toString());
              //Sorry bout the German. You should get the Message though.
              log.info("Der Transaktionsstatus vor den Connections:
              "+transactionStatus(tx));
              Connection conSecurity = getConnection(DATASOURCE_SECURITY, tx);
              //gets a Connection via a DataSourceName from the JNDI tree
              Connection conContent = getConnection(DATASOURCE_CONTENT, tx);
              log.info("Die frische Connection conSecurity: "+conSecurity);
              log.info("Die frische Connection conContent: "+conContent);
              tearDownTable(conSecurity);
              //Does nothing special
              tearDownTable(conContent);
              log.info("Die Transaktion nach dem Teardown: "+tx.toString());
              log.info("Der Transaktionsstatus nach dem Teardown:
              "+transactionStatus(tx));
              Statement stmt = null;
              try
              stmt = conSecurity.createStatement();
              //Well its getting interesting now.....
              log.info("Die Transaktion vor dem createtable: "+tx.toString());
              log.info("Der Transaktionsstatus vor dem createtable:
              "+transactionStatus(tx));
              log.info("Die Connection conSecurity vor dem createtable:
              "+conSecurity);
              log.info("Die Connection conContent vor dem createtable:
              "+conContent);
              stmt.executeUpdate(CREATE_TABLE);
              //above is the row 91 -> throws: 'java.sql.SQLException: Does
              not support SQL execution with no global transaction'
              stmt.close();
              stmt = conContent.createStatement();
              stmt.executeUpdate(CREATE_TABLE);
              stmt.close();
              commitTransaction(tx);
              catch (SQLException sqle)
              log.error("Konnte kein table init machen", sqle);
              rollbackTransaction(tx);
              //The Code for this method is below
              throw new EJBException(sqle);
              finally
              closeConnection(conSecurity);
              closeConnection(conContent);
              protected void rollbackTransaction(UserTransaction tx)
              log.info("Der Transaktionsstatus vor dem Rollback:
              "+transactionStatus(tx));
              log.info("Die Transaktion vor dem Rollback: "+tx.toString());
              try
              tx.rollback();
              //above is row 200 -> throws: 'java.lang.IllegalStateException:
              Transaction does not exist'
              log.info("Der Transaktionsstatus nach dem Rollback:
              "+transactionStatus(tx));
              log.info("Die Transaktion nach dem Rollback: "+tx.toString());
              catch (Exception e)
              log.error("Konnte die Transaktion nicht backrollen.", e);
              throw new EJBException(e);
              Log Excerpt
              ===========
              INFO setupTables() (66) - Die Transaktion vor den Connections:
              [email protected]
              INFO setupTables() (67) - Der Transaktionsstatus vor den Connections:
              STATUS_NO_TRANSACTION
              INFO setupTables() (72) - Die frische Connection conSecurity:
              weblogic.jdbc.rmi.SerialConnection@7c6daa
              INFO setupTables() (73) - Die frische Connection conContent:
              weblogic.jdbc.rmi.SerialConnection@3b425
              INFO setupTables() (78) - Die Transaktion nach dem Teardown:
              [email protected]
              INFO setupTables() (79) - Der Transaktionsstatus nach dem Teardown:
              STATUS_NO_TRANSACTION
              INFO setupTables() (86) - Die Transaktion vor dem createtable:
              [email protected]
              INFO setupTables() (87) - Der Transaktionsstatus vor dem createtable:
              STATUS_NO_TRANSACTION
              INFO setupTables() (88) - Die Connection conSecurity vor dem
              createtable: weblogic.jdbc.rmi.SerialConnection@7c6daa
              INFO setupTables() (89) - Die Connection conContent vor dem
              createtable: weblogic.jdbc.rmi.SerialConnection@3b425
              ERROR setupTables() (101) - Konnte kein table init machen
              java.sql.SQLException: Does not support SQL execution with no global
              transaction
                   at
              weblogic.jdbc.oci.xa.XAConnection.beforeExecute(XAConnection.java:137)
                   at
              weblogic.jdbc.oci.xa.Statement.executeUpdate(Statement.java:112)
                   at weblogic.jdbc.jta.Statement.executeUpdate(Statement.java:185)
                   at
              weblogic.jdbc.rmi.internal.StatementImpl.executeUpdate(StatementImpl.jav
              a:42)
                   at
              weblogic.jdbc.rmi.SerialStatement.executeUpdate(SerialStatement.java:54)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.jav
              a:91)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBean
              Impl.java:130)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCBe
              anEOImpl.java:64)
                   at
              de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseCo
              mmitUnitTest.java:51)
                   at
              org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTes
              tCase.java:297)
                   at
              org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servle
              tTestCaller.java:148)
                   at
              org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCal
              ler.java:199)
                   at
              org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTes
              tRedirector.java:149)
                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                   at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
              java:213)
                   at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
              etContext.java:1265)
                   at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
              java:1631)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              INFO rollbackTransaction() (196) - Der Transaktionsstatus vor dem
              Rollback: STATUS_NO_TRANSACTION
              INFO rollbackTransaction() (197) - Die Transaktion vor dem Rollback:
              [email protected]
              ERROR rollbackTransaction() (206) - Konnte die Transaktion nicht
              backrollen.
              java.lang.IllegalStateException: Transaction does not exist
                   at
              weblogic.transaction.internal.TransactionManagerImpl.rollback(Transactio
              nManagerImpl.java:228)
                   at
              weblogic.transaction.internal.TransactionManagerImpl.rollback(Transactio
              nManagerImpl.java:222)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBean.rollbackTransaction(TPC
              Bean.java:200)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.jav
              a:102)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBean
              Impl.java:130)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCBe
              anEOImpl.java:64)
                   at
              de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseCo
              mmitUnitTest.java:51)
                   at
              org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTes
              tCase.java:297)
                   at
              org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servle
              tTestCaller.java:148)
                   at
              org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCal
              ler.java:199)
                   at
              org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTes
              tRedirector.java:149)
                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                   at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
              java:213)
                   at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
              etContext.java:1265)
                   at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
              java:1631)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              CONCLUSION
              ==========
              I'm going nuts.
              I just don't get it.
              The transaction is the same. I don't change the Connection. I start
              the Transaction at the beginning before I do anything!
              Please guys help me out.
              Thx alot.
              Stefan "it's three o'clock in the morning, my girlfriend left me, and
              my only friend is that stupid linux pinguine" Siprell
              Software-Development
              <<<<<<<<<<<<<<<<<<<<<<<<<<<
              <sitewaerts> GmbH
              Hebelstraße 15
              D-76131 Karlsruhe
              Tel: +49 (721) 920 918 22
              Fax: +49 (721) 920 918 29
              http://www.sitewaerts.de
              >>>>>>>>>>>>>>>>>>>>>>>>>>>
              

    Hi Priscilla
              (did you ever see the movie ? :-))
              Well I moved away from the idea of using bean managed transaction. I'll
              be using Container Managed Transactions. To modify the
              transactionalbehaviour I'll write proxymethods which have certain
              different containermanaged transaction properties, but which all call
              the same private methods.
              But it works! Here is my experience:
              - I was doing a DDL statement: I was trying to create new Tables, which
              is a definite "no-go"
              - pay careful attention to:
              http://edocs.bea.com/wls/docs60/jta/trxejb.html#1051405
                        and
              http://edocs.bea.com/wls/docs60/jta/trxejb.html#1051741
              and use these Settings for the Pool, don't ask me why, but it took me
              hours to find it out by myself:
                   <JDBCConnectionPool CapacityIncrement="5"
              DriverName="weblogic.jdbc.oci.xa.XADataSource" InitialCapacity="1"
              LoginDelaySeconds="1" MaxCapacity="2" Name="oracleSecurityPool"
              Properties="user=xxx; password=xxx; server=xxx.xxx.xxx"
              RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
              TestTableName="Users" SupportsLocalTransaction="true"/>
              where as the server (shown as: xxx.xxx.xxx) is the TNS Name of the
              Oracle Driver.
              It works great.
              Another thing you guys might want to do is write a simple StatelessSB
              which does JDBC calls and two different database Connections.
              Then write a UnitTest which calls this bean a couple hundred times (with
              the same transaction). Have one test do clean writes, and another which
              causes some SQL-Exception (too long Data Columns, or likewise).
              Always count the entries and see if everything worked out. We're using
              this SetupConstruction to test new combinations of AS(sorry Priscilla) /
              Database / Db-Drivers to have a "standard test".
              I know my two cents were uncalled for, but it might save you some
              time.....
              thanx for your help
              Stefan
              -----Ursprüngliche Nachricht-----
              Von: Priscilla Fung [mailto:[email protected]]
              Bereitgestellt: Donnerstag, 2. August 2001 21:42
              Bereitgestellt in: transaction
              Unterhaltung: Two phase commit and bean managed transactions
              Betreff: Re: Two phase commit and bean managed transactions
              Hi Stefan,
              Looks like you have not actually begun a transaction by calling
              UserTransaction.begin(),
              so your setupTables method is really executing with no transaction
              context.
              Priscilla
              Stefan Siprell <[email protected]> wrote:
              >To all the Transaction GURUS!
              >
              >Hi guys (-and gals).
              >I've been doing J2EE for quite a while, but today was my first at
              >XA-Transactions and Bean Managed Transactions.
              >
              >Why am I doing this?
              >====================
              >Well I have to be able to controll the transactionalbehaviour of my
              >bean
              >during runtime, since some bean calls would cause a transactional
              >overflow due to the stress they would cause to the system, whereas
              >smaller bean calls need to run in one transaction.
              >-> Therefore I need Bean Managed Transactions
              >Since the bean does a call on two Database Connections it has to use
              >a
              >XA-Transaction.
              >-> Therefore I need XA-Transactions.
              >
              >Abstract
              >========
              >- I just can't get a User TransAction into the right Status it stays
              >in 'STATUS_NO_TRANSACTION' all the time
              >- Therefore the SQL Commands can be comitted 'java.sql.SQLException:
              >Does not support SQL execution with no global transaction'
              >- Therefore I can't do a rollback 'java.lang.IllegalStateException:
              >Transaction does not exist'
              >- Therefore I wrote this mail.
              >
              >I don't want to be a smart-"ass" writing such a detailed and indepth
              >mail. I just would like to show that I tried, and would like to have
              >some replies from you guys.
              >
              >Below are my configurations, code and logfiles.
              >
              >Thanx for taking your time and hope that the other people may learn
              >something as well.
              >
              >cu
              >
              >Stefan
              >
              >
              >Scenario
              >========
              >
              >used Software
              >-------------
              >Bea Weblogic (WL) 6.0 SPx (not real sure which SP i have)
              >Oracle 8.1.6 using the API-Version 8
              >
              >
              >I configured the system as follows:
              >(ofcourse I 'xxx'ed out all of the confidential data, sorry guys;-))
              >excerpt from:
              >
              >config.xml
              >----------
              ><JDBCConnectionPool CapacityIncrement="5"
              >DriverName="oracle.jdbc.driver.OracleDriver" InitialCapacity="2"
              >LoginDelaySeconds="1" MaxCapacity="5" Name="oraclePool"
              >Properties="user=xxx;password=xxx;dll=ocijdbc8;protocol=thin"
              >RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
              >TestTableName="languages" URL="jdbc:oracle:thin:@xxx:1521:xxx "/>
              >
              ><!-- Since this is our Main Datasource I would not like to use a XA
              >Transaction due to performance Issues
              >and the TxDataSource:
              >-->
              >
              ><JDBCTxDataSource EnableTwoPhaseCommit="true"
              >JNDIName="finstral.datasource.fbs" Name="finstral Content Datasource"
              >PoolName="oraclePool" Targets="fbsserver"/>
              >
              ><!-- no comment required -I hope.
              >Next comes the "special" Pool
              >-->
              >
              ><JDBCConnectionPool CapacityIncrement="5"
              >DriverName="weblogic.jdbc.oci.xa.XADataSource" InitialCapacity="1"
              >LoginDelaySeconds="1" MaxCapacity="2" Name="oracleSecurityPool"
              >Properties="user=xxx;password=xxx;server=xxx.xxx.xxx"
              >RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
              >TestTableName="Users" SupportsLocalTransaction="true"/>
              >
              ><!-- Well since there can only be one none XARessourceManager involved
              >in a 2PC
              >(keyword: Two Phase Commit) I will have to use a XACapable Driver for
              >the other
              >Datasource. Due to all the bugs in the oracle.xxx driver. I'll be
              >using the jdriver for oci.
              >I activated 'SupportsLocalTransaction' hoping it would solve my
              >problem - without effect. I just left in there now, since it made
              >sense me. Not?
              >Again the TxDataSource:
              >-->
              >
              ><JDBCTxDataSource EnableTwoPhaseCommit="true"
              >JNDIName="finstral.datasource.fbssecurity" Name="finstral Security
              >Datasource" PoolName="oracleSecurityPool" Targets="fbsserver"/>
              >
              ><!-- The System starts right up and can locate the test tables and
              >everything. So I think all of this stuff is working here -->
              >
              >
              >
              >ejb-jar.xml
              >-----------
              ><ejb-jar>
              >     <enterprise-beans>
              >          <session>
              >               <ejb-name>TPCTestBean</ejb-name>
              >     
              ><home>de.sitewaerts.futuna.common.test.tpcbean.TPCHome</home>
              >     
              ><remote>de.sitewaerts.futuna.common.test.tpcbean.TPC</remote>
              >     
              ><ejb-class>de.sitewaerts.futuna.common.test.tpcbean.TPCBean</ejb-class>
              >               <session-type>Stateless</session-type>
              >               <transaction-type>Bean</transaction-type>
              >          </session>
              >     </enterprise-beans>
              >     <assembly-descriptor/>
              ></ejb-jar>
              >
              ><!-- Originally I had the assembly-descriptor full of transaction
              >requirements. I thought since
              >the bean is handling all of the transaction stuff itself, it might get
              >confused by the 'container-transaction'
              >properties, and deleted them. Do I need them anyway?-->
              >
              >weblogic-ejb-jar.xml
              >--------------------
              ><weblogic-ejb-jar>
              >     <weblogic-enterprise-bean>
              >          <ejb-name>TPCTestBean</ejb-name>
              >          <stateless-session-descriptor/>
              >          <jndi-name>finstral/ejb/test_tpc</jndi-name>
              >     </weblogic-enterprise-bean>
              ></weblogic-ejb-jar>
              >
              ><!-- Nothing I have to explain here -->
              >
              >BeanCode (from the implementingBeanClass:
              >'de.sitewaerts.futuna.common.test.tpcbean.TPCBean')
              >-----------------------------------------------------------------------
              >---------------------
              >
              > public void setupTables() throws RemoteException
              > {
              > UserTransaction tx = getTransaction();
              > //getTransaction calls: 'tx = sCtx.getUserTransaction()' and does
              >some errorhandling
              >
              > log.info("Die Transaktion vor den Connections: "+tx.toString());
              > //Sorry bout the German. You should get the Message though.
              > log.info("Der Transaktionsstatus vor den Connections:
              >"+transactionStatus(tx));
              >
              > Connection conSecurity = getConnection(DATASOURCE_SECURITY, tx);
              > //gets a Connection via a DataSourceName from the JNDI tree
              > Connection conContent = getConnection(DATASOURCE_CONTENT, tx);
              >
              > log.info("Die frische Connection conSecurity: "+conSecurity);
              > log.info("Die frische Connection conContent: "+conContent);
              >
              > tearDownTable(conSecurity);
              > //Does nothing special
              > tearDownTable(conContent);
              >
              > log.info("Die Transaktion nach dem Teardown: "+tx.toString());
              > log.info("Der Transaktionsstatus nach dem Teardown:
              >"+transactionStatus(tx));
              >
              > Statement stmt = null;
              > try
              > {
              > stmt = conSecurity.createStatement();
              > //Well its getting interesting now.....
              >
              > log.info("Die Transaktion vor dem createtable: "+tx.toString());
              > log.info("Der Transaktionsstatus vor dem createtable:
              >"+transactionStatus(tx));
              > log.info("Die Connection conSecurity vor dem createtable:
              >"+conSecurity);
              > log.info("Die Connection conContent vor dem createtable:
              >"+conContent);
              >
              > stmt.executeUpdate(CREATE_TABLE);
              > //above is the row 91 -> throws: 'java.sql.SQLException: Does
              >not support SQL execution with no global transaction'
              >
              > stmt.close();
              >
              > stmt = conContent.createStatement();
              > stmt.executeUpdate(CREATE_TABLE);
              > stmt.close();
              > commitTransaction(tx);
              > }
              > catch (SQLException sqle)
              > {
              > log.error("Konnte kein table init machen", sqle);
              > rollbackTransaction(tx);
              > //The Code for this method is below
              > throw new EJBException(sqle);
              > }
              > finally
              > {
              > closeConnection(conSecurity);
              > closeConnection(conContent);
              > }
              > }
              >
              > protected void rollbackTransaction(UserTransaction tx)
              > {
              > log.info("Der Transaktionsstatus vor dem Rollback:
              >"+transactionStatus(tx));
              > log.info("Die Transaktion vor dem Rollback: "+tx.toString());
              > try
              > {
              > tx.rollback();
              > //above is row 200 -> throws: 'java.lang.IllegalStateException:
              >Transaction does not exist'
              > log.info("Der Transaktionsstatus nach dem Rollback:
              >"+transactionStatus(tx));
              > log.info("Die Transaktion nach dem Rollback: "+tx.toString());
              > }
              > catch (Exception e)
              > {
              > log.error("Konnte die Transaktion nicht backrollen.", e);
              > throw new EJBException(e);
              > }
              > }
              >
              >Log Excerpt
              >===========
              >INFO setupTables() (66) - Die Transaktion vor den Connections:
              >[email protected]
              >INFO setupTables() (67) - Der Transaktionsstatus vor den Connections:
              >STATUS_NO_TRANSACTION
              >INFO setupTables() (72) - Die frische Connection conSecurity:
              >weblogic.jdbc.rmi.SerialConnection@7c6daa
              >INFO setupTables() (73) - Die frische Connection conContent:
              >weblogic.jdbc.rmi.SerialConnection@3b425
              >INFO setupTables() (78) - Die Transaktion nach dem Teardown:
              >[email protected]
              >INFO setupTables() (79) - Der Transaktionsstatus nach dem Teardown:
              >STATUS_NO_TRANSACTION
              >INFO setupTables() (86) - Die Transaktion vor dem createtable:
              >[email protected]
              >INFO setupTables() (87) - Der Transaktionsstatus vor dem createtable:
              >STATUS_NO_TRANSACTION
              >INFO setupTables() (88) - Die Connection conSecurity vor dem
              >createtable: weblogic.jdbc.rmi.SerialConnection@7c6daa
              >INFO setupTables() (89) - Die Connection conContent vor dem
              >createtable: weblogic.jdbc.rmi.SerialConnection@3b425
              >ERROR setupTables() (101) - Konnte kein table init machen
              >java.sql.SQLException: Does not support SQL execution with no global
              >transaction
              >     at
              >weblogic.jdbc.oci.xa.XAConnection.beforeExecute(XAConnection.java:137)
              >     at
              >weblogic.jdbc.oci.xa.Statement.executeUpdate(Statement.java:112)
              >     at weblogic.jdbc.jta.Statement.executeUpdate(Statement.java:185)
              >     at
              >weblogic.jdbc.rmi.internal.StatementImpl.executeUpdate(StatementImpl.ja
              v
              >a:42)
              >     at
              >weblogic.jdbc.rmi.SerialStatement.executeUpdate(SerialStatement.java:54
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.ja
              v
              >a:91)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBea
              n
              >Impl.java:130)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCB
              e
              >anEOImpl.java:64)
              >     at
              >de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseC
              o
              >mmitUnitTest.java:51)
              >     at
              >org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTe
              s
              >tCase.java:297)
              >     at
              >org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servl
              e
              >tTestCaller.java:148)
              >     at
              >org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCa
              l
              >ler.java:199)
              >     at
              >org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTe
              s
              >tRedirector.java:149)
              >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              >     at
              >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl
              >java:213)
              >     at
              >weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServ
              l
              >etContext.java:1265)
              >     at
              >weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl
              >java:1631)
              >     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              >     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >INFO rollbackTransaction() (196) - Der Transaktionsstatus vor dem
              >Rollback: STATUS_NO_TRANSACTION
              >INFO rollbackTransaction() (197) - Die Transaktion vor dem Rollback:
              >[email protected]
              >ERROR rollbackTransaction() (206) - Konnte die Transaktion nicht
              >backrollen.
              >java.lang.IllegalStateException: Transaction does not exist
              >     at
              >weblogic.transaction.internal.TransactionManagerImpl.rollback(Transacti
              o
              >nManagerImpl.java:228)
              >     at
              >weblogic.transaction.internal.TransactionManagerImpl.rollback(Transacti
              o
              >nManagerImpl.java:222)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBean.rollbackTransaction(TP
              C
              >Bean.java:200)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.ja
              v
              >a:102)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBea
              n
              >Impl.java:130)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCB
              e
              >anEOImpl.java:64)
              >     at
              >de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseC
              o
              >mmitUnitTest.java:51)
              >     at
              >org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTe
              s
              >tCase.java:297)
              >     at
              >org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servl
              e
              >tTestCaller.java:148)
              >     at
              >org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCa
              l
              >ler.java:199)
              >     at
              >org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTe
              s
              >tRedirector.java:149)
              >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              >     at
              >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl
              >java:213)
              >     at
              >weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServ
              l
              >etContext.java:1265)
              >     at
              >weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl
              >java:1631)
              >     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              >     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              >
              >CONCLUSION
              >==========
              >I'm going nuts.
              >I just don't get it.
              >The transaction is the same. I don't change the Connection. I start
              >the Transaction at the beginning before I do anything!
              >Please guys help me out.
              >Thx alot.
              >
              >Stefan "it's three o'clock in the morning, my girlfriend left me, and
              >my only friend is that stupid linux pinguine" Siprell
              >Software-Development
              ><<<<<<<<<<<<<<<<<<<<<<<<<<<
              ><sitewaerts> GmbH
              >Hebelstraße 15
              >D-76131 Karlsruhe
              >
              >Tel: +49 (721) 920 918 22
              >Fax: +49 (721) 920 918 29
              >http://www.sitewaerts.de
              >>>>>>>>>>>>>>>>>>>>>>>>>>>>
              >
              >
              >
              

  • How to recover in a two phase commit ?

    I am implementing a two phase commit with Oracle XA in Oracle 8.1.6. I am wondering how I can recover from failures occur between the PREPARE and the COMMIT stage. If I lose the database connection after the changes have been prepared, then I can't find a way to rollback or commit the changes.
    Appreciate any helps.
    Sam

    The iPod OS takes care of where/how to store the files on the iPod and it has not done this. This is why you need to get the files off your iPod first.
    My goal is to connect my iPod to my Mac, launch iTunes, and all of what's on my iPod displays in iTunes after single-clicking the iPod's icon in the Source pane of iTunes' window.
    This is very, very simple. This is how iTunes works normally.
    Since you now have the stuff from your iPod on your computer (using Ollie's iPod Extractor), load them into iTunes.
    Sync them to the iPod. This will update the iPod database so all of the files are seen/identified correctly by the iPod.
    Set the iPod prefs in iTunes to manually update.
    Now you can delete the stuff on your computer and iTunes and view/edit/delete the stuff on the iPod using iTunes.
    The outcome of using the utilities suggested in previous posts is that all of what's on my iPod gets copied to my Mac's hard drive (which is not what I'm trying to accomplish) and then that displays in iTunes' Library.
    Only because the files on the iPod are not "useable" with the iPod or iTunes right now.
    This is not something you will have to do everytime.
    Once you get them on your computer, you can do the above steps and you will not have to use any utilities.
    Just use iTunes.

  • Emulate Two-Phase Commit

    HI,
    <Mar 20, 2009 8:25:32 AM EDT> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@1c1ac17 - appName
    : 'lms-app', name: 'lms', context-path: '/lms'] Root cause of ServletException.
    javax.ejb.EJBException: nested exception is: javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: javax.ejb.EJBException:
    nested exception is: javax.ejb.CreateException:
    nested exception is: java.sql.SQLException: Connection has already been created in this tx context for pool named ejbDS. Illegal attempt to create connection from another pool: liveDS
    I enabled Emulate Two-Phase Commit option for both the datasources ejbDS and liveDs. But still this error is coming in weblogic 9.2.2.
    Can anybody suggest?
    Thanks
    Naveen

    Hi Venki,
    I have encountered the same issue for WebLogic 10.3.Speculating that you have fixed the error for 9.2, could you please provide your inputs on how to fix these kind of issues.
    Thnks
    Pavan

  • Two Phase Commit on Slow Network

    Can I implement two phase commit transaction using Windows 2000 Professional's Dial-Up Connection ? Where would I find information on this ? I connected two Windows 2000 Prof. PCs using Dial-Up Connection on Telephone line. Now if I try to ping service on other PC using TNSPING it gives me connection timed out, how should I tackle this issue ?

    Hi Ioakim
    Performing an atomic transaction(ACID) that spans a source system, BizTalk and then a different destination system is not possible. This is due to the nature of distributed transactions - it may not be practical to hold locks on resources(needed for atomic
    transactions) that are spread across different networks. Given that there is no guarantee that the resources may be released in a reasonable amount of time, transactions in BizTalk can only be scoped to and from the BizTalk MessageBoxDb. Or in other words,
    you can read a record to BizTalk transactionally and on the send side, send a message from BizTalk transactionally.
    However, you can simulate/fake atomic transaction characteristics(although tricky) using compensation logic within BizTalk orchestrations. So, lets say you read+delete a record from SystemA into BizTalk, and that record has to be updated in SystemB.
    If for some reason the insert to SystemB fails, you would have to write custom logic in a compensation block that then performs the reverse operation in SystemA - i.e., it inserts back the record in SystemA in this case. So, using compensating actions, it
    is possible to ensure that all the systems involved are transactionally consistent at the end of the day.
    There's an article from C.Young that discusses this in some detail-
    http://geekswithblogs.net/cyoung/archive/2006/12/06/100424.aspx
    Thanks
    Arindam

  • Data-source.xml -  BaseResourceException - two phase commit

    Hi,
    I am seeing the following exception.   Please let me know how to fix this.
    thanks
    Sunita
    com.sap.engine.services.connector.exceptions.BaseResourceException: The resource "xxx" does not support two-phase commit and cannot be enlisted in the current transaction, because another non supporting two-phase commit resource is already enlisted for component "webContainer/applications/JavaEE/YY-TPRO/YYr-TPRO" in application "JavaEE/YY-TPRO". Only one of the enlisted resources is allowed to be non two-phase commit compliant.
    I am using JDBC 1.x datasource, and the .xml looks like this:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE data-sources SYSTEM 'data-sources.dtd'>
    <data-sources>
      <application-name>JavaEE/yy-TPRO</application-name>
      <data-source>
        <data-source-name>xxx</data-source-name>
        <alias>jdbc/xxyyDB/TPRO</alias>
        <driver-name>OracleThin</driver-name>
        <init-connections>1</init-connections>
        <max-connections>20</max-connections>
        <max-time-to-wait-connection>60</max-time-to-wait-connection>
        <sql-engine>vendor_sql</sql-engine>
        <jdbc-1.x>
          <driver-class-name>oracle.jdbc.driver.OracleDriver</driver-class-name>
          <url>jdbc:oracle:thin:@sol-mercury:1521:hermes</url>
          <user-name>abcd</user-name>
          <password>abcd</password>
        </jdbc-1.x>
      </data-source>
    </data-sources>

    HI,
    Thanks for the response, I already went through these threads.
    My exception seems to be related to this - Problem with connection sharing if J2EE transaction is running
    and suggested solutions seems to be:
    The problem is caused when there is an inappropriate attempt to open a second connection in an active JTA transaction. There is either an attempt to get a second connection from an un-shareable non-XA DataSource or an attempt to get it from another non-XA DataSource. You have to:
    &#9679;     Use no more than one connection from this data source while the JTA transaction is active or
    &#9679;     Declare the data source as shareable, depending on your application logic.
    Question is, How can I make data source as shareable?? 
    This application worked fine in JBoss, weblogic and now we are trying to port it to NetWeaver.
    Is any of the above options are configurable in data-sources.xml?
    Thanks for your guidance and response.
    Surekha

  • SAP Transaction in Two phase Commit ?

    Hi all,
    When we make a connection to SAP system from .NET application using .NET connector, we can make calls to transactional BAPI/RFC’s. But is there any way in which we can make SAP transaction take part in MS DTC (Microsoft Distributed Transaction Coordinator) transactions?
    We want to implement a two phase commit and hence this question. Please let us know if you are aware of any mechanism using which we can implement a two phase commit.
    The call scenario is described below:
    TransactionScope
    1.     SQL_StoredProc1();
    2.     SQL_StoresProc2();
         10.           SAP_TransactionBAPI();
         11.          SQLStoredProcn();
          12.           SQLTransaction_Commit();
          13.      SAPTransaction_Commit();
    Exception ()
    SQLTransaction_Rollback();
    SAPTransaction_Rollback();
    In the above case all the statements have to be executed successfully or they have to be rolled back. Let’s think of the situation where all the statements up to line 13 have been executed successfully, but there was a failure during the commit of SAP, and then we have to rollback the SQL transaction also which is already committed.
    This situation can be handled if and only if SAP transaction manager follows XA transaction protocol and it can include itself in MSDTC. So that every transaction manager votes for the commit (it can be called half commit) if the transaction is successful otherwise all the transactions should be rolled back.
    Can anybody tell me the way to include SAP transaction manager in MSDTC if it at all possible?

    Hi Saket,
    I did  not understand much of your query but just wanted to know how are you making a connection to the backend here?
    If using DataSources and if the datasource is configured directly in the EP server (using Visual Administrator), you have an option of the required 2-way commit.
    The datasource takes care of it directly. Apart from this, the datasource will also take cre of the connection pooling.
    Hope this helps.
    Awaiting Reply.
    Warm Regards,
    Ritu

  • How to enable 2 phase commit in oracle11g(for distributed oracle databases)

    Hi All,
    We have three oracle servers(11g) and we need to update the data from one server to remaining servers. Want to know, is "two phase commit" automaticly enabled/installed in 11g or we need to enable it. If we need to enable it then what are the all steps required for the same.
    Thanks & Regards
    Ravi

    It is always very nice to see people think they are so unique their question has not already been answered in the documentation.
    Yes, two phase commit is enabled.
    No, depending on what you want, automatically updating records from one server to other servers is likely a very bad idea, as Oracle has documented facilities for that.
    You have amongst others
    - Materialized views
    - Oracle Streams
    Those solutions definitely scale much better as your approach, as they are asynchronous. In your approach the master server will slow down as a result of updating slaves.
    In distributed databases 'push' approaches are to be avoided and 'pull' approaches to be preferred. Which is exactly what materialized views and Streams do.
    Sybrand Bakker
    Senior Oracle DBA

  • Saving Captured picture from ADF Mobile Application into Remote Database

    Hi,
    I am developing adf mobile application by using Device Demo Application from ADF Mobile Samples.I had deployed this application into Android mobile and capturing picture.
    My Question is how can i save this captured pictured into Remote Database.
    Could any one help on this!!!
    Thanks in advance!!
    Regards
    Amar
    Edited by: 973755 on Nov 28, 2012 7:46 AM
    Edited by: 973755 on Nov 28, 2012 7:47 AM

    Hi Joe,
    Thanks for the reply!!
    As per your instructions i created two classes 1.GetConnection.java and 2.PictureBean.java
    in GetConnection.java i written following code
    package Picture;
    import java.sql.Connection;
    import java.sql.SQLException;
    import oracle.adfmf.framework.api.AdfmfJavaUtilities;
    public class GetConncetion {
    public GetConncetion() {
    super();
    protected static Connection conn = null;
    public static Connection getConnection() throws Exception {
    if (conn == null) {
    try {
    // create a database connection
    String Dir = AdfmfJavaUtilities.getDirectoryPathRoot(AdfmfJavaUtilities.ApplicationDirectory);
    String connStr = "jdbc:oracle:thin:@fusion.networks.com:1521:fusion"+Dir+"/DeviceDemo.db" ;
    conn = new SQLite.JDBCDataSource(connStr).getConnection();
    System.out.println("connection*******"+conn);
    } catch (SQLException e) {
    // if the error message is "out of memory",
    // it probably means no database file is found
    System.err.println(e.getMessage());
    return conn;
    and in PictureBean.java the following code i modified..
    package Picture;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import oracle.adf.model.datacontrols.device.DeviceManager;
    import oracle.jdbc.pool.OracleDataSource;
    public class PictureBean {
    public PictureBean() {
    super();
    String src;
    private int quality = 25;
    private int destination = DeviceManager.CAMERA_DESTINATIONTYPE_FILE_URI;
    private int source = DeviceManager.CAMERA_SOURCETYPE_PHOTOLIBRARY;
    private boolean allowEdit = false;
    private int encoding = DeviceManager.CAMERA_ENCODINGTYPE_JPEG;
    private int targetWidth = 0;
    private int targetHeight= 0;
    public void setQuality(int quality) {
    this.quality = quality;
    public int getQuality() {
    return quality;
    public void setDestination(int destination) {
    this.destination = destination;
    public int getDestination() {
    return destination;
    public void setSource(int source) {
    this.source = source;
    public int getSource() {
    return source;
    public void setAllowEdit(boolean allowEdit) {
    this.allowEdit = allowEdit;
    public boolean getAllowEdit() {
    return allowEdit;
    public boolean isAllowEdit() {
    return allowEdit;
    public void setEncoding(int encoding) {
    this.encoding = encoding;
    public int getEncoding() {
    return encoding;
    public void setTargetWidth(int targetWidth) {
    this.targetWidth = targetWidth;
    public int getTargetWidth() {
    return targetWidth;
    public void setTargetHeight(int targetHeight) {
    this.targetHeight = targetHeight;
    public int getTargetHeight() {
    return targetHeight;
    public String GetSource(String result) {
    String src = "";
    if( getDestination() == DeviceManager.CAMERA_DESTINATIONTYPE_DATA_URL ) {
    src = "data:image/gif;base64,";
    src = src + result;
    System.out.println("src value in GetSource is "+src);
    return src;
    public void setSource(String result) {
    PictureBean pb1=new PictureBean();
    String src = "data:image/gif;base64,";
    if( getDestination() == DeviceManager.CAMERA_DESTINATIONTYPE_DATA_URL ) {
    src = "data:image/gif;base64,";
    src = src + result;
    public String GetSource(){
    return src;
    public boolean savePicture() throws Exception {       
    boolean ret=false;
    PictureBean pb=new PictureBean();
    String pic= pb.GetSource();
    try{
    Connection conn=GetConncetion.getConnection();
    conn.setAutoCommit(false);
    String insertSQL ="INSERT INTO IMAGE(ID,PIC) VALUES(?,?)";
    PreparedStatement pStmt = conn.prepareStatement(insertSQL);
    pStmt.setInt(1, 1);
    pStmt.setString(2,pic);
    pStmt.execute();
    conn.commit();
    ret = true;
    }catch (SQLException e) {
    System.err.println(e.getMessage());
    } catch (Exception e) {
    System.err.println(e.getMessage());
    return ret;
    and i created one button in Result.amx page and in Action Listener i had given #{bindings.savePicture.execute} and deployed into Android mobile.But i am neither getting error nor getting save picture into database.
    while i run PictureBean.java class alone the following exception occurred.
    "E:\ADF R2\jdk160_24\bin\javaw.exe" -client -classpath "C:\JDeveloper\mywork\DeviceDemo\.adf;C:\JDeveloper\mywork\DeviceDemo\ViewController\classes;E:\OracleJdbc\ojdbc14_g.jar;E:\OracleJdbc\ojdbc14.jar;E:\OracleJdbc\ojdbc.jar;C:\Users\Amar\Downloads\ojdbc6_g.jar;C:\Users\Amar\Downloads\ojdbc6.jar;E:\ADF R2\oracle_common\modules\oracle.adf.view_11.1.1\adf-faces-databinding-rt.jar;E:\ADF R2\oracle_common\modules\oracle.adf.share_11.1.1\adf-share-support.jar;E:\ADF R2\oracle_common\modules\oracle.adf.share.ca_11.1.1\adf-share-ca.jar;E:\ADF R2\oracle_common\modules\oracle.adf.share.ca_11.1.1\adf-share-base.jar;E:\ADF R2\oracle_common\modules\oracle.adf.share_11.1.1\adflogginghandler.jar;E:\ADF R2\oracle_common\modules\oracle.idm_11.1.1\identitystore.jar;E:\ADF R2\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;E:\ADF R2\oracle_common\modules\oracle.adf.model_11.1.1\adfm.jar;E:\ADF R2\oracle_common\modules\groovy-all-1.6.3.jar;E:\ADF R2\oracle_common\modules\oracle.ldap_11.1.1\ojmisc.jar;E:\ADF R2\oracle_common\modules\oracle.adf.share_11.1.1\commons-el.jar;E:\ADF R2\oracle_common\modules\oracle.adf.share_11.1.1\jsp-el-api.jar;E:\ADF R2\oracle_common\modules\oracle.adf.share_11.1.1\oracle-el.jar;E:\ADF R2\oracle_common\modules\oracle.xmlef_11.1.1\xmlef.jar;E:\ADF R2\oracle_common\modules\oracle.bali.share_11.1.1\share.jar;E:\ADF R2\modules\com.bea.core.apache.xercesImpl_2.8.1.jar;E:\ADF R2\modules\javax.activation_1.1.0.0_1-1.jar;E:\ADF R2\modules\javax.mail_1.1.0.0_1-4-1.jar;E:\ADF R2\modules\glassfish.jaxb_1.0.0.0_2-1-12.jar;E:\ADF R2\modules\javax.xml.bind_2.1.1.jar;E:\ADF R2\oracle_common\modules\oracle.adf.model_11.1.1\adftransactionsdt.jar;E:\ADF R2\oracle_common\modules\oracle.adf.view_11.1.1\adf-dt-at-rt.jar;E:\ADF R2\oracle_common\modules\oracle.adf.model_11.1.1\adfdt_common.jar;E:\ADF R2\oracle_common\modules\oracle.adf.model_11.1.1\adflibrary.jar;E:\ADF R2\oracle_common\modules\oracle.adf.model_11.1.1\db-ca.jar;E:\ADF R2\oracle_common\modules\oracle.adf.model_11.1.1\jdev-cm.jar;E:\ADF R2\oracle_common\modules\oracle.adf.security_11.1.1\adf-share-security.jar;E:\ADF R2\oracle_common\modules\oracle.adf.security_11.1.1\adf-controller-security.jar;E:\ADF R2\oracle_common\modules\oracle.adf.share_11.1.1\adfsharembean.jar;E:\ADF R2\oracle_common\modules\oracle.jmx_11.1.1\jmxframework.jar;E:\ADF R2\oracle_common\modules\oracle.jmx_11.1.1\jmxspi.jar;E:\ADF R2\oracle_common\modules\oracle.adf.model_11.1.1\bc4j-mbeans.jar;E:\ADF R2\oracle_common\modules\oracle.javatools_11.1.1\resourcebundle.jar;E:\ADF R2\oracle_common\modules\oracle.ldap_11.1.1\ldapjclnt11.jar;E:\ADF R2\oracle_common\modules\oracle.jps_11.1.1\jps-api.jar;E:\ADF R2\oracle_common\modules\oracle.jps_11.1.1\jps-common.jar;E:\ADF R2\oracle_common\modules\oracle.jps_11.1.1\jps-ee.jar;E:\ADF R2\oracle_common\modules\oracle.jps_11.1.1\jps-internal.jar;E:\ADF R2\oracle_common\modules\oracle.jps_11.1.1\jps-unsupported-api.jar;E:\ADF R2\oracle_common\modules\oracle.jps_11.1.1\jps-manifest.jar;E:\ADF R2\oracle_common\modules\oracle.jps_11.1.1\jacc-spi.jar;E:\ADF R2\oracle_common\modules\oracle.pki_11.1.1\oraclepki.jar;E:\ADF R2\oracle_common\modules\oracle.osdt_11.1.1\osdt_core.jar;E:\ADF R2\oracle_common\modules\oracle.osdt_11.1.1\osdt_cert.jar;E:\ADF R2\oracle_common\modules\oracle.osdt_11.1.1\osdt_xmlsec.jar;E:\ADF R2\oracle_common\modules\oracle.osdt_11.1.1\osdt_ws_sx.jar;E:\ADF R2\oracle_common\modules\oracle.iau_11.1.1\fmw_audit.jar;E:\ADF R2\modules\javax.security.jacc_1.0.0.0_1-1.jar;E:\ADF R2\oracle_common\modules\oracle.mds_11.1.1\mdsrt.jar;E:\ADF R2\oracle_common\modules\oracle.mds_11.1.1\oramds.jar;E:\ADF R2\modules\javax.servlet_1.0.0.0_2-5.jar;E:\ADF R2\modules\javax.jsp_1.2.0.0_2-1.jar;E:\ADF R2\jdeveloper\ide\macros\..\..\..\oracle_common\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;E:\ADF R2\oracle_common\jlib\commons-cli-1.0.jar;E:\ADF R2\oracle_common\modules\oracle.dms_11.1.1\dms.jar;E:\ADF R2\oracle_common\modules\oracle.xdk_11.1.0\xml.jar;E:\ADF R2\oracle_common\modules\oracle.javacache_11.1.1\cache.jar;E:\ADF R2\oracle_common\modules\oracle.ucp_11.1.0.jar;E:\ADF R2\oracle_common\modules\oracle.odl_11.1.1\ojdl.jar;E:\ADF R2\oracle_common\modules\oracle.javatools_11.1.1\javatools-nodeps.jar;E:\ADF R2\modules\javax.management_1.2.1.jar;E:\ADF R2\modules\javax.management.j2ee_1.0.jar;E:\ADF R2\jdeveloper\ide\macros\..\..\..\oracle_common\modules\oracle.nlsrtl_11.1.0\orai18n.jar;C:\Users\Amar\Downloads\commons-codec-1.7-bin.zip;C:\Users\Amar\Downloads\commons-codec-1.7-src.zip;E:\ADF R2\oracle_common\modules\oracle.adf.model_11.1.1\dvt-databindings-mds.jar;E:\ADF R2\oracle_common\modules\oracle.adf.view_11.1.1\dvt-databindings.jar;E:\ADF R2\oracle_common\modules\oracle.adf.view_11.1.1\dvt-facesbindings.jar;E:\ADF R2\oracle_common\modules\oracle.adf.view_11.1.1\trinidad-api.jar;E:\ADF R2\oracle_common\modules\oracle.adf.view_11.1.1\trinidad-impl.jar;E:\ADF R2\oracle_common\modules\oracle.adf.view_11.1.1\adf-richclient-api-11.jar;E:\ADF R2\oracle_common\modules\oracle.adf.view_11.1.1\adf-richclient-impl-11.jar;E:\ADF R2\oracle_common\modules\oracle.adf.view_11.1.1\adf-dynamic-faces.jar;E:\ADF R2\oracle_common\modules\oracle.adf.view_11.1.1\adf-faces-changemanager-rt.jar;E:\ADF R2\oracle_common\modules\oracle.facesconfigdt_11.1.1\facesconfigmodel.jar;E:\ADF R2\oracle_common\modules\oracle.facesconfigdt_11.1.1\taglib.jar;E:\ADF R2\modules\glassfish.el_1.0.0.0_2-1.jar;E:\ADF R2\oracle_common\modules\oracle.jsf_2.0\jsf-api.jar;E:\ADF R2\oracle_common\modules\oracle.jsf_2.0\jsf-impl.jar;E:\ADF R2\modules\glassfish.jstl_1.2.0.1.jar;C:\Users\Amar\Downloads\jndi-properties.jar.zip;C:\Users\Amar\Downloads\jndi-1.2.1.jar.zip;C:\Users\Amar\Downloads\h2-1.3.149.jar.zip;C:\Users\Amar\Downloads\Android\h2-1.3.149.zip;C:\Users\Amar\Downloads\Android\android\app;C:\Users\Amar\Downloads\Android\android;C:\Users\Amar\Downloads\Android" -Djavax.net.ssl.trustStore=C:\Users\Amar\AppData\Local\Temp\trustStore7108102737679976193.jks Picture.PictureBean
    Source value is null
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/adfmf/framework/api/AdfmfJavaUtilities
         at Picture.GetConncetion.getConnection(GetConncetion.java:24)
         at Picture.PictureBean.savePicture(PictureBean.java:140)
         at Picture.PictureBean.main(PictureBean.java:189)
    Caused by: java.lang.ClassNotFoundException: oracle.adfmf.framework.api.AdfmfJavaUtilities
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
         ... 3 more
    Process exited with exit code 1.
    i already imported AdfmfJavaUtilities package dont know why it showing exception.
    and while i am debugging the GetConnection.java value of 'Dir' is null.i am not getting what is the AdfmfJavaUtilities.ApplicationDirectory?
    Could you help on this!!
    Thanks & Regards
    Amar

  • Weblogic Two Phase commit

    Dears,
    we are facing slowness problem while migration application from weblogic 7 to weblogic 11g.
    Our Application use EJB 2.1 CMP and oracle database
    In web-logic 7 we use global transaction and emulate two phase commit .Our application works fine
    If we set global transaction as last logging resource or Emulate two phase commit in weblogic 11g we found so much slowness in the application.
    Kindly help me in this regard

    Hi,
              Jolt is just a Java client API for Tuxedo services. Typically, Jolt is
              used by a client to invoke a Tuxedo service. From what I could gather
              from your post, you are probably doing some JDBC work and then calling
              out to a Tuxedo service and want the work done with the JDBC/XA driver
              and the database work done by the Tuxedo service to be comitted/aborted
              transactionally? Is this correct?
              If so, then you probably want to look at the JET API (essentially Jolt
              without the need for a JSL/JSH) for invoking Tuxedo services directly
              (instead of through the JSH) from a WLE Java Server. It should be fully
              capable of doing what I have described above.
              Hope this helps,
              Robert
              Hwa Min Tan wrote:
              > I have read that the WLE 5.1 supports the Open XA standard for
              > two-phase (distributed) commits.
              > However, I have been unable to find any documentation / code
              > samples that demonstrates that JOLT is also able to perform
              > two-phase commits, even though its architecture is
              > inherently Tuxedo.
              > We'd like to use two-phase commit on two separate databases
              > (one connected by Jolt and another using the WLE JDBC/XA driver.
              >
              > Does Jolt support two-phase commit and the Open XA standard?
              >
              > Many thanks for your help,
              >
              > Hwa Min
              

  • DISTRIBUTED TRANSACTION의 2 PHASE COMMIT 개념 및 절차

    제품 : ORACLE SERVER
    작성날짜 : 2002-05-15
    DISTRIBUTED TRANSACTION의 2 PHASE COMMIT 개념 및 절차
    ====================================================
    Oracle이 분산 트랜잭션 수행을 위해 사용하는 2 phase commit의 자세한 개념
    및 절차를 살펴본다.
    1. 용어와 개념
    Oracle은 분산 트랜잭션을 수행하면서 여기에 포함된 모든 node에 대해서
    session tree를 구성한다. session tree는 분산 트랜잭션에 관여되는 session과
    각 session의 역할을 계층적인 tree형태로 표현한다고 볼 수 있으며,
    DBA_2PC_NEIGHBORS view를 통해 확인 가능하다.
    session tree에 포함되는 각 node들이 수행하는 역할은 2 phase commit 절차의
    기본적인 개념이 되므로, 분산 트랜잭션의 이해를 위해서 정확히 파악할 필요가
    있다. 아래에 각 역할 들의 종류와 의미를 설명하며 [그림 1]을 예로 든다.
    - client
    - database server
    - global coordinator
    - local coordinator
    - commit point site
    insert into seoul_tab...;
    delete from pusan_tab@pusan...;
    Seoul.world inchoen_procedure@incheon...;
    / \ incheon_procedure source
    Pusan.world Inchoen.world ------------------------
    \ delete from incheon_tab...;
    \ update jeju_tab@jeju...;
    Jeju.world
    [그림 1] session tree의 간단한 예제
    (1) client: 다른 node의 database 정보를 이용하면 client가 된다.
    참조되어지는 node는 이때 database server가 된다. seoul.world가
    pusan.world와 incheon.world의 client이고, incheon.world는 jeju.world의
    client가 된다.
    (2) server (database server): 분산 트랜잭션에 포함된 모든 node를 server라
    한다. seoul.world, pusan.world, incheon.world, jeju.world 모두 database
    server이다.
    (3) global coordinator:분산 트랜잭션을 처음 수행시킨 node를 의미한다.
    여기서는 seoul.world가 global coordinator이다.
    (4) local coordinator: 분산 트랜잭션에서 이 node에 관계된 부분의 결과를
    얻으려면 다른 node를 참조해야 하는 경우 이 node를 local coordinator라고
    한다. 이것이 위에서 설명한 global coordinator와는 차이가 있는데 global
    coordinator는 항상 local coordinator이지만, 반대로 local coordinator는
    global coordinator가 아닐 수 있다.
    Incheon.world의 경우 처음 문장을 수행시킨 global coordinator는 아니지만,
    Incheon.world의 Inchoen_procedure내에 jeju.world가 reference되므로
    local coordinator가 된다. seould.world는 global coordinator이면서
    local coordinator가 된다.
    (5) commit point site
    commit point site는 분산 트랜잭션에 관여된 node중 2 phase commit단계에서
    commit이나 rollback을 항상 제일 먼저 하게 된다. 이 node의 local
    transaction부분은 prepared상태를 거치지 않아 in-doubt 상태가 되는 일이
    없고, 그러므로 distributed lock에 의해 조회나 DML시 오류가 발생하는
    없게 된다. 이러한 이유로 제일 중요한 data를 포함하는 중심이 되는 node를
    commit point site로 지정하는 것이 바람직하다.
    commit point site는 각 node의 initialization parameter중
    COMMIT_POINT_STRENGTH 값을 비교하여 제일 큰 값을 가진 node가 지정된다.
    두 node만 관여된 분산 트랜잭션의 경우 commit_point_strength가 지정되어
    있지 않으면, default로 global coordinator가 아닌 node가 commit point
    site가 된다.
    2. 2 Phase Commit (2PC)
    분산 트랜잭션을 commit하는 것은 다음 두 단계를 거치게 된다. 그래서 Oracle의
    분산 트랜잭션은 2 phase commit mechanism을 사용한다고 한다.
    prepare 단계: global coordinator (SQL문장을 처음 수행한 server) 가 commit
    point site를 제외한 나머지 node에게 prepare하도록 요청한다.
    요청을 받은 node는 각 local db에서의 작업에 대해 commit이나
    rollback할 준비를 마치고 다시 global coordinator에게 prepare
    되었음을 알려 주는 단계이다.
    node가 prepare 단계를 지나고 commit을 완료하기 전까지는
    transaction이 in-doubt상태라고 부른다.
    commit단계: 모든 node가 정상적으로 prepare가 되면, 먼저 commit point site가
    commit을 완료하고 이후 다른 node들도 commit을 완료하게 된다.
    이렇게 분산 트랜잭션에서 commit을 수행하기 위해 두 단계를 거치면서 일부
    node만 commit이 되고 일부는 rollback이 되는 불일치 상태를 막을 수 있는데,
    그러기 위한 자세한 단계별 처리 절차를 아래 [표 1]에 17단계로 기술하였다.
    각 단계별로 global coordinator와 commit point site, 그리고 둘 모두에
    해당되지 않는 일반 database server입장으로 나누어 표시하였으며, 만약 어떤
    node가 global coordinator이면서 commit point site라면, 두 part의 일을 모두
    하게 되는 것이다.
    아래 표의 (4) ~ (10)번 단계는 prepare단계의 작업이며, (11) ~ (15)번 단계는 commit단계
    이다. 부가적으로 (16), (17)을 정리 단계로 부르기도 한다.
    단계| Global coordinator | 참여한 db server | Commit point site
    (commit point site도 아니고
    global coordinator도 아닌경우)
    (1) SQL문장 발생 |     |
    (2) SQL문장이 수행되면 session tree가 구성되고 이 정보는
    DBA_2PC_NEIGHBORS를 통해 조회 가능하다.
    변경이 필요한 data는 각 node별로 자기의 local data에 대해서 lock
    (TX,TM)을 걸면서 문장 수행이 진행된다.
    (3) Commit; 문장 발생 |          |
    (4) commit point site를 |          |
    commit_point_strength |          |
    initial parameter를 참조 |          |
    하여 결정하고, |          |
    참여한 모든 node의 SCN중 |          |
    제일 큰 값을 commit SCN으로|           |
    결정하고 이후에 각 node의 |          |
    commit시 이용한다. |          |
    (5) commit point site를 |          |
    제외한 모든 node들에게 |          |
    prepare하도록 요청한다 |          |
    (6) prepare 요청 message받는다 |
    (7) transaction이 이 node의 data를 변경하였는지를 |
    확인하고, 변경 사항이 있고 commit이 가능한 |
    상태이면 다음 단계를 수행하고, 그렇지 않으면 |
    (10)번 단계로 건너뛴다           |
    (8) transaction에 distributed lock을 걸어 fail이 |
    되어도 rollback이 되지 않고 변경 사항에 lock이|
    걸린 채 유지되도록 한다.           |
    distributed lock이 걸려 있는 상태에서는 변경 |
    data를 포함한 block에 포함된 어떤 data도 |
    read/write가 불가능하게 된다 (ora-1591발생) |
    [참조 1]                    |
    (9) transaction에 의해 변경된 내용과 (8)번 단계의 |
    information에 대한 redo log 내용을 각 node의 |
    redo log file에 기록한다. (해당 node의 변경 |
    사항만을 해당 node의 redo log file에 기록) |
    (10) global coordinator에게 다음 세가지 중 하나의 |
    상태를 prepare message대한 응답으로 전달한다.|
    PREPARED:변경된 data가 있고 commit이 가능한 |
    상태               |
    READ-ONLY: 자신의 node에는 data 변경사항이 |
    없고 조회만 관여한 경우 |
    ABORT: 오류 발생으로 인해 commit이 불가능한 |
    경우                     |
    (11) prepare 요청 message에 | |
    대한 응답 중 한 node라도| |
    abort가 있으면: | |
    모든 관여된 node를 | |
    rollback하도록 요청하고 | |
    distributed transaction | |
    을 끝낸다. | |
    prepare요청 message에 | |
    대한 응답이 read-only나 | |
    prepared만 있다면: | |
    commit point site에게 | |
    commit하라고 요청한다. | |
    (12) | |이 node에 관여된 local
    | |transaction 부분만을
    | |commit 한다.
    | |- data변경사항과 commit
    | |정보를 local redo log
    | |file에 기록한다.
    | |- commit SCN은 (4)번단계
                   |           |에서 얻어진, 관여된 node
                   |          |의 SCN중 제일 큰 값을
    | | 이용한다.
                   |     |- (2) 번 단계에서 잡혔던 TX,
    | | TM lock은 해제된다.
    (13) |global coordinator에게
    |commit이 완료되었음을
    |알리는 message를 보낸다.
    (14) commit point site를 제 | |
    외한 다른 node들에게 | |
    commit하라고 요청한다. | |
    (15) commit하면서 (2)번 단계에서 잡은 TX, TM lock|
    과, (8)번 단계에서 잡힌 distributed lock을 |
    release하고, 이러한 commit정보를 redo log |
    file에 기록한다.
    (16) | |DBA_2PC_PENDING,
    | |DBA_2PC_NEIGHBORS등
    | |dictionary 저장된 정보를
    | |지우고 global coordinator
    | |에게 정보를 지웠음을
    | |알려준다
    (17) DBA_2PC_PENDING, DBA_2PC_NEIGHBORS 등 |
    dictionary 저장된 정보를 지우고 정리한다. |
    [참조 2] |
    [표 1] 2 phase commit의 단계별 절차
    [참조 1] distributed lock
    (8)번 단계에서 기술한 distributed lock은 실제 v$lock을 확인하여서는
    나타나지 않는다. v$lock에 lock type이 DX로 나타나는 것은 distributed
    transaction lock으로 이것은 2 phase commit을 위한 것이 아니라
    XA에서 단일 transaction내에서 여러 branch에 대한 control을
    tightly-coupled 형태로 하는 경우에 사용되어 지는 것이므로, 여기서
    언급하는 distributed lock과 혼동되어서는 안된다.
    여기에서 설명한 distributed lock은 실제 type을 가지고 있는 lock이
    아니고 해당 transaction에 대한 local db내의 rollback segment
    header부분에서 transaction상태를 prepared를 나타내는 bit로
         설정함으로써 lock설정을 구현한다.
    그러므로 이 lock이 걸려 있는 동안은 다른 transaction이 해당 분산
    트랜잭션이 변경한 data와 같은 block의 어떠한 data라도 읽거나
    쓰려고 하면, 그 block에 commit되지 않은 transaction이 있다는 것을
    인식하고 before image를 읽기 위해 rollback segment를 찾게 되고,
    그 rollback segment에 prepared상태로 표시되어 있어 before image
    읽는 것을 막기 때문에 오류가 발생하게 된다. 이 오류가 ORA-1591이
    되는 것이다.
    transaction이 prepared상태로 distributed lock이 걸린 상태인지는
    DBA_2PC_PENDING의 status가 PREPARED인지를 확인하는 것만이
    dictionary를 통해 가능한 정보이다.
    [참조 2] DBA_2PC_PENDING의 정보
    DBA_2PC_PENDING view의 정보는 분산 트랜잭션이 비정상 종료 되었을
    때만 정보가 저장되는 것이 아니다. 앞의 [표 1]의 2 phase commit
    단계마다, 수행되는 작업에 대해서 해당 view에 계속해서 정보를
    변경해 가고 앞의 표의 (16), (17) 단계를 완료해야 지워지게 된다.
    분산 트랜잭션이 비정상 종료시 이 view에서 해당 transaction의
    상태가 COLLECTING이나 PREPARED, COMMITTED 상태로 정보가 보여지는
    것은 마지막 정리 단계 수행 전에 transaction이 종료되었기 때문이다.
         non-commit point site의 경우, (10)번 단계에서 distributed lock을
    걸기 전까지는 DBA_2PC_PENDING의 STATE column 값이 COLLECTING으로
    나타나게 되며, (15) 단계 수행전까지는 PREPARED로 나타나고, (17)번
         수행전까지는 COMMITTED로 나타난다.
    commit point site의 경우는, (11)번 수행단계까지는 이 view에 어떠한
    정보도 포함하지 않으며, (12)번 수행 후 (16)번 단계를 수행하기
    전까지는 COMMITTED로 STATE 값을 가지게 된다.

  • Query for 2 PHASE COMMIT

    Hi,
    I need to understand concept of 2 phase commit.plz tell me..
    INSERT INTO EMP_BKP(EMPNO) VALUES(777);
    CREATE TABLE empbkp2 AS SELECT * FROM emp;
    ROLLBACK;
    SELECT * FROM EMP_BKP;
    o/p:
    empno
    777
    due to create stmnt it was autocommit so i got result..
    INSERT INTO EMP_BKP(EMPNO) VALUES(777);
    CREATE TABLE HJHJH AS SELECT * FROM JKJL; -- table JKJL doesn't exists
    ROLLBACK;
    SELECT * FROM EMP_BKP;
    o/p:
    empno
    777
    got error in create stmnt then too got o/p..
    how it worked as create command failed.?

    PC wrote:
    Hi,
    I need to understand concept of 2 phase commit.plz tell me..
    INSERT INTO EMP_BKP(EMPNO) VALUES(777);
    CREATE TABLE empbkp2 AS SELECT * FROM emp;
    ROLLBACK;
    SELECT * FROM EMP_BKP;
    o/p:
    empno
    777
    due to create stmnt it was autocommit so i got result..
    INSERT INTO EMP_BKP(EMPNO) VALUES(777);
    CREATE TABLE HJHJH AS SELECT * FROM JKJL; -- table JKJL doesn't exists
    ROLLBACK;
    SELECT * FROM EMP_BKP;
    o/p:
    empno
    777
    got error in create stmnt then too got o/p..
    how it worked as create command failed.?CREATE TABLE is DDL & every DDL does COMMIT before it starts & COMMIT after it ends.
    You can only ROLLBACK DML & not DDL

  • Scope of one phase commit optimization?

    Hello,
    I am unclear about the scope across which Tuxedo XA can optimize the commit to a one phase commit when there is only a single resource involved.
    Is it just the process?
    Or is it the group (same TM)?
    Based on the XA specification, it is the connection that matters. The one phase commit is only possible if a single connection is involved.
    However, in the Tuxedo case, the Transaction Manager is shared amongst all the processes in a group. Therefore, the Transaction Manager could be aware that only one Resource Manager is involved, even when the transaction spans multiple processes (within the group). Thus from the TM perspective, a one phase commit would be possible. But then again the Resource Manager would have to support that too.
    The context for this is Tuxedo 11, ATMI, XA and Oracle 11g. Some transactions use /Q and DB (requiring XA and two phase commit), other transactions only affect the DB.
    Thanks...
    Roger

    Hi Roger,
    I'm not sure where the idea that one-phase commit is "only possible if a single connection is involved."? Here is the description of the one phase commit optimization from the XA specification:
    "One-phase Commit
    A TM can use one-phase commit if it knows that there is only one RM anywhere in
    the DTP system that is making changes to shared resources. In this optimisation,
    the TM makes its Phase 2 commit request without having made a Phase 1 prepare
    request. Since the RM decides the outcome of the transaction branch and forgets
    about the transaction branch before returning to the TM, there is no need for the TM
    to record stably these global transactions and, in some failure cases, the TM may not
    know the outcome."
    The TM can also get back read-only from an RM on prepare and use that to decide to perform a one-phase commit if there had only been one other RM involved.
    IIRC Tuxedo decides to do a one-phase commit if there is only one group involved in the transaction. So if you have two groups accessing the database, I don't believe Tuxedo will perform a one-phase commit, even if the two groups are connected to the same RM.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • One phase commit optimization with AQ as Foreign JMS Provider?

    Hello,
    we currently use Weblogic JMS and Oracle DB in our server. This requires XA and the two phase commit.
    We are considering to switch from Weblogic JMS to Oracle AQ. The main reason is to move persistence from files to the DB (which is RAC). We could use JDBC persistence, but we think AQ will be more efficient and flexible.
    We also hope that using AQ will allow WLS to make use of the one phase commit optimization in XA (when only one resource manager is involved). But I am wondering if the extra abstraction of the Foreign JMS Provider prevents that optimization.
    Anybody know? Have tried this?
    Thanks...
    Roger

    This might be of help to you. https://xa-compliant-oracleaq.projects.dev2dev.bea.com
              In this case, whenever the MDB polls on the bound QCF(This is a Referenceable Object), WebLogic calls the ObjectFactory class and recreates the QCF for the MDB. I think you can take a similar approach. Mind you will have to implement the Referenceable interface for this. This way, you won't have to re-run your startup class.
              cheers !
              Dips

Maybe you are looking for

  • Issue with member formula editor in Planning 11.1.2.4

    Hello Gurus, I just wanted to add a formula for a planning application member through workspace (v.11.1.2.4), but when I tried member -> edit -> member formula... it stays there by saying the 'Loading Member Formula Editor'.................. nothing

  • How to select first row of each group in a group by statement

    Table             ProdCode    PackType    BatchCode    ExpDate BURSLO               1             BS20GO-2001    01/12/2004 BURSLO               1             BS20GO-2011    01/01/2007 BURSLO               2             BS20GO-2027    01/02/2003 BURS

  • To Airport 6.0/7.6.1 firmware or not to

    My airport is hooked up to the following: 1. A 10.6.8 Mac Mini acting as my Magicjack terminal. 2. A 10.6.8 notebook I dare not upgrade to 10.7 as my wife has a hard enough time just adjusting to 10.6.  Patched for Flashback 3. A 10.7.3 notebook and

  • Error code -8003 when trying to empty trash on external HD

    Hi I have a 2008 MacBook and a couple of external drives by iomega. Yesterday I was trying to copy 15 gb of files from my MacBook to my USB external drive, and didn't have enough space. So I attempted to delete all my Time Machine backups from 2011 (

  • Unable to open the Network connection In WTK2.3

    hi all. I am doing an application in which i am downloading the screen details from the XML file, which will be available in the Server. with the details i will manipulate the screen in the MIDlet. The application was working fine in the localhost, w