Oracle Global Transaction Internal Transaction ID.

I see that for any named Global Transaction opend through an OCI Program, Oracle creates an internal transaction ID. I am able to see it in the system table DBA_2PC_PENDING
DBA_2PC_PENDING.LOCAL_TRAN_ID is the internal txn id generated by Oracle Database for this global transaction
DBA_2PC_PENDING.GLOBAL_TRAN_ID is the Application given txn id.
Is ther a way to get the internal txn id for a global transaction from an OCI program.

create public database link taral_link connect to scott identified by oracle using 'TARAL';
select sysdate from dual@taral_link;
ORIGIN               GTXID                          LSESSION                              USERNAME
CORP_USER_-3056:2860 TARAL.46eacd73.3.18.11853      177.29                                SYSNow from controlfile if you see k2gtitid_ora is exactly reverse of dbid
Db ID=937209444=0x37dcae64, Db Name='TARAL'Well 3.18.11853 is transaction id

Similar Messages

  • How to configure global transaction wthin Oracle AS JMS and Oracle JMS

    How to configure global transaction if I take a message from Oracle JMS(AQ) and send it to the Oracle JMS?

    Which version of OC4J are you working on?
    In OC4J 10.1.3.x, presume your OC4J JMS listens messages via MDB which uses a resource adapter as a message listener. The resouce adaper could be the generic JMS adapter deployed in OC4J as the default.
    Resource adapter configuration to support MDBs is included in the standard ra.xml file, which lists the message listener types that the resource adapter supports.
    The MDB developer or deployer configures the MDB in the ejb-jar.xml file, through a <message-driven> element.
    In addition to above, configuration in the ejb-jar.xml file specifies whether an MDB uses transactions.
    1) The <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Container, and the <trans-attribute> subelement of <container-transaction> (under the <assembly-descriptor> element) has a value of Required. In this circumstance, if there is an imported transaction, then message delivery and related work are performed within that transaction. If there is no imported transaction, OC4J creates a transaction, and message delivery and related work are performed within that transaction.
    2) The <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Bean. In this circumstance, the MDB manages the transaction. If a transaction is imported, OC4J will suspend it before the message delivery method call to the MDB, in order to avoid conflict.
    Message delivery is not transacted if the <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Container, but the <trans-attribute> element has a value of NotSupported. If there is an imported transaction in this circumstance, OC4J will suspend the transaction before the message delivery method call to the MDB.
    Details could be found from OC4J Resource Adapter Guide.

  • Global transaction problem with JDriver/Oracle and Oracle XA

    We are haveing serious problems with Container Managed Transactions on Bea 6.1
    and Oracle with EJB having set "Required" for all methods. We have tried in vain
    to make it work with JDriver as well as OracleXAClient. Both fail at sometime
    during the execution throwing "Not called in cotext of global transaction" (with
    JDriver) OR "XAER_PROTO : Routine was invoked in an
    inproper context start() failed on resource 'OracleXAPool'" (this one with oracle
    XA).
    1.) Weblogic JDriver-XA:
    DatabaseMetaData metaData = dataSource.getJDBCConnection.getMetaData();
    ResultSet resultSet = metaData.getTables(null, null, tableName.toUpperCase(),
    new String[]{"TABLE"});
    This fails immmediately saying that it was not called from global transaction.
    Interesting thing is that with OracleXA, it doesnt say this exception at this
    check point.
    2) Oracle XA
    Okie, we couldnot read through the CLOB using it so for reading CLOB, we used
    direct jdbc connection and then did away with it. Now all next sql queries were
    executed against oracle pool using XA data source with OracleXAClient. But at
    some point we again ran into the problem "XAER_PROTO : Routine was invoked in
    an
    inproper context start() failed on resource 'OracleXAPool'"
    3 Oracle Thin Driver
    everything always works with it.

    AFAIR this issue was resoved by moving tx opreations out from non-tx
    methods.
    Regards,
    Slava
    "Apurb Kumar" <[email protected]> wrote in message
    news:[email protected]...
    Jawad,
    It would be nice if you can post the full stack trace error message. Didyou try moving to
    the latest service pack (sp2) for WLS6.1.
    Thanks,
    Jawad Mahmood wrote:
    Yes we had correctly set TXDataSource and let it to point to the right
    connection
    pool each time and it worked well with oracle thin driver but not whenwe switched
    the pool to JDriver or OracleXAClient. Note that we could aways confirmthat pool
    was successfully created alongwith we could retrieve connection from itvia TXDatSource,
    things gave problem after we attempted to do what i had mentioned in mylast posting.
    >>
    Also with JBoss 2.4.4 things work pretty well. So couldnt be our codeproblem.
    "Slava Imeshev" <[email protected]> wrote:
    Jawad,
    Did you set up TxDataSource?
    Regards,
    Slava Imeshev
    "Jawad Mahmood" <[email protected]> wrote in message
    news:[email protected]...
    We are haveing serious problems with Container Managed Transactionson
    Bea 6.1
    and Oracle with EJB having set "Required" for all methods. We havetried
    in vain
    to make it work with JDriver as well as OracleXAClient. Both fail atsometime
    during the execution throwing "Not called in cotext of global
    transaction"
    (with
    JDriver) OR "XAER_PROTO : Routine was invoked in an
    inproper context start() failed on resource 'OracleXAPool'" (this onewith
    oracle
    XA).
    1.) Weblogic JDriver-XA:
    DatabaseMetaData _metaData =
    _dataSource.getJDBCConnection.getMetaData();
    ResultSet resultSet = metaData.getTables(null, null,tableName.toUpperCase(),
    new String[]{"TABLE"});
    This fails immmediately saying that it was not called from globaltransaction.
    Interesting thing is that with OracleXA, it doesnt say this exceptionat
    this
    check point.
    2) Oracle XA
    Okie, we couldnot read through the CLOB using it so for reading CLOB,we
    used
    direct jdbc connection and then did away with it. Now all next sqlqueries
    were
    executed against oracle pool using XA data source with
    OracleXAClient.
    But
    at
    some point we again ran into the problem "XAER_PROTO : Routine wasinvoked
    in
    an
    inproper context start() failed on resource 'OracleXAPool'"
    3 Oracle Thin Driver
    everything always works with it.
    Apurb Kumar

  • Mix Local and Global Transaction using XA Driver for Oracle

    Hi all,
    We are trying to use a XA Driver which can support both local as well as global
    transaction. We tried using the Weblogic jDriver (XA Driver) type 2 that comes
    along with Weblogic installation but unfortunaltely it cannot mix local as well
    as global transaction.
    Please let me know in case we have any XA JDBC driver for Oracle Database which
    supports both local and global transaction together.
    Thnx,
    Kumar
    Environment:
    Weblogic 8.1 server
    Database used : Oracle8i

    Most database drivers can support local and global transactions, with some
    restrictions.
    The JDBC spec has been changed to require compliant drivers to let the
    application
    know if they try to start a global transaction while a local transaction has
    not been
    completed (or vice verse). So most of the database drivers have been
    changed to enforce
    this restriction (breaking a lot of code that is out there).
    "Kumar Raman" <[email protected]> wrote in message
    news:4033457c$[email protected]..
    >
    Hi all,
    We are trying to use a XA Driver which can support both local as well asglobal
    transaction. We tried using the Weblogic jDriver (XA Driver) type 2 thatcomes
    along with Weblogic installation but unfortunaltely it cannot mix local aswell
    as global transaction.
    Please let me know in case we have any XA JDBC driver for Oracle Databasewhich
    supports both local and global transaction together.
    Thnx,
    Kumar
    Environment:
    Weblogic 8.1 server
    Database used : Oracle8i

  • Oracle ODBC Failed to enlist global transaction with DTC

    Hi Everyone,
    I have installed a COM+ application on a Windows Server 2008 R2 x64 machine. Which is using Oracle Client version 11.1.7.0 (32 bit).
    Application is using 11.1.7.0 (x64) Database running on another server with same OS. When I run some functionality in the application, I am getting a message saying
    "The Error [Oracle][ODBC]Failed to enlist global transaction with DTC".
    This error happened in a production environment. It is working on my test machine under same situation. The application is certified on above Oracle version.
    Please let me know what can be cause of the problem.
    Thanks & Regards,
    Anil

    I have the same problem with Oracle OLEDB provider also. Use
    Microsoft drivers they work and faster...
    Eddy

  • Does Oracle App Server 10.1.3.1 support global transactions?

    I'm asking because it seems it doesn't. My stateless EJB calls an EJB in another application server, but the transaction is not propagated. Why is that?
    Does it matter which inittial context factory or which TransactionalObject?
    Do the different application server vendors (Oracle, Websphere ect.) support global transactions between each other?
    I cannot find anything about this in the Oracle App server documentation.
    Can anyone help?

    Hello,
    Yes i should be possible to do.
    Have you look at the OC4J transaction propagation that used the OracleAS transaction manager?
    - How to list.
    This will help you to configure properly your application.
    Documentation:
    - Data source and Global Transactions (XA)
    - How do You Participate in a Global or Two-Phase Commit (2PC) Transaction?
    - Configuring Transaction Service
    Hope that helps...
    Regards
    Tugdual Grall

  • The method 'rollback' cant be called when a global transaction is active

    I receive the following error stack while dequeuing a message (aq adapter outbound) and forward the message to a database (database adapter inbound) within Oracle ESB 10.1.3.4.
    The database connection is dynamic using additional variables in the xlst transformation and putting the connection information (jndi name) in the xml doc:
    <xsl:variable name="JDBC_RESOURCE"
    select="/imp1:MixMatchMsg/imp1:Winkel/imp1:JNDI_NAME"/>
    <xsl:variable name="SET_DATASOURCE"
    select="ehdr:setOutboundHeader('/dhdr:OutboundDBHeaderType/dhdr:dataSourceName',$JDBC_RESOURCE,'dhdr=http://xmlns.oracle.com/pcbpel/adapter/db/;')"/>
    An unhandled exception has been thrown in the ESB system.
    The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException:
    esb:///ESB_Projects/mixmatch_MixMatchESB/WriteWinkels.wsdl
    [ WriteWinkels_ptt::merge(IntMixMatchCollection) ]
    - WSIF JCA Execute of operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    merge failed.
    Descriptor name: [WriteWinkels.IntMixMatch].
    [Caused by: The method 'rollback' cant be called when a global transaction is active.]
    ; nested exception is:
         ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteWinkels.IntMixMatch].
    [Caused by: The method 'rollback' cant be called when a global transaction is active.]
    Caused by Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.4.0) (Build 080602))
    : oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException:
    The method 'rollback' cant be called when a global transaction is active.Error Code: 0.
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:644)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:739)
    at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:927)
    at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:842)
    at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:865)
    at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(OutboundAdapterService.java:231)
    at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(OutboundAdapterService.java:138)
    at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:411)
    at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:169)
    at oracle.tip.esb.server.dispatch.BusinessEvent.raise(Bu
    The payload looks as follows:
    <top:IntMixMatchCollection xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/WriteWinkels">
    <top:IntMixMatch>
    <top:nummer>1</top:nummer>
    <top:omschrijving>C1000 Tandenborstels: 3 voor 2.56</top:omschrijving>
    <top:kassabonOmschrijving1>Tandenborstelactie</top:kassabonOmschrijving1>
    <top:kassabonOmschrijving2>3 voor 2</top:kassabonOmschrijving2>
    <top:aantalPerKlant>2</top:aantalPerKlant>
    <top:begindatum>2009-03-16</top:begindatum>
    <top:einddatum>2009-03-21</top:einddatum>
    <top:mixMatchGroepNummer>1</top:mixMatchGroepNummer>
    <top:mixMatchGroepOmschrijving>WK 200912 Mix matchess</top:mixMatchGroepOmschrijving>
    <top:intMixMatchDsCollection>
    <top:IntMixMatchDs>
    <top:volgnummer>1</top:volgnummer>
    <top:aantalTeNemenArtikelen>3</top:aantalTeNemenArtikelen>
    <top:omschrijving>C1000 Tandenborstels</top:omschrijving>
    <top:kortingToerekenenJn>J</top:kortingToerekenenJn>
    <top:bedragTeBesteden>1.23</top:bedragTeBesteden>
    <top:kortingwaarde>2.56</top:kortingwaarde>
    <top:mixMatchNummer>1</top:mixMatchNummer>
    <top:intMixMatchHfdgrInDsCollection>
    <top:IntMixMatchHfdgrInDs>
    <top:hoofdgroepnummer>16</top:hoofdgroepnummer>
    <top:mixMatchNummer>1</top:mixMatchNummer>
    <top:mixMatchDoosVolgnummer>1</top:mixMatchDoosVolgnummer>
    </top:IntMixMatchHfdgrInDs>
    </top:intMixMatchHfdgrInDsCollection>
    <top:intMixMatchArtikelInDsCollection>
    <top:IntMixMatchArtikelInDs>
    <top:artonnummer>10010205</top:artonnummer>
    <top:actieInkoopprijsEncrypted>6C1407B28B5B7EDC</top:actieInkoopprijsEncrypted>
    <top:uitsluitenJn>J</top:uitsluitenJn>
    <top:mixMatchNummer>1</top:mixMatchNummer>
    <top:mixMatchDoosVolgnummer>1</top:mixMatchDoosVolgnummer>
    </top:IntMixMatchArtikelInDs>
    </top:intMixMatchArtikelInDsCollection>
    <top:intMixMatchHfdsubgrpInDsCollection>
    <top:IntMixMatchHfdsubgrpInDs>
    <top:hoofdsubgroepnummer>82</top:hoofdsubgroepnummer>
    <top:mixMatchNummer>1</top:mixMatchNummer>
    <top:mixMatchDoosVolgnummer>1</top:mixMatchDoosVolgnummer>
    </top:IntMixMatchHfdsubgrpInDs>
    </top:intMixMatchHfdsubgrpInDsCollection>
    </top:IntMixMatchDs>
    </top:intMixMatchDsCollection>
    <top:intMixMatchTijdCollection>
    <top:IntMixMatchTijd>
    <top:dagnummer>1</top:dagnummer>
    <top:begintijd>0001-01-0112.23.00</top:begintijd>
    <top:eindtijd>0001-01-0114.45.00</top:eindtijd>
    <top:mixMatchNummer>1</top:mixMatchNummer>
    </top:IntMixMatchTijd>
    </top:intMixMatchTijdCollection>
    </top:IntMixMatch>
    </top:IntMixMatchCollection>
    Anybody any idea what could be wrong?
    Any ideas for a workaround/solution?

    I encountered this error while trying ADF tutorial CH10 - Developing an Edit Page, after changing some data on the Edit page and click on Save, the error appears on top of the page. The roll back was called implicatly by ADF, per stack trace msg it seems to come from failing to commit and then failing to roll back. Not sure why this is happening, please advise.
    WARNING: The method 'commit' cant be called when a global transaction is active. [TopLink Warning]: 2006.12.27 12:14:39.963--ClientSession(29795927)--Thread(Thread[HTTPThreadGroup-6,5,HTTPThreadGroup])--Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: The method 'commit' cant be called when a global transaction is active.Error Code: 0....
    at QPPublicFacade_LocalProxy_4ogao92.mergeEntity(Unknown Source)<----------> WHAT may cause mergeEntity failed??

  • Cannot connect on OWB - "started new global transaction without ending..."

    Hi, folks.
    I had to change my computer and reinstall my OWB 11.1.0.6.0 in my PC (Windows 7 64b), but thus far I couldn't connect to OWB and we don't really know what to do here.
    We've been experiencing these following mistakes:
    "PRS-00322: Internal Error: started new global transaction without ending existing global transaction. Please contact Oracle Support with the stack trace and details on how to reproduce it".
    "API5022: It's not possible to establish connection with the specified account. Check out the connection information".
    Do I have to change something on the TNSNAMES.ora or something like this?
    Thanks for your help

    have u tried this
    alter system session kill immediate""..
    else
    login as sys and check status of OWB design user...see if that is locked
    or at last
    if possible reboot the database server

  • Advise on using DBMS_XA with multiple branches under one global transaction

    Dear all
    I need some advise on using DBMS_XA from PL/SQL with tightly coupled multiple branches under one global transaction. Basically, I've successfully written some PL/SQL code that in 3 different sessions attaches to 3 different branches of one global transaction and before ending each branch they can see each others uncommitted data. So far so good.
    However, I'm not sure I completely understand how each branch must call xa_end, xa_prepare and xa_commit correctly using two phase commit and my calls result in errors like:
    ORA-24767: transaction branch prepare returns read-only (XA error code 3 = Transaction was read-only and has been committed)
    ORA-24756: transaction does not exist (XA error code -4 = XID is not valid)
    ORA-02051: another session or branch in same transaction failed or finalized
    This is the structure of my programs (3 SQL*Plus sessions):
    main: Uses xid 123|0 (branch 0 of global transaction 123). This should be the coordinator that commits using two phase commit across the 3 branches
    m1.xa_start tmnoflags
    m2.DML
    m3.Wait for thread A + B to manually be started and run xa_end
    m4.xa_end tmsuccess
    m5.xa_prepare
    m6.xa_commit false
    thread A: Uses xid 123|A (branch A of global transaction 123)
    a1.xa_start tmnoflags
    a2.DML -- thread A can see main and thread B's data
    a3.xa_end tmsuccess
    a4.xa_prepare -- required?
    a5.Should we also call xa_commit false?
    thread B: Uses xid 123|B (branch B of global transaction 123)
    b1.xa_start tmnoflags
    b2.DML -- thread B can see main and thread A's data
    b3.xa_end tmsuccess
    b4.xa_prepare -- required?
    b5.Should we also call xa_commit false?
    The failing steps are:
    m5
    m6
    a4
    a5
    b4
    b5
    Before starting calling xa_end I see 3 rows in V$GLOBAL_TRANSACTION, eg (hex 7B = decimal 123):
    FORMATID GLOBALID BRANCHID BRANCHES REFCOUNT PREPARECOUNT STATE FLAGS COUPLING
    203348753 0000007B 00000000000000000000000000000000 3 3 0 ACTIVE 0 TIGHTLY COUPLED
    203348753 0000007B 0000000000000000000000000000000A 3 3 0 ACTIVE 0 TIGHTLY COUPLED
    203348753 0000007B 0000000000000000000000000000000B 3 3 0 ACTIVE 0 TIGHTLY COUPLED
    Thanks a lot in advance.
    Cheers
    Finn

    OK, I've figured it out. This is poorly documented as it's not well explained how to handle the various return codes. Turns out that all but the last xa_prepare calls return dbms_xa.xa_rdonly (tightly coupled branches are combined -- "read only" optimization), the last one returns dbms_xa.xa_ok and this is when you should call xa_commit.
    Now my next problem is that DBMS_XA doesn't work from within jobs (DBMS_JOB and DBMS_SCHEDULER), which makes it very difficult to use DBMS_XA. My purpose of using DBMS_XA is to coordinate work across multiple sessions in one transaction but if I can't easily create the multiple sessions, I'm stuck.
    When called from a job, xa_start throws:
    ORA-24789: start not allowed in recursive call
    on Oracle 11.2. In Oracle 11.1 it works, but xa_end fails with
    ORA-25352: no current transaction
    so I guess in fact the xa_start call didn't really work either, even though it returned tm_ok.
    I'm now trying to find a workaround on how to use DBMS_XA from within jobs, please comment if you have any suggestions. Or if you have any suggestions on other means of establishing the concurrent sessions (I wouldn't like to resort to external programs that need username/password to connect as password management would be a security issue).
    Thanks in advance.
    Cheers
    Finn

  • The method 'commit' cant be called when a global transaction is active.

    Hello,
    I've installed the SOAdemo a couple of times on local machines, and it works fine. Now I've deployed the SOADemo on a separate server and a strange error occurs in BPEL when testing the SOADemo.
    The SOAOrderBooking BPEL process runs into an error at the GetOrderId process:
    ================================
    file:/C:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_SOAOrderBooking_1.0_937b09d1bd8dae1b33b028b2871aef63.tmp/OrderSequence.wsdl [ OrderSequence_ptt::OrderSequence(OrderSequenceInput_msg,OrderSequenceOutputCollection) ] - WSIF JCA Execute of operation 'OrderSequence' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    unknown failed. Descriptor name: [unknown]. [Caused by: The method 'commit' cant be called when a global transaction is active .
    ; nested exception is:
         ORABPEL-11616
    =================================
    I am using SOA Suite 10.1.3.0 and Database 10201, deployed on Windows.
    Can anybody tell me what can cause this problem?
    Thanks in advance,
    Regards Leon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    Hi, I am getting the same error using ESB Database Adapter.
    My faultstring is:
    ========================
    oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: esb:///ESB_Projects/my_ESB/myAdapter.wsdl [ myAdapter_ptt::myAdapter(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'myAdapter' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    unknown failed. Descriptor name: [unknown]. [Caused by: The method 'commit' cant be called when a global transaction is active.]
    ; nested exception is:
         ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    unknown failed. Descriptor name: [unknown]. [Caused by: The method 'commit' cant be called when a global transaction is active.]
    Caused by Exceptoin [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DatabaseException
    Belső kivétel: java.sql.SQLException: The method 'commit' cant be called when a global transaction is active.Error Code: 0.
    ==========================
    (BTW, what has 'commit' to do with a procedure that is only reading the database?)
    Regards,
    Patrik

  • Error in Global Transaction

    Hi,
    I have installed Tuxedo 10R3 on AIX 5.3.. I have written a sample code for Global Transaction.. While invoking the service, Tpcall is failing with status 0.. So i couldnot understand where the error..
    My source code for client program is:
    IDENTIFICATION DIVISION.
    PROGRAM-ID. GLOBCL.
    AUTHOR. TUXEDO DEVELOPMENT.
    ENVIRONMENT DIVISION.
    CONFIGURATION SECTION.
    DATA DIVISION.
    WORKING-STORAGE SECTION.
    * Tuxedo definitions
    01 TPTYPE-REC.
    COPY TPTYPE.
    01 TPSTATUS-REC.
    COPY TPSTATUS.
    01 TPSVCDEF-REC.
    COPY TPSVCDEF.
    01 TPINFDEF-REC.
    COPY TPINFDEF.
    01 TPTRXDEF-REC.
    COPY TPTRXDEF.
    * Log messages definitions
    01 LOGMSG.
    05 FILLER PIC X(8) VALUE "GLOBCL:".
    05 LOGMSG-TEXT PIC X(50).
    01 LOGMSG-LEN PIC S9(9) COMP-5.
    01 USER-DATA-REC PIC X(75).
    01 SEND-STRING PIC X(100) VALUE SPACES.
    01 RECV-STRING PIC X(100) VALUE SPACES.
    LINKAGE SECTION.
    01 OS-LEN PIC S9(9) COMP.
    01 OS-STRING.
    02 PARMPTR-TABLE OCCURS 1 TO 100 TIMES DEPENDING
    ON OS-LEN.
    03 PARMPTR POINTER.
    01 PARM-STRING PIC X(100).
    * Start program with command line args
    PROCEDURE DIVISION
    USING BY VALUE OS-LEN BY REFERENCE OS-STRING.
    MOVE LOW-VALUES TO TPINFDEF-REC.
    MOVE LENGTH OF LOGMSG TO LOGMSG-LEN.
    SET ADDRESS OF PARM-STRING TO PARMPTR(2).
    MOVE PARM-STRING TO SEND-STRING.
    START-GLOBCL.
    DISPLAY "SEND-STRING:" SEND-STRING.
    MOVE "Started" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    PERFORM DO-TPINIT.
    PERFORM DO-TPBEGIN.
    PERFORM DO-TPCALL.
    PERFORM DO-TPCOMMIT.
    PERFORM DO-TPTERM.
    PERFORM EXIT-PROGRAM.
    * Now register the client with the system.
    DO-TPINIT.
    MOVE SPACES TO USRNAME.
    MOVE SPACES TO CLTNAME.
    MOVE SPACES TO PASSWD.
    MOVE SPACES TO GRPNAME.
    MOVE ZERO TO DATALEN.
    SET TPU-DIP TO TRUE.
    CALL "TPINITIALIZE" USING TPINFDEF-REC
    USER-DATA-REC
    TPSTATUS-REC.
    IF NOT TPOK
    MOVE "TPINITIALIZE Failed" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    PERFORM EXIT-PROGRAM
    END-IF.
    DO-TPBEGIN.
    MOVE 0 TO T-OUT.
    CALL "TPBEGIN" USING TPTRXDEF-REC TPSTATUS-REC.
    IF NOT TPOK
    MOVE "TPBEGIN Failed" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    DISPLAY "TPBEGIN:" TP-STATUS
    PERFORM EXIT-PROGRAM
    END-IF.
    DISPLAY "COMM HANDLE:" COMM-HANDLE.
    * Issue a TPCALL
    DO-TPCALL.
    MOVE 100 TO LEN.
    MOVE "STRING" TO REC-TYPE.
    MOVE "GLOBSRV" TO SERVICE-NAME.
    SET TPBLOCK TO TRUE.
    SET TPTRAN TO TRUE.
    SET TPNOTIME TO TRUE.
    SET TPSIGRSTRT TO TRUE.
    SET TPCHANGE TO TRUE.
    CALL "TPCALL" USING TPSVCDEF-REC
    TPTYPE-REC
    SEND-STRING
    TPTYPE-REC
    SEND-STRING
    TPSTATUS-REC.
    IF NOT TPOK
    MOVE "TPCALL Failed" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    DISPLAY "TPCALL:" TP-STATUS
    END-IF.
    DO-TPCOMMIT.
    CALL "TPCOMMIT" USING TPTRXDEF-REC TPSTATUS-REC.
    IF NOT TPOK
    MOVE "TPCOMMIT Failed" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    DISPLAY "TPCOMMIT:" TP-STATUS
    PERFORM EXIT-PROGRAM
    END-IF.
    DISPLAY "RECV-STRING:" SEND-STRING.
    * Leave TUXEDO
    DO-TPTERM.
    CALL "TPTERM" USING TPSTATUS-REC.
    IF NOT TPOK
    MOVE "TPTERM Failed" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    END-IF.
    * Log messages to the userlog
    DO-USERLOG.
    CALL "USERLOG" USING LOGMSG
    LOGMSG-LEN
    TPSTATUS-REC.
    *Leave Application
    EXIT-PROGRAM.
    MOVE "Ended" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    STOP RUN.
    and the source code for server program is:
    IDENTIFICATION DIVISION.
    PROGRAM-ID. GLOBSRV.
    AUTHOR. TUXEDO DEVELOPMENT.
    ENVIRONMENT DIVISION.
    CONFIGURATION SECTION.
    DATA DIVISION.
    WORKING-STORAGE SECTION.
    * Tuxedo definitions
    01 TPSVCRET-REC.
    COPY TPSVCRET.
    01 TPTYPE-REC.
    COPY TPTYPE.
    01 TPSTATUS-REC.
    COPY TPSTATUS.
    01 TPSVCDEF-REC.
    COPY TPSVCDEF.
    * Log message definitions
    01 LOGMSG.
    05 FILLER PIC X(10) VALUE
    "GLOBSRV :".
    05 LOGMSG-TEXT PIC X(50).
    01 LOGMSG-LEN PIC S9(9) COMP-5.
    * User defined data records
    01 RECV-STRING PIC X(100).
    01 SEND-STRING PIC X(100).
    LINKAGE SECTION.
    PROCEDURE DIVISION.
    START-FUNDUPSR.
    MOVE LENGTH OF LOGMSG TO LOGMSG-LEN.
    MOVE "Started" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    * Get the data that was sent by the client
    MOVE LENGTH OF SEND-STRING TO LEN.
    CALL "TPSVCSTART" USING TPSVCDEF-REC
    TPTYPE-REC
    SEND-STRING
    TPSTATUS-REC.
    IF NOT TPOK
    MOVE "TPSVCSTART Failed" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    PERFORM EXIT-PROGRAM
    END-IF.
    IF TPTRUNCATE
    MOVE "Data was truncated" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    PERFORM EXIT-PROGRAM
    END-IF.
    INSPECT SEND-STRING CONVERTING
    "abcdefghijklmnopqrstuvwxyz" TO
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
    MOVE SEND-STRING TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    MOVE "Success" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    SET TPSUCCESS TO TRUE.
    COPY TPRETURN REPLACING
    DATA-REC BY SEND-STRING.
    * Write out a log err messages
    DO-USERLOG.
    CALL "USERLOG" USING LOGMSG
    LOGMSG-LEN
    TPSTATUS-REC.
    * EXIT PROGRAM
    EXIT-PROGRAM.
    MOVE "Failed" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    SET TPFAIL TO TRUE.
    COPY TPRETURN REPLACING
    DATA-REC BY SEND-STRING.
    and the output is:
    GLOBCL hi
    SEND-STRING:hiCOB=IBMCobolDB2INSTANCE=db2inst4FLDTBLDIR=/usr/Oracle/Tuxedo10g/udataobj:AUTHSTATE=compatVIEW
    COMM HANDLE:0000000000
    TPCALL:0000000000
    RECV-STRING:hiCOB=IBMCobolDB2INSTANCE=db2inst4FLDTBLDIR=/usr/Oracle/Tuxedo10g/udataobj:AUTHSTATE=compatVIEW
    in the ULOG:
    223955.ibmsceai!?proc.676012.1.-2: 08-10-2009: Tuxedo Version 10.3.0.0, 32-bit
    223955.ibmsceai!?proc.676012.1.-2: GLOBCL: Started
    223955.ibmsceai!?proc.676012.1.0: gtrid x0 x4a80e7fe x1: GLOBCL: TPCALL Failed
    223955.ibmsceai!?proc.676012.1.-2: GLOBCL: Ended
    Any suggestion regarding this??
    Thanks..

    Hi,
    Try switching the order of logging the error message and the DISPLAY of TPSTATUS in the IF NOT TPOK sentence following the CALL of TPCALL. I believe the call to USERLOG is overwriting TPSTATUS so what you are seeing is TPOK from the USERLOG call and not the original status from the TPCALL. Hopefully this will allow you to see the actual error status from the TPCALL.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • MQ message is not coming back in MQ in case of error in Global Transaction

    Hi,
    ```````````````````````````````````````````````````````
    I am using Oracle JDeveloper 11.1.1.5.0 and SOA server 11.1.1.5
    ```````````````````````````````````````````````````````
    Use Case :_
    I have created a Sync BPEl process. In which I am dequeing the messages from MQ using "Get Messages from MQ" Operation available in MQ series Adapter. Also checked the Synchronous check Box, So that we can have the Ondemand dequeing of Messages.
    Three Properties have been added In Composite.xml file  to make the MQ adapter service participate in Single global transaction :
    <property name="*bpel.config.transaction*">required</property>
    <property name="*bpel.config.oneWayDeliveryPolicy*">sync</property>
    <property name="*partnerLink.SyncReadMQ.transaction*" type="xs:string" many="false">participate</property>
    (this last property is added in the partner link of the MQ series adpater, And hence refleacted in the composite.xml file)
    Also provide the MQ Adapter configuration XATransaction='true' in Admin console, to support the Global transaction by following the Oracle Doc (http://docs.oracle.com/cd/E17904_01/integration.1111/e10231.pdf)
    Issue :_
    In case of any system error, The Message is not going back into the MQ and it is lost. My concern is that if I have made the MQ adpater service to participate in the global transaction of the Main BPEL process then upon any fault occur the Adapter service should be rolled back. but it is not happening.
    I want the message back in the Queue in case of any error.
    Would anyone please help me in this issue.+
    `````````````````````````````````````````````````````````````````````````````````````````
    One more thing to notice is that MQ Adapter is a transactional adapter it should participate in the rtransaction.
    `````````````````````````````````````````````````````````````````````````````````````````
    Thanks
    Sunil
    Edited by: 856749 on May 17, 2012 10:57 AM
    Edited by: 856749 on May 18, 2012 7:34 PM

    Hi All,
    Still this thread is unanswered, Is there any genius who has done Transaction handling on Adpaters (MQ or JMS). I have look into may threads on forums, but no appropriate information is given about this issue. If this thread is been answered then it will be very helpfull for othes dealing with transaction in MQ.
    Thanks
    Sunil

  • SQL operations are not allowed with no global transaction by default for X

    Hi All,
    I am getting the above mentioned error.
    java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA driver supports performing SQL operations with no global transaction, explicitly allow it by setting "SupportsLocalTransaction" JDBC connection pool property to true. In this case, a
    lso remember to complete the local transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().
    I am developing a web application. I have jsp, servlets, JDBC classes.
    I am using DataSource and Connection pools.
    I am on WLS 8.1 sp3 and Oracle 10.1.
    Part of My Config file looks as follows:
    <JDBCConnectionPool DriverName="weblogic.jdbcx.oracle.OracleDataSource" KeepLogicalConnOpenOnRelease="true" KeepXAConnTillTxComplete="false" Name="AUMDataSource" NeedTxCtxOnClose="false" NewXAConnForCommit="false" Password="{3DES}AKRkWgdzXN8WrXSRtSvJ6g==" Properties="user=pibsrmgr;portNumber=1521;SID=pibsrdod;serverName=pibsrdod.dtu.mlam.ml.com" RollbackLocalTxUponConnClose="true" SupportsLocalTransaction="false" Targets="myserver" TestTableName="SQL SELECT 1 FROM DUAL" URL="jdbc:bea:oracle://pibsrdod.dtu.mlam.ml.com:1521" XAEndOnlyOnce="false" />
    <JDBCTxDataSource EnableTwoPhaseCommit="true" JNDIName="jdbc/AUMDataSource" Name="AUMDataSource" PoolName="AUMDataSource" Targets="myserver" />
    Any help will be appreciated.
    Thanks
    ---Radhe

    Hi,
    Regarding Transactions , the following link can helpful to you .
    Regards,
    Prasanna Yalam

  • Can the ApplicationModule support global Transaction for multi db instance?

    purpose:
    I want to update data in two db instance .
    pre-conditions:
    I create two application module , in the two application modules ,one is root application module. one application module connect one db instance, the other application module connect to the other db instance.The two application modules include entity objects and view objects which map the tables in the two db instance.
    In the jsp page , I bind two view objects , one view is owned by root application module ,the other view object is owned by child application module and the two view objects map the two tables which are in different db instance .the view objects binding style in the jsp page is input-form.
    The result:
    while the input-form is submitted ,the error occurs.The global transaction isn't committed, why?

    A nested application module instance uses the transaction/connection of its parent.
    The simplest way to accomplish what you're trying to do is to use Oracle database DBLinks so that the two-phase commit is handled at the database level.
    ADFBC does not support two-phase commit at the application level between two separate root application module's transactions.

  • Global transactions in OSB and EJB 2.1

    Hi,
    My team is working in a SOA service based on OSB 11g (11.1.1.5) using DB JCA Adapter and EJB 2.1 over WLS 10g(WLI environment). The logic of the service works in this way:
    1. A table in a database (XE) is polled by the DB Adapter which starts the service (1 row = 1 message).
    2. The message contains a collection of items to be inserted in another Oracle database.
         Once a message/row is picked, and after some steps (logging, validation,etc), there is a for..each action which extracts each item of the collection and executes a service callout action to a business service.
    3. This business service uses EJB protocol to call an EJB (2.1 + WLS Extensions). The EJB is deployed in another domain (WLS 10.3.0/10g and Oracle BEA drivers)  and only executes an store procedure with the parameters based on the message and inserts these values in a table.
    4. Once the for...each finishes, there is a call to another proxy service which marks the message/row as "processed" in the source table. This update is done via DB JCA also.
    5. In case of an error, the error handler of the proxy service calls the proxy service mentioned above to mark the row as "Failed" (in fact there is a retry mechanism, but it's not important for now).
    The service requires to work inside a global transaction. The main requirement is that the collection of items should be processed as "All or None", so basically we're using the options to manage the global transaction. However, the problem is that it's failing to rollback the whole insertion of items when an error is simulated. It only rolls back the last insertion/execution of SP.
    Additionally, the proxy service that should mark the row as FAILED, never updates this one, and the tables stay locked until we modify one of the store procedure in order to avoid the simulated error and commit the transaction.
    The EJB uses WLS extensions with the annotations to "transaction required". The proxy service has the option transaction required also. The database drivers are all XA and we're testing against Oracle11g XE (however, the EJB destiny will be Oracle 8i in production).
    We have tried different alternatives, splitting the logic in different proxies (Proxy services for JCA, Proxy with For Each for EJB, etc), isolating the specific part with the EJB call, without success.
    The security between domains is set as Global Trust.
    Do you have any idea, example or suggestion about this problem? Is EJB really supported in Global Transactions and XA?
    Thanks in advance.

    where do you find the J2EE Connector 1.5 compliant
    Resource Adapter?I wrote the compliant adapter myself. Hey Steve,
    Were you able to find a solution for this problem. I am struggling with the same problem with the RI Beta implementation.
    Sandeep

Maybe you are looking for