0 Replies Latest reply on Jul 10, 2009 11:08 PM by asookazian

    Seam and multiple occurrences of same exception in server.log

    asookazian

      I've noticed that there are multiple attempts at the same business method call if the method throws an exception.


      For example:


      @Name("jmxHibernateStatistics")
      public class JmxHibernateStatistics {...}



      @Name("myTest1")
      @Scope(ScopeType.CONVERSATION)
      public class TestApplicationMetaDataAction {
      
         @In
         private JmxHibernateStatistics jmxHibernateStatistics;
      
         @Create
         public void init(){
           jmxHibernateStatistics.foo();
         }
      }



      I see NullPointerException several times in the server.log which indicates that the init() method was executed several times (and I know this is the case b/c I placed a debug breakpoint in the foo() line).


      If I add @AutoCreate to the JmxHibernateStatistics class, then the init() method is called just once.


      So why does JBoss and/or Seam (or whatever it may be - interceptors?) call the init() method so many times in the first case???


      as a side note, you'd think the injection would fail b/c I didn't have create=true for the @In or @AutoCreate in the first scenario...