2 Replies Latest reply on Feb 24, 2010 11:36 PM by Gary Quinn

    EJBTHREE-1246

    Gary Quinn Newbie

      I am using jboss-5.1.0.GA.

       

      I keep getting this EJBTHREE-1246 warning every time I am injecting an ejb into another ejb and calling a method.

       

      I get no warning if I call the same method from a servlet.

       

      The functionality works fine and I get the required result from all my code. It is just this irritating warning every time I call a method.

       

      Does anyone have the same problem and hopefully an answer to my problem.

       

      Example 1 (Give warning):

       

      @Service(name = "ManagementServiceEJB")

      public class ManagementServiceBean implements ManagementService {

       

         private static final Logger LOG = Logger.getLogger(LoginServiceBean.class);

       

         @EJB

         LoginServiceLocal loginService;

       

         public void start() throws Exception {

       

            LOG.info("start");

       

            String name = "gary";

       

            Login login = loginService.findLogin(name);

       

            if(login == null) {

               login = new Login();

               login.setLogin(name);

               login.setPassword("default");

       

               loginService.createLogin(login);

            }

         }

      }

       

      Output 1:

       

      08:38:04,071 INFO  [LoginServiceBean] start

      08:38:04,196 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container

      08:38:04,198 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container

      08:38:04,208 INFO  [LoginServiceBean] Finding login: gary

       

      Example 2 (Give warning):

       

      @Stateless(name = "LoginServiceEJB")

      public class LoginServiceBean implements LoginServiceLocal, LoginServiceRemote {

       

         private static final Logger LOG = Logger.getLogger(LoginServiceBean.class);

       

         @Resource(mappedName = "topic/quinn.log.topic")

         private Destination destination;

       

         @EJB

         private MessagingService messagingService;

       

         @PersistenceContext

         Session session;

       

         public void createLogin(final Login login) {

            LOG.info("Creating login: " + login.toString());

       

            session.save(login);

       

            MessagingCallback messagingCallback = new MessagingCallback() {

               public Message createMessage(javax.jms.Session session) throws JMSException {

                  return session.createObjectMessage(login);

               }

            };

       

            try {

               messagingService.postMessage(destination, messagingCallback);

            } catch (JMSException e) {

               throw new RuntimeException(e);

            }

         }

      }

       

      Output 2:

       

      08:40:49,615 INFO  [LoginServiceBean] Creating login: User{login='keyley', password='smallpassword'}

      08:40:49,626 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container

      08:40:49,626 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container

      08:40:49,956 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container

      08:40:49,957 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container

       

      Example 3  (No warning):

       

      public class CreateLoginServlet extends HttpServlet {

       

         @EJB

         LoginServiceRemote loginService;

       

         protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

       

            LoginDTO dto = new LoginDTO();

            dto.setLogin(request.getParameter("login"));

            dto.setPassword(request.getParameter("password"));

       

            loginService.createLogin(dto);

       

            response.sendRedirect("ListLoginServlet");

         }

       

         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

       

         }

      }

        • 1. Re: EJBTHREE-1246
          jaikiran pai Master

          That's been fixed https://jira.jboss.org/jira/browse/EJBTHREE-1841

           

          Apply our latest EJB3 plugin http://www.jboss.org/ejb3/ejb3plugin.html against AS 5.1.0 to get that fix

          • 2. Re: EJBTHREE-1246
            Gary Quinn Newbie

            Thanks this solved it.

             

            I still get warnings when jboss starts up, but it does not throw warnings every time I call a method.

             

            06:34:23,918 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:23,986 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:25,780 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:25,782 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:25,838 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:26,973 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:27,000 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:27,114 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:27,121 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:27,165 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:27,181 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:27,211 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:27,472 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:27,481 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:28,379 INFO  [NativeServerConfig] JBoss Web Services - Stack Native Core

            06:34:28,380 INFO  [NativeServerConfig] 3.1.2.GA

            06:34:28,858 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:29,353 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:30,007 INFO  [AttributeCallbackItem] Owner callback not implemented.

            06:34:30,008 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:30,010 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:31,436 INFO  [LogNotificationListener] Adding notification listener for logging mbean "jboss.system:service=Logging,type=Log4jService" to server org.jboss.mx.server.MBeanServerImpl@f3cf72[ defaultDomain='jboss' ]

            06:34:32,548 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:32,631 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:42,750 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@537545{vfsfile:/home/gary/data/etc/jboss/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}

            06:34:42,755 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@537545{vfsfile:/home/gary/data/etc/jboss/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}

            06:34:42,755 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@537545{vfsfile:/home/gary/data/etc/jboss/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}

            06:34:42,755 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@537545{vfsfile:/home/gary/data/etc/jboss/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}

            06:34:43,034 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:43,543 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:43,781 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:44,620 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:44,742 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            06:34:44,743 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

            0