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

Similar Messages

  • 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

  • 2 Phase Commit Global Transaction resolution question.

    Hi All,
    I hope this is the right place to ask this question.
    I'm trying to figure out what generally happens after the JTA AbandonTimeout occurs.
    Here is the scenario.
    1. Transaction Manager sends Commit to Resource Managers 1 and 2.
    2. Resource Manager 1 receives and processes commit.  Resource Manager 2 doesn't receive commit.
    3. Resource Manager 1 returns acknowledgement.
    4. Transaction Manager times out and starts recovery process.
    5. Resource Manager 2 session times out and is set to in-doubt.
    6. Transaction Manager can never reconnect to Resource Manager 2, and the AbandonTimeout is reached.
    7. Transaction Manager abandons RM2 transaction.
    8. Does Transaction manager return an error for global transaction?
    I'm guessing the application the Transaction Manager is working for has its own timeouts which would most likely be a smaller value than the abandon timeout.  So the transaction would most likely timeout.  I'm just trying to make sure that the Global Transaction is not sent back as complete at a later time if the abandon timeout is reached.
    Any Thoughts?
    Thanks,
    Matt

    Petr-
    In article <avflf9$ccu$[email protected]>, Petr Bulanek wrote:
    Hi Marc,
    Well, what does it really mean that \'Kodo will not respect the
    semantics of the 2-phase-commit protocol\'?Are you saying that Kodo may commit my changes even if the other datastore
    decides to roll the transaction back at the last moment?
    That if Kodo has difficulties to commit, it would not roolback the global
    transaction and as a result the other datastores will commit?You are correct: we currently do not do anything special for 2 phase
    commit at all.
    I mean, this is quite important and would like to know exactly what to
    expect so I can work around it.
    Thank you,
    Petr
    P.S.
    I \'think\' I saw the plan to fix this in 2.5.x. What is the planned
    release date?It is in the milestone for 2.5. We can't make any committments on its
    release date, but it will hopefully be out within 2 months.
    Marc Prud\'hommeaux wrote:
    Petr-
    You can integrate Kodo\'s JDO transactions into the Application Server\'s
    global transaction (which might also commit multiple other
    transactions). The only issue is that Kodo will not respect the
    semantics of the 2-phase-commit protocol.
    We expect to have this issue resolved soon.
    In article <avdri3$f2o$[email protected]>, Petr Bulanek wrote:
    I have noticed that there is open bug (211) that refers to 2 phase commit
    and I just curious what the exact problem is.
    Does that imply that the current version (2.4) does not allow 2 phase
    commit?
    Let\'s say I need to integrate JDO into global transaction (managed by App
    server) and I may need during that transaction update multiple databases.
    It could be implemented via JDO (multiple PMFs) or it could be a
    combination of JDO and JDBC/EJB happening during the same transaction.
    Am I likely to hit a problem if I do that?
    Thank you,
    Petr
    Marc Prud\'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • 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

  • 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

  • E-Business Suite apps_initialize and SOA Global Transactions

    Hi,
    We are developing an integration which sends data from one system to an Oracle E-Business Suite instance. In order to load the data into E-Business we need to call API’s which require the fnd_global.apps_initialize to be run.
    We have a custom PL/SQL procedure which calls the API
    e.g.
    SOA -> custom PL/SQL -> E-Biz API
    The custom PL/SQL runs apps_initialize.
    The problem is when we call this from SOA via a XA connection we get the following error:
    <P_ERR_MESSAGE>Error - Failed to delete the interface records after reading result! Message: Unknown Error ORA-20001: Oracle error -20001: ORA-20001: Oracle error -2074: ORA-02074: cannot SET NLS in a distributed transaction
    has been detected in fnd_global.set_nls.set_parameter('NLS_LANGUAGE','AMERICAN').
    has been detected in fnd_global.set_nls. ORA-06512: at "APPS.APP_EXCEPTION", line 72
    ORA-06512: at "APPS.FND_GLOBAL", line 245
    ORA-06512: at "APPS.FND_GLOBAL", line 1426
    ORA-06512: at "APPS.FND_GLOBAL", line 1684
    ORA-06512: at "APPS.FND_GLOBAL", line 2309
    ORA-06512: at "APPS.FND_GLOBAL", line 2447
    ORA-06512: at "APPS.FND_GLOBAL", line 2385
    ORA-06512: at "APPS.ICSOA_UTIL_PKG", line 42
    ORA-06512: at "APPS.ICAR_INT_PKG", line 521
    </P_ERR_MESSAGE>
    The main error here is cannot SET NLS in a distributed transaction.
    This is caused by fnd_global.apps_initialize running SET NLS commands in order to do it’s thing.
    We are looking to use the functionality of global transactions in order to achieve reliable messaging.
    Does anyone have any experience with calling custom PL/SQL from SOA XA connections?
    Robert

    Robert,
    I have the similar use case. I am using a seeded Oracle API to insert data into the tables. I want the user information to be populated in the WHO columns (CREATED_BY, LAST_UPDATED_BY). I have mentioned the jca.apps.username and jca.apps.responsibility in the Invoke activity.
    But unfortunately, the columns are not populated with the data. I am using the Oracle Apps Adapter to call the API.
    Any inputs will be really helpful.
    Thanks,
    Sakthi.

  • How to set global transactions for XA.

    Hello,
    I have configured 9i RAC active/active database into a active/passive.
    The users were not able to connect using XA drivers.
    I have run the xaview.sql script as sys in @O_H/rdbms/admin and granted select privs as below.
    grant select on v$xatrans$ to public;
    grant select on pending_trans$ to public;
    grant select on dba_2pc_pending to public;
    grant select on dba_pending_transactions to public;
    Still users are not able to connect to the databases using XA drivers.
    What is needed more to be set up on the database side?
    Can any one let me know the detailed method to set global transactions(that is what I was told needs to be set up) on the oracle database.
    Thanks
    SKH

    Further to give more info the error users are facing is
    Could not connect to 'oracle.jdbc.xa.client.OracleXADataSource'.

  • 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

  • Lookup-table and query-database do not use global transaction

    Hi,
    following problem:
    DbAdapter inserts data into DB (i.e. an invoice).
    Process takes part in global transaction.
    After the insert there is a transformation which uses query-database and / or lookup-table.
    It seems these XPath / XSLT functions are NOT taking part in the transaction and so we can not access information from the current db transaction.
    I know workarounds like using DbAdapter for every query needed, etc. but this will cost a lot of time to change.
    Is there any way to share transaction in both DbAdapter insert AND lookup-table and query-database?
    Thanks, Best Regards,
    Martin

    One dba contacted me and made this statement:
    Import & export utilities are not independent from characterset. All
    user data in text related datatypes is exported using the character set
    of the source database. If the character sets of the source and target
    databases do not match a single conversion is performed.So far, that does not appear to be correct.
    nls_characterset = AL32UTF8
    nls_nchar_characterset = UTF8
    Running on Windows.
    EXP produces a backup in WE8MSWIN1252.
    I found that if I change the setting of the NLS_LANG registry setting for my oracle home, the exp utility exports to that character set.
    I changed the nls_lang
    from AMERICAN_AMERICA.WE8MSWIN1252
    to AMERICAN_AMERICA.UTF8
    Unfortunately , the export isn't working right, although it did change character sets.
    I get a warning on a possible character set conversion issue from AL32UTF8 to UTF8.
    Plus, I get an EXP_00056 Oracle error 932 encountered
    ORA-00932: inconsistent datatypes: expected BLOB, CLOB, get CHAR.
    EXP-00000: export terminated unsuccessfully.
    The schema I'm exporting with has exactly one procedure in it. Nothing else.
    I guess getting a new error message is progress. :)
    Still can't store multi-lingual characters in data tables.

  • [OSB] Invoking OSB HTTP proxy as a part of a global transaction

    Hi,
    my question is, can a OSB HTTP proxy be executed in context of the global transaction?
    I did two tests. One had the following scenario:
    HTTP OSB proxy invokes JMS OSB proxy that invokes an "Insert to database" business services.
    Both of the proxies were transactional - I have set "Transaction Required" and "Same Transaction For Response" to enabled on both of them. Also, I've set QoS to "Exactly Once" in the Routing Option.
    The OSB JMS proxy's flow was executed as a part of the global transaction. I confirmed this with the following test:
    If I throw an exception in the responce pipeline of the HTTP OSB proxy, the database transaction was rolled back. If I throw an exception in the responce pipeline of the HTTP OSB proxy, but have the "Transaction Required" and "Same Transaction For Response disabled, the database transaction is commited and than the exception is thrown.
    The problem is, If I change the protocol of the second proxy to HTTP, then it doesn't seem to be executed in the context of the global transaction. If I throw an error in the response pipeline of the first OSB proxy(and "Transactions Are Required" and "Same Transaction For Response" are enabled for both proxy, and QoS is set to "Exactly once") the database transaction is not rolled back.
    So, can a OSB HTTP proxy be executed in context of the global transaction?
    Edited by: user13604541 on Dec 5, 2011 2:27 AM

    I have read on OSB doc that HTTP proxies do not support transactions... your tests seem to confirm this.

  • Managed datasources, Global transactions and XA

    I have a question regarding the use of managed datasources and global transactions with oc4j 10.1.3.
    From the documentation at:
    http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14428/servdats.htm#CHDGJECC
    I conclude that managed datasources by default support global transactions.
    I have tested the following scenario:
    A stateless session bean starts a container managed transaction. The bean updates data in two different databases through two different
    managed datasources. The transaction is atomic.
    What surprises me is that this works. I would think that I would need to configure the datasources to make use of XA.
    Can someone explain why this works, wat is the difference between XA transactions and global transactions in this context?

    Further to give more info the error users are facing is
    Could not connect to 'oracle.jdbc.xa.client.OracleXADataSource'.

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

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

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

Maybe you are looking for

  • In R12 unable to transfer payroll data to gl

    My company has implemented xx Legislation with Global HRMS Internationl,Oracle R12. I have run all pre-payroll and Quick-pay for 3 employees also i have run Post payroll processes for all the 3 emps, i.e. Pre-Payment Cheque Writer Costing Cost Break

  • Adjusting for Backlighting

    I'm combining footage from a party that was shot by two people using two different cameras. One individual did a terrible job of taking into consideration indoor backlighting. For instance one relatively long sequence has the quests of honor standing

  • Installing 10G R2 on FC 4 x86_64:     libcore10.a(lcd.o)

    With all required packages in place, I am getting the following error, anybody knows how to overcome? INFO: collect2: ld terminated with signal 9 [Killed] /opt/oracle/product/10.2.0/lib//libcore10.a(lcd.o)(.text+0xb71): In function `lcdprm': lcd.c: w

  • Javascript window.open call results in new window and not new tab.

    I'm creating an extension and using JS to open a new window. I've tried a variety of forms including something like: window.open("https://www.FOO.com" + dest,,"_newtab") and just window.open(url).. The option is set (tools/options) to open in a new t

  • CS6 issue (Photoshop extension)

    Hi, I've a customer of an extension of mine who reports Adobe Extension Manager CS6 (OSX Lion, AEM updated to 6.0.2) not installing because Photoshop with version ranging from 13.0 to 13.9 is required - I won't report the literal text because it's Du