2 Replies Latest reply on Aug 4, 2004 3:44 PM by Claude Glauser

    SFSB problem

    Erez Efrati Newbie


      I have a statefull session bean that performs searching for the user and keeps the searching results for paging though the results.
      I have a page with a link to activate the search "search". If I click it once the search is fired and everything works nicely. If I click it twice faster I get the following error:

      tried to enter Stateful bean with different tx context, contextTx: TransactionImpl:XidImpl [FormatId=257, GlobalId=Erez//224, BranchQual=], methodTx: TransactionImpl:XidImpl [FormatId=257, GlobalId=Erez//225, BranchQual=]

      Why is that and what should I be doing?

      Thanks in advance,


        • 1. Re: SFSB problem
          Claude Glauser Newbie

          Calls to stateful session beans are not synchronized according to the ejb specification. Scott Stark wrote in another thread:

          Change the stateful session interceptor to synchronize calls instead of throwing an exception or add a client interceptor that does the synchronization on the client side.
          . The book JBoss Administration and Development shows how to do this. Other solution: Just synchronize the ejb-calls somehow in your web application. Or implement the SessionSynchronization interface (bean managed transaction) and do something there. Did you play with transaction settings in the ejb descirptor? Hope this helps.

          • 2. Re: SFSB problem
            Claude Glauser Newbie

            See ejb specification, chapter 7.5.6, last paragraph.