3 Replies Latest reply on Jun 17, 2008 11:59 AM by pkorros

    Seam performance problem with JTA

    ggavrilo

      I have seen several complains, that a lot of time is spent on "java:comp/UserTransaction" lookup, which called many times. The same in my seam application, 30% of processing time  is spend on transaction lookup and it called 800 times. I've found out why so many times Transaction.instance() is called. I use CONVERSATION scope component with some methods marked with Transactional annotation in my page. Although, non-transactional getters are used in bindings, TransactionInterceptor calls transaction check anyway. Could it be omitted in case neither method, nor class marked as transactional? The same with CONVERSATION scope beans, transaction lookup is called on every call, but it is not clear how it is related to transaction?


      Thanks in advance,
      Galina

        • 1. Re: Seam performance problem with JTA
          ggavrilo

          Why entityRefsToIds is called in case transaction is not rolled back only? BTW, reentrant flag is cleared only if transaction is not rolled back too. Is it correct?


          public Object aroundInvoke(InvocationContext ctx) throws Exception
              {
                  if (reentrant) {
                      return ctx.proceed();
                  } else {
                      reentrant = true;
                      entityIdsToRefs(ctx);
                      try  {
                          return ctx.proceed();
                      } finally {
                          if (!isTransactionRolledBackOrMarkedRollback()) {
                              entityRefsToIds(ctx);
                              reentrant = false;
                          }
                      }
                  }
              }
          


          • 2. Re: Seam performance problem with JTA
            pmuir

            Please file a JIRA issue about the finally.

            • 3. Re: Seam performance problem with JTA
              pkorros

              Hi,


              I am having the same issue in my application. 40% is spent on looking up the UserTransaction from JNDI (http://www.seamframework.org/Community/PerformanceIssueRegardingTransactioninstance).


              Did you filed a JIRA issue for this? could you please post here the issue id so I can track it?


              Thanks