Transaction Context Propagation

Can transaction context be propagated from one WebLogic Server to another? If yes, what is then the relationship between the two Transaction Managers in each server?
          

Zhenxin,
          Transaction can be propagated between multiple instances of the server.
          In releases 5.1 and below, all databse access in this case was delegated to 1 jdbc connection in 1 pool on 1 server, and the database transaction manager was used.
          In 6.0 and above, the transaction is co-ordinated by the TM in one instance of the server, which calls on the remote instances during the pre-commit and commit phases.
          I believe that currently the 1st server to be invoked in the transaction is the one who gets the commit responsibility, but this is an implementation detail that may
          change in future.
          I hope that helps.
          Regards,
          Peter.
          Got a Question? Ask BEA at http://askbea.bea.com
          The views expressed in this posting are solely those of the author, and BEA
          Systems, Inc. does not endorse any of these views.
          BEA Systems, Inc. is not responsible for the accuracy or completeness of the
          information provided
          and assumes no duty to correct, expand upon, delete or update any of the
          information contained in this posting.
          Zhenxin Wang wrote:
          > Can transaction context be propagated from one WebLogic Server to another? If yes, what is then the relationship between the two Transaction Managers in each server?
          

Similar Messages

  • Transactional Context Propagation

    Hi,
              Suppose that I a statefull session bean that uses a helper class to delegate
              its business methods. If the transactions are demarcated from the container
              will the transactional context of the caller (of the helper class) method be
              propagated to the helper class?
              Thank you in advance
              

              Hi,
              Is this true also for BMT? I have a problem where the UserTransaction
              object seems not to propagate from one BMT bean to another BMT bean.
              At least the status of the transaction
              (as retrieved by this.sessionContext.getUserTransaction().getStatus())
              is Status.STATUS_NO_TRANSACTION when checked in the method of th called bean.
              regards - Johan
              "Cameron Purdy" <[email protected]> wrote:
              >The transaction is bound to the thread, so yes, under most ordinary
              >conditions, the context would also apply to (or more likely through)
              >methods
              >of other classes called. Example: EJB A calls helper class method HC.foo()
              >calls HC.foo2() calls EJB B. If EJB A were in a transaction, EJB B would
              >be
              >in the same.
              >
              >Peace,
              >
              >--
              >Cameron Purdy
              >Tangosol, Inc.
              >http://www.tangosol.com
              >Tangosol Server: Enabling enterprise application customization
              >
              >
              >"Routis Haralampos" <[email protected]> wrote in message
              >news:[email protected]...
              >> Hi,
              >> Suppose that I a statefull session bean that uses a helper class to
              >delegate
              >> its business methods. If the transactions are demarcated from the
              >container
              >> will the transactional context of the caller (of the helper class)
              >method
              >be
              >> propagated to the helper class?
              >> Thank you in advance
              >>
              >>
              >
              >
              

  • Send message in a non-transactional context

    I've coded a simple Log4j appender to send error messages to a queue (JMSAppender provided by Log4J is not good for me because it use a publish/subscrive model and use topics instead of queues); the appender has to work in a non transactional context, so the appender has to send always the message to queue although the global transaction rollbacks; I've create queue session settings transacted parameter to false and acknowledgeMode to AUTO_ACKNOWLEDGE , but message is not delivered to queue if the global transaction, started by an EJB Stateless Session Bean, rollbacks; in my environment (IBM WebSphere and IBM MQ), queue connection factory is configured no-XA resource.
    Any suggestions?
    Below the source code.
    Thanks in advance
    context = new InitialContext();
    queueFactory = (QueueConnectionFactory) context.lookup(getQueueConnectionFactoryBindingName());
    queueConnection = queueFactory.createQueueConnection();
    queueSession = queueConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
    queue = (Queue) context.lookup(getQueueBindingName());
    queueSender = queueSession.createSender(queue);
    queueConnection.start();Rob

    I've coded a simple Log4j appender to send error messages to a queue (JMSAppender provided by Log4J is not good for me because it use a publish/subscrive model and use topics instead of queues); the appender has to work in a non transactional context, so the appender has to send always the message to queue although the global transaction rollbacks; I've create queue session settings transacted parameter to false and acknowledgeMode to AUTO_ACKNOWLEDGE , but message is not delivered to queue if the global transaction, started by an EJB Stateless Session Bean, rollbacks; in my environment (IBM WebSphere and IBM MQ), queue connection factory is configured no-XA resource.
    Any suggestions?
    Below the source code.
    Thanks in advance
    context = new InitialContext();
    queueFactory = (QueueConnectionFactory) context.lookup(getQueueConnectionFactoryBindingName());
    queueConnection = queueFactory.createQueueConnection();
    queueSession = queueConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
    queue = (Queue) context.lookup(getQueueBindingName());
    queueSender = queueSession.createSender(queue);
    queueConnection.start();Rob

  • Cannot drop the table because it does not exist in the system catalog. Transaction context in use by another session

    Hi Every one,
    An error has occurred during report processing. (rsProcessingAborted)
    Get Online Help
    Query execution failed for data set 'NonFinTran'. (rsErrorExecutingCommand)
    Get Online Help
    Cannot drop the table '#NonFinTran', because it does not exist in the system catalog. Cannot drop the table '#MultipleNonFinTran',
    because it does not exist in the system catalog. Transaction context in use by another session.
    NOTE: NonFinTran &
    MultipleNonFinTran are
    the Temp table in my storedPoc.
    Please any help me to solve this issue. 
    Thanks & Regards,
    Anil Kumar
    Anil Kumar

    Hi Harsh,
     Below is my Stored Proc
    SELECT @ServerName=datasource from master.dbo.sysservers WHERE catalog='Voyager'    
     SELECT @ServerName3=datasource from master.dbo.sysservers WHERE catalog='AuditLog'    
     SELECT @ServerName2=datasource from master.dbo.sysservers WHERE catalog='Portal'    
     IF @ServerName IS NOT NULL SET @ServerName='[' + @ServerName + '].' ELSE SET @ServerName=''    
     IF @ServerName3 IS NOT NULL SET @ServerName3='[' + @ServerName3 + '].' ELSE SET @ServerName3=''    
     IF @ServerName2 IS NOT NULL SET @ServerName2='[' + @ServerName2 + '].' ELSE SET @ServerName2=''    
     IF Exists(Select * From tempdb.dbo.SysObjects Where Name Like '#NonFinTran%')     
      DROP TABLE #NonFinTran    
     IF Exists(Select * From tempdb.dbo.SysObjects Where Name Like '#MultipleNonFinTran%')     
      DROP TABLE #MultipleNonFinTran    
     CREATE TABLE #NonFinTran (FirstName VARCHAR(40), TaxId VARCHAR(40), TrxID VARCHAR(40), Status VARCHAR(255), Field1 VARCHAR(255), Field2 VARCHAR(255),    
       Field3 VARCHAR(255), Field4 VARCHAR(255), Field5 VARCHAR(255), Field6 VARCHAR(255), DateTime DATETIME,     
       BranchID CHAR(3), BankID CHAR(1), FromAccountID VARCHAR(255), FromAccountType VARCHAR(255))    
     CREATE TABLE #MultipleNonFinTran (FirstName VARCHAR(40), TaxId VARCHAR(40), TrxID VARCHAR(40), Status VARCHAR(255), Field1 VARCHAR(255), Field2 VARCHAR(255),    
       Field3 VARCHAR(255), Field4 VARCHAR(255), Field5 VARCHAR(255), Field6 VARCHAR(255), DateTime DATETIME,     
       BranchID CHAR(3), BankID CHAR(1), FromAccountID VARCHAR(255), FromAccountType VARCHAR(255))     
    INSERT #NonFinTran    
     EXEC('SELECT FirstName, TaxID,     
      TrxID, Status, TrxField1, TrxField2, TrxField3, TrxField4, TrxField5, TrxField6, DateTime, '''', '''', '''', ''''    
     FROM ' + @ServerName3 + 'AuditLog.dbo.CCAuditLogEntryView AS Audit, ' + @ServerName + 'Voyager.dbo.CCUser AS CCUser    
     WHERE CCUser.UserID = Audit.UserID     
      AND Audit.Succeeded = 1     
      AND Audit.TrxID IN (''ChangeBillPayDefaultAccountEdit'',''ChangeExpiryUserPassword'',''ChangePasswordEdit'',    
       ''ChangeUserPassword'',''ManageAddressMaint'',''ManageContactMaint'',''ManageSecretQuestionAnswerEdit'',    
       ''ManageTransLimitMaint'',''OtherBankAccountMaintAdd'',''OtherBankAccountMaintDelete'',''OtherBankAccountMaintEdit'',    
       ''WithinAmBankAccountMaintAdd'',''WithinAmBankAccountMaintDelete'',''WithinAmBankAccountMaintEdit'',    
       ''SetAccountMaskPreferenceAudit'',''ChangeLoginIdAudit'')     
      AND DATEDIFF(DAY, CONVERT(DATETIME, CONVERT(VARCHAR(10), ''' + @StartDate + '''), 103), Audit.DateTime) >= 0     
      AND DATEDIFF(DAY, CONVERT(DATETIME, CONVERT(VARCHAR(10), ''' + @EndDate + '''), 103), Audit.DateTime) <= 0 ')    
     INSERT #MultipleNonFinTran    
     EXEC('SELECT DISTINCT FirstName, TaxID,     
      TrxID, Status, TrxField1, TrxField2, TrxField3, TrxField4, TrxField5, TrxField6, Audit.DateTime as AuditDateTime,    
    (SELECT DISTINCT SUBSTRING(A.BranchCode,3,3)  FROM ' + @ServerName + 'AuditLog.dbo.CCAuditLogEntryView X INNER JOIN ' + @ServerName + 'Voyager.dbo.CCuser U
    ON X.UserId = U.UserId INNER JOIN ' + @ServerName + 'Voyager.dbo.AMHZ_CustomerProfile P ON P.EnrolId = U.TAXID 
    INNER JOIN ' + @ServerName + 'Voyager.dbo.AMHZ_AccountListing A ON A.CIFNO = P.CIFNO
    WHERE X.UserId = Audit.UserId AND A.AccountNo = SUBSTRING(Audit.TrxField1,11,16) AND P.CIFNO = A.CIFNO
    AND (SUBSTRING(A.BranchCode,3,3) <> NULL OR SUBSTRING(A.BranchCode,3,3) <> '''')
    AND CHARINDEX(''AccountID='', Audit.TrxField1, 1) > 0),
      SUBSTRING(TrxField1,14,1), CASE WHEN CHARINDEX(''AccountID='', TrxField1, 1) > 0 THEN     
      SUBSTRING(TrxField1,11,16) ELSE '''' END, CASE WHEN CHARINDEX(''AccountType='', TrxField2, 1) > 0 THEN SUBSTRING(TrxField2,13,3) ELSE '''' END    
     FROM ' + @ServerName3 + 'AuditLog.dbo.CCAuditLogEntryView AS Audit, ' + @ServerName + 'Voyager.dbo.CCUser AS CCUser    
     WHERE CCUser.UserID = Audit.UserID     
      AND Audit.Succeeded = 1     
      AND Audit.TrxID IN (''SetAccountAttributesAudit'',''SetAccountFriendlyNameAudit'',    
      ''AccountProfileMaintULDelete'',''AccountProfileMaintLHAAdd'',''AccountProfileMaintLSCAdd'')
      AND DATEDIFF(DAY, CONVERT(DATETIME, CONVERT(VARCHAR(10), ''' + @StartDate + '''), 103), Audit.DateTime) >= 0     
      AND DATEDIFF(DAY, CONVERT(DATETIME, CONVERT(VARCHAR(10), ''' + @EndDate + '''), 103), Audit.DateTime) <= 0 ')  
      SET @stmt = '    
     SELECT * FROM    
     SELECT BranchName,
     CASE WHEN SUBSTRING(FromAccountID,1,6) IN (''519901'',''559409'')  THEN ''DC''  
    ELSE       
     CASE FromAccountType WHEN ''01'' THEN ''SA '' WHEN ''02'' THEN ''CA '' WHEN ''03'' THEN ''FD ''     
        WHEN ''SA'' THEN ''SA '' WHEN ''CA'' THEN ''CA '' WHEN ''FD'' THEN ''FD '' ELSE FromAccountType + '' ''    
     END 
     END +     
    case when Len(FromAccountID) =16 Then  
       CASE FromAccountType WHEN ''VC'' THEN   
       SUBSTRING(FromAccountID,1,6)+''******''+SUBSTRING(FromAccountID,13,4)      
    WHEN ''MC'' THEN SUBSTRING(FromAccountID,1,6)+''******''+SUBSTRING(FromAccountID,13,4)  END  
         when Len(FromAccountID) =15 Then 
    CASE FromAccountType WHEN ''VC'' THEN   
       SUBSTRING(FromAccountID,1,6)+''******''+SUBSTRING(FromAccountID,13,3)      
    WHEN ''MC'' THEN SUBSTRING(FromAccountID,1,6)+''******''+SUBSTRING(FromAccountID,13,3)  END  
         ELSE FromAccountID   
    ENd  
     AS FromAcctNo,    
     CASE TrxId  
     WHEN ''AccountProfileMaintLHAAdd'' THEN ''Link Account/Card''    
     WHEN ''AccountProfileMaintLSCAdd'' THEN ''Link Account/Card''    
     WHEN ''APMFamilyFirstAdd'' THEN ''Link Family First Account''    
     WHEN ''AccountProfileMaintULDelete'' THEN ''Unlink Account/Card''    
     WHEN ''BalInqFD'' THEN CASE  WHEN Field3 IN (''APMLink=SUCCESS'') THEN ''APMLink Success'' ELSE ''Fixed Deposit Balance Inquiry'' END  
     WHEN ''BalInqCASA'' THEN CASE  WHEN Field3 IN (''APMLink=SUCCESS'') THEN ''APMLink Success'' ELSE
         CASE WHEN FromAccountType IN (''SA'',''01'') THEN ''Savings Account Balance Inquiry'' 
        ELSE ''Current Account Balance Inquiry'' 
       END 
      END    
     WHEN ''StopCheck'' THEN ''Stop Cheque Request''    
     WHEN ''CheckReorder'' THEN ''Order Your Cheque''    
     WHEN ''CheckInquiry'' THEN ''Cheque Inquiry''    
     WHEN ''TransHistFD'' THEN ''Fixed Deposit Transaction History''    
     WHEN ''TransHistCASA'' THEN    
      CASE WHEN FromAccountType IN (''SA'',''01'') THEN ''Savings Account Transaction History'' ELSE ''Current Account Transaction History'' END    
     WHEN ''StmtInqCC'' THEN    
      CASE WHEN FromAccountType IN (''DR'',''03'') THEN ''Debit Card Statement Inquiry'' ELSE ''Credit Card Statement Inquiry'' END    
     WHEN ''StmtInqDA'' THEN    
      CASE WHEN FromAccountType IN (''SA'',''01'') THEN ''Savings Account Statement Inquiry'' ELSE ''Current Account Statement Inquiry'' END    
     WHEN ''StmtReq'' THEN ''Printed Statement Request''    
     WHEN ''StmtInqIAMSTAR'' THEN ''E-AMSTAR Statement Inquiry''    
     WHEN ''Repayment/Transfer Inquiry'' THEN ''Repayment/Transfer Inquiry''    
     WHEN ''Account Inquiry'' THEN ''Account Inquiry''    
     WHEN ''Payment Inquiry'' THEN ''Payment Inquiry''    
     END AS TransType,    
     FirstName AS CustomerName,    
     TaxId, CONVERT(VARCHAR, DateTime, 103) AS Date, CONVERT(VARCHAR, DateTime, 108) AS Time    
     FROM #NonFinTran, ' + @ServerName3 + 'Portal.dbo.TB_Branch AS TB_Branch    
     WHERE     
     BranchId = TB_Branch.BranchCode     
     AND (TB_Branch.InstCode IN (''00001'', ''00003'',''001'',''002''))    
     AND (FromAccountType IN (''SA'', ''CA'', ''FD'', ''01'', ''02'', ''03'')))'    
    EXEC (@stmt)
    IF Exists(Select * From tempdb.dbo.SysObjects Where Name Like '#NonFinTran%')     
     DROP TABLE #NonFinTran    
     IF Exists(Select * From tempdb.dbo.SysObjects Where Name Like '#MultipleNonFinTran%')     
      DROP TABLE #MultipleNonFinTran    
    Anil Kumar

  • Transactional Context

    hi guys
    Have a quick question on transactional context
    Question:
    Will the transactional context be passed on from a LSB mediator to other java
    components (simple java classes).
    The LSB is delgating control to managers which are simple java classes. These
    managers are inturn executing sql queries. We need that the LSB and the simple
    java class execute within the same transactional context. i.e if the manager throws
    an exception, the LSB should roll back all the previous sql statements. The manager
    doesnt do any transaction management (by retrieving UserTransaction) and simply
    executes the sql calls.
    Do you think that these calls will be covered by the same transaction context.
    thanks for your time
    anand

    "anand raman" <[email protected]> wrote in message news:3f65cd27$[email protected]..
    Question:
    Will the transactional context be passed on from a LSB mediator to other java
    components (simple java classes).
    The LSB is delgating control to managers which are simple java classes. These
    managers are inturn executing sql queries. We need that the LSB and the simple
    java class execute within the same transactional context. i.e if the manager throws
    an exception, the LSB should roll back all the previous sql statements. The manager
    doesnt do any transaction management (by retrieving UserTransaction) and simply
    executes the sql calls.
    Do you think that these calls will be covered by the same transaction context.Yes, they will, provided a it' s a CMT LSLB and it has Required transaction
    attribute.
    Regards,
    Slava Imeshev

  • Using oracle's connection pools and transactional context

    Hi!
    I have an implementations of existing interfaces ( let's call this layer as
    data access layer) which abstracts the connection and transactional session
    from the calling application. This implementaion makes use of Oracles JVM
    inside the oracle database (8.1.7) to create and maintain the connection
    pools and the transactional session (transactional context). I would like
    to create differenent implementation, if the calling application is a
    session bean running inside the weblogic application server. is there way I
    can still use the connection pools and transactinal context that I got from
    the oralce if the calling application is a session bean running inside the
    weblogic app.. server?
    do I have to change any configuration settings in weblogic?. there might
    be two scenarios..
    the data access layer (the classes which deal with the connection pools and
    transactions) might be running inside the oracle's JVM..
    the data access layer might be running inside weblogic application server...
    thanks...
    Srinivas

    Certainly this from SPAM. Now from anothe user :). Note sure whether I should mark you as you as SPAM as you're posting questions which are available in stackoverflow
    http://stackoverflow.com/questions/26531161/biztalk-and-odp-net-connection-pools-and-connection-strings
    Details provided in the other forum should provide you the answer.
    I don’t want to duplicate this thread just for the sake of giving reply.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Transaction Context Is Lost in General Ledger

    Hi,
    I got 'Transaction Context is Lost' in General Ledger 'Accounting Setup Manager' while creating new Ledger, in R12.
    I tried restarting machine, but same problem.
    How to fix problem?
    See Attached SHT - http://www.mediafire.com/?fusvfp6q7cv6rdz

    Please post the application release, database version and OS.
    Can you find any errors in the database log file?
    user78995 wrote:
    Hi,
    I got 'Transaction Context is Lost' in General Ledger 'Accounting Setup Manager' while creating new Ledger, in R12.
    I tried restarting machine, but same problem.
    How to fix problem?
    See Attached SHT - http://www.mediafire.com/?fusvfp6q7cv6rdz
    Please see if these docs help.
    11i/R12 How to Debug "Transaction Context Is Lost" or "You are trying to access a page that is no longer active" [ID 456906.1]
    Transaction Context Is Lost in iSupplier portal [ID 761421.1]
    How To Check Session Persistence On BigIP F5, Cisco Ace, Citrix Netscaler or Radware AppDirector Load Balancer Appliances [ID 601694.1]
    Self-Service Pages Are Failing After Changing the s_oc4j_sesstimeout [ID 780612.1]
    Enhancement Request: PLM Login Timeout Can Cause Loss of Data (Passivation) [ID 1108454.1]
    Please also check Apache log files (and the application.log) for details about the error.
    If you cannot find any errors in the logs and you still have the same issue, then please log a SR.
    Thanks,
    Hussein

  • Transaction Context Lost In General Ledger

    Hi,
    Please help me in this thread - Transaction Context Is Lost in General Ledger
    Since, no response upto now, I am posting here.
    Regards

    Please see your other thread -- Re: Transaction Context Is Lost in General Ledger
    And, please do not post duplicates.
    Thanks,
    Hussein

  • XA datasource autocommit is false when no transaction context

    WLS 8.1SP4
    I am usign MS SQL Serevr JDBC driver.
    I use the XA driver: com.microsoft.jdbcx.sqlserver.SQLServerDataSource
    I have an MDB, transaction not supported.
    The MDB gets a connection from an xa datasource which maps to that SQL Server XA driver.
    Even thogh the txn is not supported, autocommit is set to TRUE in the connection. I want it false. I know that I can use a non-txnal DS, but why is autocommut false when I have transaction context?
    Kind Regards,
    Graham.

    grahamh wrote:
    WLS 8.1SP4
    I am usign MS SQL Serevr JDBC driver.
    I use the XA driver: com.microsoft.jdbcx.sqlserver.SQLServerDataSource
    I have an MDB, transaction not supported.
    The MDB gets a connection from an xa datasource which maps to that SQL Server XA driver.
    Even thogh the txn is not supported, autocommit is set to TRUE in the connection. I want it false. I know that I can use a non-txnal DS, but why is autocommut false when I have transaction context?
    Kind Regards,
    Graham.Hi Graham. You are correct. This is a bug we have fixed.
    Please contact support and ask for the sp4 patch for
    CR212051.
    Joe

  • How to execute a commit and wait via bol transaction context?

    Hi All,
    Currently a service contract is created via bol objects.
    Once all the objects are created, the modify() method is called bol_core instance.
    After that, the bol transaction context is assigned and the save() and commit() methods are called.
    This works fine, but the commit does not wait for the database to be updated before moving to the next steps.
    How can i get something like the 'commit work and wait' statement via the bol transaction context?
    would a commit work and wait statement work the same?
    regards,
    Leng

    Hi,
    It is a CRM specific issue.
    so the code sniplet is:
    go_bol_core = cl_crm_bol_core=>get_instance( ).
      go_bol_core->load_component_set( 'BT' ).
    create factory for BTorder
      go_bol_factory = go_bol_core->get_entity_factory( 'BTOrder' ).
      gs_param-name  = 'PROCESS_TYPE'.
      gs_param-value = 'ZSC1'.
      APPEND gs_param TO gt_param.
      go_btorder ?= go_bol_factory->create( gt_param ).
    send changes
      go_bol_core->modify( ).
      go_transaction_context = go_btorder->get_transaction( ).
        lv_success  = go_transaction_context->save( ).
        IF lv_success EQ abap_true.
          go_transaction_context->commit( ).
    so after the commit, it does not commit to the db straight away.
    i asked a collegue, and i got this:
    Using the BOL commit should perform the commit in one of two ways u2013 depending on the how the application (i.e. the GENIL layer has been implemented). It will either do a commit work and wait, or use a local update task and commit work statement. So based on this the update should be synchronous i.e. it should wait for the update to finish. In the case of the one order transaction it basically runs the update in local task.
    Basically i don't understand why it is behaving as it is.

  • Passing transaction context to weblogic container

    I am developing a java application which is doing some database
    updates. It invokes a few EJBs deployed on weblogic server 4.5. Those
    beans also do some database updates. I want all the database
    operations in a single transaction. The beans are configured to be
    bean managed transactions and use weblogic connection pool (weblogic
    pool driver)
    I want to create a transaction context in the java application and
    also want to make EJBs participate in the same context.
    Is this really possible to achieve?
    Thanks
    Jagdish

    Hi Bob,
    In TestStand 3.0 and later you can pass the sequence context as a CAObjHandle in CVI. The easiest way to get an example of this is to create a blank sequence and insert an Action step. Right-click on the step and select specify module. On the module tab specify a name for the function. Next on the Source Code tab click Create Code... This will prompt you for a location and name for a project file and a c file. It will then create code for you that demonstrates how to pass the sequence context and use it.
    If you're using an older version of TestStand then the parameters you can pass are fixed. I would suggest looking at one of the shipping examples. The Register step in the following example demonstates how to pass the sequence context and use it: C:
    \Program Files\National Instruments\TestStand 3.1\Examples\Demo\C\cpu.seq
    (This path will be different depending on your version of TestStand.)
    I hope this helps!!
    Regards,
    Sarah Miracle
    National Instruments

  • IllegalStateException - SSB loosing transaction context

    I have a following scenario
    1. MDB1(txn not supported) calls SSB1 (txn att = required)
    2. SSB1 calls some other SSBs and Enity beans with txn attt = required.
    3. SSB1 catches checked exception and calls rollback
    catch ( MyCheckedException e){
    this.getSessionContext().setRollbackOnly();
    throw e;
    Note that setRollbackOnly() is called from SSB1 which is in transaction but still
    I get following error on weblogic console that setRollbackOnly() is called from
    a bean which is not participating in transaction. This behavior is not consistent
    it happens some time. I re-started the server and weblogic started executing txns
    properly.
    My question is when a pair of MDB and SSB is used does SSB LOOSES it's transaction
    CONTEXT in some situation?
    I would really appreciate and early help as it is critical for the project
    thanks
    ========== weblogic log ===============
    <Jul 31, 2003 12:57:34 PM PDT> <Info> <EJB> <EJB Exception during invocation from
    home: com.cobaltgroup.products.lc.queue.ejb.EmailMessageTaskBean_tatdyp_HomeImpl@7
    f44f3 threw exception: java.lang.IllegalStateException: Illegal attempt to call
    EJ
    BContext.setRollbackOnly() from an EJB that was not participating in a transaction

    Deyan,
    I assumed that Saurabh's statement that SSB1 has Required attribute is true.
    The Spec says:
    "17.6.2.8 Handling of setRollbackOnly() method
    The Container must handle the EJBContext.setRollbackOnly() method
    invoked from a business method executing with the Required, RequiresNew,
    or Mandatory transaction attribute as follows:
    - The Container must ensure that the transaction will never commit.
    Typically, the Container instructs the transaction manager to mark the
    transaction for rollback.
    I'd guess that TX gets rolled back as soon as control returned
    to the container from dispatched method called setRollbackOnly().
    As you can see, the Spec allows it and it does make sence
    taking in account cost of holding TX.
    Slava
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]...
    Slava,
    According to the EJB spec the transaction should not end just because at
    some point it was marked for rollback, only that it should never commit.
    The EJB should still be able to call setRollbackOnly without any problems.
    It look more like the transaction context is either never created or
    lost somehow.
    And if there is no transactional context
    SessionContext.getRollbackOnly() will throw the same exception (EJB 2.0
    Section 7.6.1 for stateful and Section 7.8.2 for stateless session EJBs).
    So I'd start by making sure that the EJB is not marked with BMT and
    "Required" TX attribute -- in that case the EJB will use BMT and the TX
    attribute is ignored.
    Another way to see that there is a transaction is to use
    System.out.println(weblogic.transaction.TxHelper.getTransaction); to
    print the current transaction and verify that there is actually one.
    Regards,
    Dejan
    Slava Imeshev wrote:
    Hi Saurabh,
    It could happen because by the time SSB1 received the exception the TX
    has
    been rolled back already.
    The code in the catch block should look like the following:
    catch ( MyCheckedException e){
    if (!this.getSessionContext().getRollbackOnly()) {
    this.getSessionContext().setRollbackOnly();
    throw e;
    Regards,
    Slava Imeshev
    "Saurabh Kumar" <[email protected]> wrote in message
    news:[email protected]...
    I have a following scenario
    1. MDB1(txn not supported) calls SSB1 (txn att = required)
    2. SSB1 calls some other SSBs and Enity beans with txn attt = required.
    3. SSB1 catches checked exception and calls rollback
    catch ( MyCheckedException e){
    this.getSessionContext().setRollbackOnly();
    throw e;
    Note that setRollbackOnly() is called from SSB1 which is in transaction
    but still
    I get following error on weblogic console that setRollbackOnly() is
    called
    >>>
    >>>
    from
    a bean which is not participating in transaction. This behavior is not
    consistent
    it happens some time. I re-started the server and weblogic started
    executing txns
    properly.
    My question is when a pair of MDB and SSB is used does SSB LOOSES it's
    transaction
    CONTEXT in some situation?
    I would really appreciate and early help as it is critical for the
    project
    >>>
    thanks
    ========== weblogic log ===============
    <Jul 31, 2003 12:57:34 PM PDT> <Info> <EJB> <EJB Exception during
    invocation from
    home:
    com.cobaltgroup.products.lc.queue.ejb.EmailMessageTaskBean_tatdyp_HomeImpl@7
    >>
    >>
    f44f3 threw exception: java.lang.IllegalStateException: Illegal attemptto
    >>>
    >>>
    call
    EJ
    BContext.setRollbackOnly() from an EJB that was not participating in a
    transaction

  • OSB Transaction context (QoS exactly once)

    Hi all,
    First of all, excuse me my poor english...
    I need to understand how develope transactional services with OSB.
    My unit test are 2 proxy services : first with JMS/XA transport (with response requiered) with 2 Service Callout to transactional EJB with exactly once; second proxy routes the first with HTTP transport with exactly once.
    When services ends ok, or i reply with error in error pipeline, commit is executed; but if services failed, services no reply nothing until timeout proxy....then rollback is executed....
    In conclusion, i don't know how i develope transactional proxy services....i choose bad transports?, i don't understand pipelines?...i'm very confused...
    Thank you all

    Hi,
    i tested it without test console with no different results...and test console show me :
    Response Data :
    <con:metadata xmlns:con="http://www.bea.com/wli/sb/test/config">
    <tran:headers xsi:type="http:HttpResponseHeaders" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <http:Content-Type>text/xml</http:Content-Type>
    </tran:headers>
    <tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">1</tran:response-code>
    </con:metadata>
    Invocation Trace :
    System Error Handler
    $fault: <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-381501</con:errorCode>
    <con:reason>
    JmsAsyncMessageTable timed out message with id 2aa517390000011f37a92110ffff8035
    </con:reason>
    <con:location>
    <con:node>RouteNode1</con:node>
    <con:path>response-pipeline</con:path>
    </con:location>
    </con:fault>
    Always i try to route (tunneling http) with exactly once to proxies JMS/XA, if proxy throws exceptions, in http proxy i see this : "JmsAsyncMessageTable timed out message"....
    I'm disoriented...
    Thx you very much.

  • Security Context Propagation between Managed Servers

              I'm using WLS 8.1 SP2. I have one domain, two managed servers, each on a separate
              hardware server. Each managed server hosts a different web application. I want
              to authenticate to Web App "A" and be able to invoke Web App "B" (from "A") without
              having to re-authenticate. Is this possible via configuration and, if so, how?
              Thanks.
              

    Frank,
    You do not have to do anything to propagate identity between the two
    containers. As long as the user is authenticating first..
    There have been a number of issues with the propagation, so be sure to stay up
    on the service packs.
    HTH.
    Frank wrote:
    How do you propagate security context information from Servlet to
    EJBs? I have an web app that uses the container's FORM based authentication.
    The servlet resource then calls a session EJB (w/ security contraints
    setup). The webapp and the ejbs are bundled into one EAR.
    Thanks!--
    Tom Mitchell
    [email protected]
    Very Current Stoneham, MA Weather
    http://www.tom.org

  • Using TxDataSource outside a transaction context

    I have two questions about using TxDataSource:
    - Can I use a TxDataSource outside a transaction? i.e. can I get a connection
    from a TxDataSource if there is no active transaction?
    - If the answer to the above question is true, do I have to close the connection
    after I'm done using it? The data source is defined on a regular connection pool.
    Thanks

    At 09:54 AM 7/30/2002 -0700, you wrote:Thanks for your answer, as always:-)
    .As far as the closing the connection goes, what do I do if I have multiple ejbs participating in
    a transaction, and each one uses the connection from the database (the same connection, as they
    are all participating in the same transaction)? Does each ejb method (assuming a session ejb with
    REQUIRED transactional method) have to do a connection.close() before the method exits? Or in this
    case, will the container automatically release the connection back to the pool when the
    transaction commits or rollsback?We have you covered. Any time your code gets a connection from a TxDataSource in the context of
    a transactional EJB, or in a servlet with an ongoing UserTransaction, we will cheerfully ignore if
    your
    code calls commit() or close(), because our Tx coordinator is the only one who knows when to commit.
    Closing the connection is irrelevant to the flow either, because even though several EJBs in a given
    transaction
    all ask for a connection, and all get their own Connection object, these objects are wrappers around
    a single
    real pool connection, and if you close one wrapper, we know not to do anything with the underlying
    pool
    connection.
    In summary, if you always stick to the basic standard of clean safe JDBC code, it will always
    work,
    and it is important to do so in a non-transactional state:
    myJdbcMethodsLookLike()
    Connection c = null;
    try {
    c = getConnection();
    do all the JDBC
    c.close();
    c = null;
    catch (Exception e) {
    do whatever
    finally {
    if (c != null) try {c.close();} catch (Exception ignore){}

Maybe you are looking for

  • SAP R/3 4.6C installation on HP-UX 11.31

    Hi Export We have the old system based IBM server with HA environment, Cluster software is HACMP. Now, the goal is: Migrate the SAP R/3 4.6C system to HP hardware. Hardware:  HP rx6600 & rx8640 server with MC/SG (cluster software); DB& SAP R3 version

  • Why doesn't my itunes library sync songs I've purchased with an old Apple id?

    Hello all, I've recently bought a replacement laptop, running Windows 7 & had my music library transferred from my old P.C successfully. When I sync my ipod over 700 songs don't sync, but they're all available to play from the library. At a glance it

  • How to do Conflict Resolution in Integration Directory - Urgent

    Hi,      We are having a problem when trying to change some objects in the integration directory.   Error :         "The following objects have previous versions that are no longer active. Reciever Determination urn:sap-com:document:sap:idoc:messages

  • Third Party Installs

    Hey guys, I want to download and install a few third party AU plugins and am not seeing any spot in the manual that helps with my questions. Where should I save them? Any other tips from that point forward? Thanks in advance

  • Time for an update... never fails

    For as long as I can remember, Flash stops working properly when an update is available. I always know when to check it. Sure enough this time is no different other than there is no Mac PPC version. I can't access flash sites very well without it. I