Global Transaction Timeout

Hi All-
Lets say we have global transaction timeout set as 30 sec (transaction-manager.xml) and one of my database adapter is taking 10 mins to complete, is there any problem in that? DO we have to set any property on database adpater?
The database adapter invoke, Is it a asynch or sync process?
Regards,
Sreejit

Hi Shanmu,
I am using release 10.1.3.3.0 and we are calling the database adapter to call the standard ERP api to import purchase order and it takes MAX time 10-15 minutes to complete the process.
Major step in our bpel process:
1. first activity is to receive the file polling, MAX 10 seconds.
2. calls database adapter for logging purpose, creates one row in table, MAX time 10 seconds.
3. Calls database adapter to validate and insert the 500 records, MAX time 10 seconds.
4. Calls OA adapter to call the Oracle EBS R12 standard API to create Purchase order, MAX time 10-15 minutes.
5. Calls database adapter to call the post update process, MAX time 5 minutes.
6. deletes the file fileadapter, MAX time 2 sec
7. Calls database adapter to update one row for logging purpose, MAX time 2 seconds.
Current transaction timeout is set as 30 second in SOA_Oracle_Home\j2ee\home\config\transaction-manager.xml and 60 or somewhere 120 in SOA_Oracle_Home\j2ee\home\application-deployments\orabpel\ejb_ob_engine\orion-ejb-jar.xml
Do you think that we need to increase the time out more than the time taking by the adapter No.4 and No. 5?
And thanks for the information between 10g and 11g.
Regards,
Sreejit

Similar Messages

  • How to catch global transaction timeout event

    Hi all,
    I need to find a way to catch global transaction timeout events. By default, there are only two transaction related events can be caught:
    .SysTransactionHeuristicAbort
    .SysTransactionHeuristicCommit
    Is there a way to add transaction timeout to the list. Thanks in advance.

    Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.

  • Transaction timeout in BPEL for webservice invocation

    [ERROR] [] [oracle.soa.bpel.engine.dispatch] [tid: orabpel.invoke.pool-4.thread-3] [userId: <anonymous>] [ecid: e8538d226bae7c2a:1914e8c0:148c67a5f26:-8000-00000000000031a2,1:27459] [APP: soa-infra] failed to handle message[[
    weblogic.transaction.internal.TimedOutException: Transaction timed out after 299 seconds
    BEA1-166C02569896A59BE380
                    at weblogic.transaction.internal.ServerTransactionImpl.wakeUp(ServerTransactionImpl.java:1788)
                    at weblogic.transaction.internal.ServerTransactionManagerImpl.processTimedOutTransactions(ServerTransactionManagerImpl.java:1676)
                    at weblogic.transaction.internal.TransactionManagerImpl.wakeUp(TransactionManagerImpl.java:1988)
                    at weblogic.transaction.internal.ServerTransactionManagerImpl.wakeUp(ServerTransactionManagerImpl.java:1586)
                    at weblogic.transaction.internal.WLSTimer.timerExpired(WLSTimer.java:35)
                    at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
                    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
                    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
                    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Message handle error.
    error while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the reported exception is: Transaction Rolledback.: weblogic.transaction.internal.TimedOutException: Transaction timed out after 299 seconds
    BEA1-166C02569896A59BE380
    This is happening when invoking a webservices from BPEL and if it takes more than 5 minutes we are getting above Error
    we have tried out SyncMaxWaitTime Property in BPEL configurations through SOA administration menu of EM. Also tried by increasing JTA timeout seconds in Service--JTA @ weblogic console.
    Any suggestion or pointers..

    Hi,
    Could help set the following...
    The timeouts should be configured based on the below condition
    SyncMaxWaitTime < BPEL EJB's transaction timeout < Global Transaction Timeout
    The values could be: SyncMaxWaitTime (3600) ; BPEL EJB's transaction timeout (3600); Global Transaction Timeout JTA (7200)
    Setting the SyncMaxWaitTime :
    This is the maximum time a synchronous BPEL process waits before it times out to get the response from another BPEL or a web service
    Login to EM console
    Expand SOA and right click on "soa-infra"
    From context menu, select SOA Administration –> BPEL properties
    Click on "More BPEL Configuration properties"
    Enter the appropriate value for the SyncMaxWaitTime
    Setting the global transaction timeout at Weblogic Domain Level:
    This property controls the transaction timeout seconds for active transactions. If the transaction is still in the "active" state after this time, it is automatically rolled back. 
    Log into Oracle Weblogic Administration Console.
    Click Services -> JTA.
    Change the value of Timeout Seconds to the required value (the default is 30)
    Click Save.
    Restart Oracle Weblogic Server.
    Overriding the transaction timeout setting for BPEL EJB's:
    The timeout properties for the EJB's control the particular timeout setting for the SOA application, overriding the global setting specified by the JTA timeout 
    Log into Oracle Weblogic Administration Console.
    Click Deployments.
    Expand soa-infra -> EJBs.
    Click on the configuration tab for the timeout setting for each of EJB’s listed below and the change the time out values as required.
    Following EJBs need to be updated:
    BPELActivityManagerBean  
    BPELDeliveryBean
    BPELDispatcherBean
    BPELEngineBean
    BPELFinderBean
    BPELInstanceManagerBean
    BPELProcessManagerBean
    BPELSensorValuesBean
    BPELServerManagerBean
    Click Save.
    Restart Oracle Weblogic Server.
    I hope you find it useful!
    hugs!

  • Transaction timeout when two system communicate by web service.

    Currently, our application run under WLS 10, and exchange data with another system build on WLS 10 also by web service.
              These two system both set global transaction timeout through Console: Server-->Configuration-->JTA-->Timeout Seconds, set number is 1800s.
              Long time operation within one system is ok, never meet tracation timeout exception. But, when one system call another system via web service, always meet below exception(same operation run under wls 8.1 is ok):
              15-02-2008@17:35:56 ERROR leave : [[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] [CTLeaveWebService@PSA] [B2E_CTLeave.Get_Leave_Info] Exception Occured, Failure creating new instance of RowMapper, org.apache.beehive.controls.api.ControlException: RowToObjectMapper: SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 30 seconds
              BEA1-067F39AED8C5E04484B3
              at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1419)
              at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1331)
              at weblogic.jdbc.wrapper.JTAConnection.getXAConn(JTAConnection.java:189)
              at weblogic.jdbc.wrapper.JTAConnection.checkConnection(JTAConnection.java:64)
              at weblogic.jdbc.wrapper.ResultSetMetaData.preInvocationHandler(ResultSetMetaData.java:37)
              at weblogic.jdbc.wrapper.ResultSetMetaData_oracle_jdbc_driver_OracleResultSetMetaData.getColumnCount(Unknown Source)
              at org.apache.beehive.controls.system.jdbc.RowToObjectMapper.<init>(RowToObjectMapper.java:63)
              at sun.reflect.GeneratedConstructorAccessor136.newInstance(Unknown Source)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
              at org.apache.beehive.controls.system.jdbc.RowMapperFactory.getMapper(RowMapperFactory.java:160)
              at org.apache.beehive.controls.system.jdbc.RowMapperFactory.getRowMapper(RowMapperFactory.java:85)
              at org.apache.beehive.controls.system.jdbc.DefaultObjectResultSetMapper.arrayFromResultSet(DefaultObjectResultSetMapper.java:93)
              at org.apache.beehive.controls.system.jdbc.DefaultObjectResultSetMapper.mapToResultType(DefaultObjectResultSetMapper.java:61)
              at org.apache.beehive.controls.system.jdbc.JdbcControlImpl.execPreparedStatement(JdbcControlImpl.java:370)
              at org.apache.beehive.controls.system.jdbc.JdbcControlImpl.invoke(JdbcControlImpl.java:228)
              at com.psa.citos.rms.leave.services.resouces.StaffLeaveDBBean.getLeaveDetailsByLvEmpIdStDtEndDtStatusInArray(StaffLeaveDBBean.java:198)
              at com.psa.citos.rms.leave.services.bizlogic.StaffLeaveServiceImpl.getLeaveDetailsByLvEmpIdStDtEndDt(StaffLeaveServiceImpl.java:276)
              at com.psa.citos.rms.leave.services.bizlogic.StaffLeaveServiceBean.getLeaveDetailsByLvEmpIdStDtEndDt(StaffLeaveServiceBean.java:1112)
              at com.psa.citos.rms.leave.services.bizlogic.LeaveServiceImpl.getLeaveDetailsByLvEmpIdStDtEndDt(LeaveServiceImpl.java:337)
              at com.psa.citos.rms.leave.services.bizlogic.LeaveServiceBean.getLeaveDetailsByLvEmpIdStDtEndDt(LeaveServiceBean.java:596)
              at com.psa.citos.rms.leave.facades.WebServiceFacadesImpl.getStaffLeaveInfoForRoster(WebServiceFacadesImpl.java:254)
              at com.psa.citos.rms.leave.facades.WebServiceFacadesBean.getStaffLeaveInfoForRoster(WebServiceFacadesBean.java:250)
              at com.psa.citos.rms.leave.webservice.CTLeaveWebService.getLeaveInfo(Unknown Source)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at weblogic.wsee.component.pojo.JavaClassComponent.invoke(JavaClassComponent.java:99)
              at weblogic.wsee.ws.dispatch.server.ComponentHandler.handleRequest(ComponentHandler.java:64)
              at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:123)
              at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:85)
              at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
              at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
              at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
              at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:257)
              at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:156)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
              at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
              at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
              at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
              at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3392)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              at weblogic.security.service.SecurityManager.runAs(Unknown Source)
              at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
              at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
              at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
              at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
              [java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 30 seconds
              Data Sourse config:
              URL: jdbc:oracle:thin:@xxxxxx:1521:xxxxxx
              Driver Class Name: oracle.jdbc.xa.client.OracleXADataSource
              Can help to advise what this exception cause and how to resolve?
              thanks and best regards.
              Edited by rendlut at 02/17/2008 7:29 PM
              Edited by rendlut at 02/17/2008 7:38 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    r c wrote:
              > Currently, our application run under WLS 10, and exchange data with another system build on WLS 10 also by web service.
              > These two system both set global transaction timeout through Console: Server-->Configuration-->JTA-->Timeout Seconds, set number is 1800s.
              >
              > Long time operation within one system is ok, never meet tracation timeout exception. But, when one system call another system via web service, always meet below exception(same operation run under wls 8.1 is ok):
              >
              > 15-02-2008@17:35:56 ERROR leave : [[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] [CTLeaveWebService@PSA] [B2E_CTLeave.Get_Leave_Info] Exception Occured, Failure creating new instance of RowMapper, org.apache.beehive.controls.api.ControlException: RowToObjectMapper: SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 30 seconds
              > BEA1-067F39AED8C5E04484B3
              > at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1419)
              > at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1331)
              > at weblogic.jdbc.wrapper.JTAConnection.getXAConn(JTAConnection.java:189)
              > at weblogic.jdbc.wrapper.JTAConnection.checkConnection(JTAConnection.java:64)
              > at weblogic.jdbc.wrapper.ResultSetMetaData.preInvocationHandler(ResultSetMetaData.java:37)
              > at weblogic.jdbc.wrapper.ResultSetMetaData_oracle_jdbc_driver_OracleResultSetMetaData.getColumnCount(Unknown Source)
              > at org.apache.beehive.controls.system.jdbc.RowToObjectMapper.<init>(RowToObjectMapper.java:63)
              > at sun.reflect.GeneratedConstructorAccessor136.newInstance(Unknown Source)
              > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              > at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
              > at org.apache.beehive.controls.system.jdbc.RowMapperFactory.getMapper(RowMapperFactory.java:160)
              > at org.apache.beehive.controls.system.jdbc.RowMapperFactory.getRowMapper(RowMapperFactory.java:85)
              > at org.apache.beehive.controls.system.jdbc.DefaultObjectResultSetMapper.arrayFromResultSet(DefaultObjectResultSetMapper.java:93)
              > at org.apache.beehive.controls.system.jdbc.DefaultObjectResultSetMapper.mapToResultType(DefaultObjectResultSetMapper.java:61)
              > at org.apache.beehive.controls.system.jdbc.JdbcControlImpl.execPreparedStatement(JdbcControlImpl.java:370)
              > at org.apache.beehive.controls.system.jdbc.JdbcControlImpl.invoke(JdbcControlImpl.java:228)
              > at com.psa.citos.rms.leave.services.resouces.StaffLeaveDBBean.getLeaveDetailsByLvEmpIdStDtEndDtStatusInArray(StaffLeaveDBBean.java:198)
              > at com.psa.citos.rms.leave.services.bizlogic.StaffLeaveServiceImpl.getLeaveDetailsByLvEmpIdStDtEndDt(StaffLeaveServiceImpl.java:276)
              > at com.psa.citos.rms.leave.services.bizlogic.StaffLeaveServiceBean.getLeaveDetailsByLvEmpIdStDtEndDt(StaffLeaveServiceBean.java:1112)
              > at com.psa.citos.rms.leave.services.bizlogic.LeaveServiceImpl.getLeaveDetailsByLvEmpIdStDtEndDt(LeaveServiceImpl.java:337)
              > at com.psa.citos.rms.leave.services.bizlogic.LeaveServiceBean.getLeaveDetailsByLvEmpIdStDtEndDt(LeaveServiceBean.java:596)
              > at com.psa.citos.rms.leave.facades.WebServiceFacadesImpl.getStaffLeaveInfoForRoster(WebServiceFacadesImpl.java:254)
              > at com.psa.citos.rms.leave.facades.WebServiceFacadesBean.getStaffLeaveInfoForRoster(WebServiceFacadesBean.java:250)
              > at com.psa.citos.rms.leave.webservice.CTLeaveWebService.getLeaveInfo(Unknown Source)
              > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              > at java.lang.reflect.Method.invoke(Method.java:585)
              > at weblogic.wsee.component.pojo.JavaClassComponent.invoke(JavaClassComponent.java:99)
              > at weblogic.wsee.ws.dispatch.server.ComponentHandler.handleRequest(ComponentHandler.java:64)
              > at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:123)
              > at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:85)
              > at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
              > at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
              > at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
              > at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:257)
              > at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:156)
              > at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
              > at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
              > at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
              > at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
              > at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
              > at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3392)
              > at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              > at weblogic.security.service.SecurityManager.runAs(Unknown Source)
              > at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
              > at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
              > at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
              > at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
              > at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
              > [java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 30 seconds
              >
              > Data Sourse config:
              > URL: jdbc:oracle:thin:@xxxxxx:1521:xxxxxx
              > Driver Class Name: oracle.jdbc.xa.client.OracleXADataSource
              >
              >
              > Can help to advise what this exception cause and how to resolve?
              >
              > thanks and best regards.
              >
              > --
              > Edited by rendlut at 02/17/2008 7:29 PM
              >
              > --
              > Edited by rendlut at 02/17/2008 7:38 PM
              In the console, you can set the JTA timeout to
              something more appropriate for your needs than
              the default 30 seconds.
              Joe                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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

  • BMT and transaction timeout

    Hello,
    Does anybody knows what the behavior should be for a Session EJB with BMT (using JTA) after a transaction timeout? Does the container performs a database rollback for you immediately after the time-out event? I’ve noticed that JBoss does not perform a rollback but Web does. What do the J2EE specs say what should happen?
    We are experiencing database locks in an Oracle database caused by ‘hanging’ JTA-transactions which aren’t removed after a timeout. An application server restart will remove them. We are trying to find the cause, there fore I’am posting this message.
    Regards,
    Marteyn Heijlaerts

              "Laurel Neustadter" <[email protected]> wrote:
              >
              >Hi:
              >
              >The WLS 6.0 documentation states that for a CMT bean, one specifies the
              >transaction
              >timeout in weblogic-ejb-jar.xml, and for a BMT bean, one specifies the
              >transaction
              >timeout via UserTransaction.setTransactionTimeout().
              >
              >You also set a transaction timeout attribute at the domain level. How
              >does the
              >domain level attribute work into all of this? How is it used?
              >
              >For example, if a transaction timeout value is not specified at the bean
              >level,
              >will the domain level value be used?
              >
              >Laurel
              Yes, the domain level timeout is the default.
              It is overridden by any setting at the EJB level. This in turn
              can be overridden by the client calling the EJB, if the client
              starts a transaction and uses
              transactionManager.setTransactionTimeout()
              

  • Problem with transacted JMS connection factory and transaction timeouts

              We encountered an interesting problem using transacted JMS connection factories.
              An EJB starts a container managed transaction and tries to validate a credit card
              before creating some information to a database for the user, in case of success
              an SMS is sent to the user via the transacted JMS queue. If the credit card authentications
              duration is about the same as the transactions timeout (in this case the default
              30 seconds) sometimes the database inserts is committed but the JMS insert is
              rollbacked. How can this be?
              If the authorization duration is much longer than 30 seconds everything works
              fine (both database and JMS inserts rollbacked), the same is true if a rollback
              is insured by calling EJBContext.setRollbackOnly(). The problem thus occurs only
              if the duration is approximately the same as the transaction timeout, it appears
              that the database insert is not timeouted but the JMS insert is. How can this
              be if they are both participating in the same transaction.
              The JMSConnectionFactory used is a Connection factory with XA-enabled. The result
              is the same also with the default "javax.jms.QueueConnectionFactory" and if we
              configure our own factory with user transactions enabled.
              Any help appreciated!
              

    Tomas Granö wrote:
              > We encountered an interesting problem using transacted JMS connection factories.
              > An EJB starts a container managed transaction and tries to validate a credit card
              > before creating some information to a database for the user, in case of success
              > an SMS is sent to the user via the transacted JMS queue. If the credit card authentications
              > duration is about the same as the transactions timeout (in this case the default
              > 30 seconds) sometimes the database inserts is committed but the JMS insert is
              > rollbacked. How can this be?
              It should not be.
              >
              > If the authorization duration is much longer than 30 seconds everything works
              > fine (both database and JMS inserts rollbacked), the same is true if a rollback
              > is insured by calling EJBContext.setRollbackOnly(). The problem thus occurs only
              > if the duration is approximately the same as the transaction timeout, it appears
              > that the database insert is not timeouted but the JMS insert is. How can this
              > be if they are both participating in the same transaction.
              >
              > The JMSConnectionFactory used is a Connection factory with XA-enabled. The result
              > is the same also with the default "javax.jms.QueueConnectionFactory" and if we
              > configure our own factory with user transactions enabled.
              >
              > Any help appreciated!
              Make sure that your session is not "transacted". In other words,
              the first parameter to createSession() must be false. There is an
              unfortunate name re-use here. If a session is "transacted", it
              maintains an independent "inner transaction" independent of the
              outer transaction. From the above description, it seems unlikely
              that your application has this wrong, as you say that
              "setRollbackOnly" works - but please check anyway.
              Make sure that you are using a true XA capable driver and database
              (XA "emulation" may not suffice)
              Beyond the above, I do not see what can be going wrong. You
              may want to try posting to the transactions and jdbc newsgroups. Note
              that JMS is appears to be exhibiting the correct behavior, but the
              JDBC operation is not. The JDBC operation appears to have
              its timeout independent of the transaction monitor's timeout.
              Tom
              

  • Transaction timeouts of 242 seconds

    Hi All,
    I am getting transaction timeouts of 242 seconds. Can somebody help me where
    is this timeout value configured and how change it?
    Here We are Using Weblogic 8.1
    Stateless Session Bean, DAO, Servlets and JSPs
    The log file says as
    <DEBUG>SQLException: The transaction is no longer active - status: 'Marked rollback.
    [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out
    after 242 secon
    ds
    Name=[EJB com.hartfordlife.gbd.pvev.ejb.participantadmin.ParticipantAdministrationEJB.getPADownloadCaseCoverage(java.util.ArrayList,java.lang.String,java.lang.String)],Xid=BEA1-003
    0E44EFCA87F28EDB9(14529255),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
    since begin=242,seconds left=60,activeThread=Thread[ExecuteThread: '9' for queue:
    'weblo
    gic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTS
    XAResourceImpl]=(state=started,assigned=none),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@10c624a),SCInfo[mydomain+myserver]=(state=active),properties=({weblogic.transaction.name=[
    EJB com.hartfordlife.gbd.pvev.ejb.participantadmin.ParticipantAdministrationEJB.getPADownloadCaseCoverage(java.util.ArrayList,java.lang.String,java.lang.String)],
    weblogic.jdbc=t3:
    //157.209.165.64:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+157.209.165.64:7001+mydomain+t3+,
    XAResources={},NonXAResources={})],C
    oordinatorURL=myserver+157.209.165.64:7001+mydomain+t3+)]'. No further JDBC access
    is allowed within this transaction.
    <DEBUG>SQLErrorCode: 0
    <DEBUG>SQLState: null
    java.sql.SQLException: The transaction is no longer active - status: 'Marked rollback.
    [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out
    after 242 seconds
    Thanks in Advance
    Sai
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Unfortunately, it seems to work different in JBoss7. I created a very simple app and it waits until end of query execution instead of interrupting it.
    I'm porting application from weblogic to JBoss7 and it is critical for me to achieve identical behavior.

  • Transaction timeouts behaviour - explanation needed

    Hello all,
    I'm a newbie to Weblogic and would like to understand how transaction timeouts work in Weblogic. I have a EJB2 application running under Weblogic 10.3 and using Oracle 11g database via thin jdbc driver.
    I noticed that if I set trans-timeout-seconds in deployment descriptor it terminates sql queries if they overflow the limit. Say I have timeout set to 10 seconds, it will stop executing sql query after that time and immediately return exception to caller of the current EJB method. This is just perfect!
    What I want is to understand how that is done, does it proxy driver somehow? Will it work with other databases, Postgresql for example?
    Can I port same behavior to other app servers, JBoss for example.
    Thank you in advance.

    Unfortunately, it seems to work different in JBoss7. I created a very simple app and it waits until end of query execution instead of interrupting it.
    I'm porting application from weblogic to JBoss7 and it is critical for me to achieve identical behavior.

  • Transaction Timeout (BPEL v10.1.2.0.0, WebLogic 8.1 sp4)

    We are attempting to process a transform on a medium sized xml doc (~4.5 MB). For the test case we are simply reading the the doc using the FileAdapter, performing a transformation, and then writing the result to a file using the FileAdapter once again. The flow works fine for smallish files (under ~4MB), however, when dropping a file greater than that size the flow fails once finished while writing entries to the BPEL audit log with a TransactionTimedOutException (see exception below).
    I understand what is happening and why (it certainly takes longer than 2 mins to process the file). I have also done quite a bit of digging around for references to this issue and found several posts regarding bumping the transaction timeout value when running the OC4J container. My problem is that we are not running the OC4J container. I know how to manage the default transaction timeout value for WebLogic but it appears that the BPEL application doesn't seem to be honoring the default transaction timeout on the WL Server. I have come to this conclusion for two reasons: first, the default transaction timeout on the WL Server (before modification) is 30 seconds, not the 120 seconds that this transaction is timing out on. second, changing the transaction timeout value on the WebLogic server has no impact on this issue what so ever. I can set the transaction timeout to any value I like, the process ALWAYS times out after 120 seconds.
    Is there another setting on the BPEL server that I may have missed that is overriding the default timeout, i.e. is it possible that when the BPEL server process is starting the transaction it is setting the timeout on the TransactionManager in code prior to starting the transaction?
    Any pointers are greatly appreciated.
    ------------- START STACK TRACE ------------------
    <2007-03-15 13:50:24,625> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "cube delivery": Cannot insert audit trail.
    The process domain was unable to insert the current log entries for the instance "10601" to the audit trail table. The exception reported is: The transaction is no longer active - status: 'Rolled back. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 120 seconds
    Name=[EJB com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(java.lang.String,com.oracle.bpel.client.auth.DomainAuth)],Xid=BEA1-0021B65431A170F9CFEF(31469464),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=120,seconds left=60,activeThread=Thread[ExecuteThread: '9' for queue: 'default',5,Thread Group for Queue: 'default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=ended,assigned=none),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@154d033,re-Registered = false),SCInfo[f58_integration+orabpelServer]=(state=active),properties=({weblogic.transaction.name=[EJB com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(java.lang.String,com.oracle.bpel.client.auth.DomainAuth)], weblogic.jdbc=t3://127.0.0.1:9700}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=orabpelServer+127.0.0.1:9700+f58_integration+t3+, XAResources={},NonXAResources={})],CoordinatorURL=orabpelServer+127.0.0.1:9700+f58_integration+t3+)]'. No further JDBC access is allowed within this transaction.
    Please check that the machine hosting the datasource is physically connected to the network. Otherwise, check that the datasource connection parameters (user/password) is currently valid.
    sql statement: INSERT INTO audit_trail( cikey, domain_ref, count_id, block, block_csize, block_usize, log ) VALUES( ?, ?, ?, ?, ?, ?, ? )
    <2007-03-15 13:50:24,643> <ERROR> <default.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: Transaction Rolledback.: weblogic.transaction.internal.TimedOutException: Transaction timed out after 120 seconds
    Name=[EJB com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(java.lang.String,com.oracle.bpel.client.auth.DomainAuth)],Xid=BEA1-0021B65431A170F9CFEF(31469464),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=120,seconds left=60,activeThread=Thread[ExecuteThread: '9' for queue: 'default',5,Thread Group for Queue: 'default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=ended,assigned=none),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@154d033,re-Registered = false),SCInfo[f58_integration+orabpelServer]=(state=active),properties=({weblogic.transaction.name=[EJB com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(java.lang.String,com.oracle.bpel.client.auth.DomainAuth)], weblogic.jdbc=t3://127.0.0.1:9700}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=orabpelServer+127.0.0.1:9700+f58_integration+t3+, XAResources={},NonXAResources={})],CoordinatorURL=orabpelServer+127.0.0.1:9700+f58_integration+t3+)
    at weblogic.transaction.internal.ServerTransactionImpl.wakeUp(ServerTransactionImpl.java:1614)
    at weblogic.transaction.internal.ServerTransactionManagerImpl.processTimedOutTransactions(ServerTransactionManagerImpl.java:1117)
    at weblogic.transaction.internal.TransactionManagerImpl.wakeUp(TransactionManagerImpl.java:1881)
    at weblogic.transaction.internal.ServerTransactionManagerImpl.wakeUp(ServerTransactionManagerImpl.java:1034)
    at weblogic.transaction.internal.WLSTimer.trigger(WLSTimer.java:31)
    at weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.java:243)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:229)
    at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:223)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    ; nested exception is: weblogic.transaction.internal.TimedOutException: Transaction timed out after 120 seconds
    Name=[EJB com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(java.lang.String,com.oracle.bpel.client.auth.DomainAuth)],Xid=BEA1-0021B65431A170F9CFEF(31469464),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=120,seconds left=60,activeThread=Thread[ExecuteThread: '9' for queue: 'default',5,Thread Group for Queue: 'default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=ended,assigned=none),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@154d033,re-Registered = false),SCInfo[f58_integration+orabpelServer]=(state=active),properties=({weblogic.transaction.name=[EJB com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(java.lang.String,com.oracle.bpel.client.auth.DomainAuth)], weblogic.jdbc=t3://127.0.0.1:9700}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=orabpelServer+127.0.0.1:9700+f58_integration+t3+, XAResources={},NonXAResources={})],CoordinatorURL=orabpelServer+127.0.0.1:9700+f58_integration+t3+)
    ------------- END STACK TRACE ------------------

    Hi
    i am facing a similar problem..did u find the solution for this problem?
    Please pass the solution/workaround u performed for solving this...
    Thanks & Regards
    Subramanian

  • 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

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

  • 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

  • How 2 avoid a Non-XA resource from listing in Global Transaction?

    <pre>
    Hey,
    I am using container managed transaction in a stateless session bean. We are using two datasources, one xa and non-xa. I am using these two datasources in a single transaction and i am getting an exception that both can't participate in the same transaction.
    Is there a way that I don't want to enlist my non-xa resource with transaction manager?
    I have come across the following approach.
    I have seen Simulate Two Phase for Non XA, but you are saying to be careful with this option as for Example, Non-XA and XA says OK during prepare phase(phase I) and then XA resources decides to roll back in phase II, Non-XA can't revert as it is already commited,
    But I have also come across LAST PARTICIPANT NON-XA along with mutliple XAs option in websphere, like this if I update my Non-XAs in the end, will WEBLOGIC takes care of all XAs and Non-XAs as single atomic operation or it does partially ???
    Appreciate your help.
    Thanks,
    Rao Kotha.
    </pre>

    You can make the non-XA driver based data-source 'not to honor the global
    transaction'. Which version of weblogic are you using?
    By default, when you create a data source, it is a TxDataSource (it honors
    global tx). In the console, there is a check box to disable the default
    behavior which will make the data source not to participate in transactions.
    --Sathish
    <Janardhana Rao Kotha> wrote in message news:[email protected]..
    <pre>
    Hey,
    I am using container managed transaction in a stateless session bean. We
    are using two datasources, one xa and non-xa. I am using these two
    datasources in a single transaction and i am getting an exception that
    both can't participate in the same transaction.
    Is there a way that I don't want to enlist my non-xa resource with
    transaction manager?
    I have come across the following approach.
    I have seen Simulate Two Phase for Non XA, but you are saying to be
    careful with this option as for Example, Non-XA and XA says OK during
    prepare phase(phase I) and then XA resources decides to roll back in phase
    II, Non-XA can't revert as it is already commited,
    But I have also come across LAST PARTICIPANT NON-XA along with mutliple
    XAs option in websphere, like this if I update my Non-XAs in the end, will
    WEBLOGIC takes care of all XAs and Non-XAs as single atomic operation or
    it does partially ???
    Appreciate your help.
    Thanks,
    Rao Kotha.
    </pre>

Maybe you are looking for