2 Replies Latest reply on Nov 24, 2014 4:17 PM by Wolf-Dieter Fink

    sometimes jboss eap5.1.2 not inject ejb to BackBean,in TomcatInjectionContainer the encInjections no the backbean annotation thing

    Ben Gao Novice

      my application faceconfig.xml has hundreds of  backbean . some backbean can not inject ejb.

      for example ,the CharaGrpDefTmpMB can not inject ejb ,but I move this Bean to faceconfig different lines. THE BEAN IS OK,but other ok bean then not inject ejb.



      SO I debug the myface source and jboss source.I found in org.jboss.web.tomcat.service.TomcatInjectionContainer  class

      The following methods,the   Map<AccessibleObject, Injector> injectors = encInjections.get(clazz.getName());  the injectors is NULL.

        private Map<AccessibleObject, Injector> getEncInjectionsForClass(Class<?> clazz, boolean isDynamic)


            if (clazz == null || clazz == Object.class)

               return null;



            Map<AccessibleObject, Injector> injectors = encInjections.get(clazz.getName());

            Map<AccessibleObject, Injector> additionalInjectors = null;

            if (clazz.getSuperclass() != null && !isDynamic)

               additionalInjectors = getEncInjectionsForClass(clazz.getSuperclass(), isDynamic);



            if (injectors == null)

               return additionalInjectors;

            else if (additionalInjectors != null)




            return injectors;




      my class:

      public class CharaGrpDefTmpMB {


        private CharaGrpDefTmpSBLocal charaGrpDefTmpSB;


        private CupBranchAuthSBLocal cupBranchAuthSB;


        private CharaGrpDefBatchSyncSBLocal charaGrpDefBatchSyncSB;






      jboss version:jboss eap 5.1.2