5 Replies Latest reply on Feb 5, 2009 11:16 AM by jaikiran

    RA failing to invoke MDB method (on 5.0.0, worked on 4.2.3)

    matterbury

      [Cross posted from JCA/JBoss as suggested]

      I have my Resource Adapter (RA) in an rar and my MDB in a separate jar.
      The MDB does not use JMS - I have defined a separate Listener interface.

      The rar deploys successfully, and the MDB appears to as well, however when the RA invokes the MDB's method, "nothing" happens
      (see below for the relevant trace). I believe the method isn't being called because it logs entry/exit/actions and none of
      these things are logged.

      It works fine using 4.2.3GA but does not work using 5.0.0GA.

      Any suggestions on how to proceed? Thanks!

      Trace:
      The RA has created an instance/handle using the MessageEndpointFactory and is in the act of invoking the 'handles' method.
      I believe the WARN's are a known JBoss problem (caused by a missing if-not-null condition).

      2009-01-30 13:44:58,566 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InterceptorsFactory
      2009-01-30 13:44:58,566 WARN [org.jboss.ejb3.interceptors.aop.InterceptorsFactory] (InboundConnection) EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      2009-01-30 13:44:58,566 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InterceptorsFactory
      2009-01-30 13:44:58,566 WARN [org.jboss.ejb3.interceptors.aop.InterceptorsFactory] (InboundConnection) EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      2009-01-30 13:44:58,566 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InjectInterceptorsFactory
      2009-01-30 13:44:58,566 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) new InjectInterceptorsFactory
      2009-01-30 13:44:58,566 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) Create interceptor chain for org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@17297941 on public java.lang.String com.example.xa.ExampleMessageBean.invoke(java.lang.String,java.lang.String,java.lang.String) throws java.lang.Exception
      2009-01-30 13:44:58,566 WARN [org.jboss.ejb3.interceptors.registry.InterceptorRegistry] (InboundConnection) applicable interceptors is non-existent for public java.lang.String com.example.xa.ExampleMessageBean.invoke(java.lang.String,java.lang.String,java.lang.String) throws java.lang.Exception
      2009-01-30 13:44:58,582 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InjectInterceptorsFactory
      2009-01-30 13:44:58,582 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) new InjectInterceptorsFactory
      2009-01-30 13:44:58,582 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) Create interceptor chain for org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@17297941 on public void com.example.xa.ExampleMessageBean.ejbCreate() throws javax.ejb.EJBException
      2009-01-30 13:44:58,582 WARN [org.jboss.ejb3.interceptors.registry.InterceptorRegistry] (InboundConnection) applicable interceptors is non-existent for public void com.example.xa.ExampleMessageBean.ejbCreate() throws javax.ejb.EJBException
      2009-01-30 13:44:58,582 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InjectInterceptorsFactory
      2009-01-30 13:44:58,582 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) new InjectInterceptorsFactory
      2009-01-30 13:44:58,582 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) Create interceptor chain for org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@17297941 on public void com.example.xa.ExampleMessageBean.ejbRemove() throws javax.ejb.EJBException
      2009-01-30 13:44:58,582 WARN [org.jboss.ejb3.interceptors.registry.InterceptorRegistry] (InboundConnection) applicable interceptors is non-existent for public void com.example.xa.ExampleMessageBean.ejbRemove() throws javax.ejb.EJBException
      2009-01-30 13:44:58,582 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InjectInterceptorsFactory
      2009-01-30 13:44:58,582 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) new InjectInterceptorsFactory
      2009-01-30 13:44:58,582 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) Create interceptor chain for org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@17297941 on public void com.example.xa.ExampleMessageBean.setMessageDrivenContext(javax.ejb.MessageDrivenContext) throws javax.ejb.EJBException
      2009-01-30 13:44:58,582 WARN [org.jboss.ejb3.interceptors.registry.InterceptorRegistry] (InboundConnection) applicable interceptors is non-existent for public void com.example.xa.ExampleMessageBean.setMessageDrivenContext(javax.ejb.MessageDrivenContext) throws javax.ejb.EJBException
      2009-01-30 13:44:58,582 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InjectInterceptorsFactory
      2009-01-30 13:44:58,582 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) new InjectInterceptorsFactory
      2009-01-30 13:44:58,582 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) Create interceptor chain for org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@17297941 on public boolean com.example.xa.ExampleMessageBean.handles(java.lang.String)
      2009-01-30 13:44:58,582 WARN [org.jboss.ejb3.interceptors.registry.InterceptorRegistry] (InboundConnection) applicable interceptors is non-existent for public boolean com.example.xa.ExampleMessageBean.handles(java.lang.String)
      2009-01-30 13:44:58,597 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InjectInterceptorsFactory
      2009-01-30 13:44:58,597 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) new InjectInterceptorsFactory
      2009-01-30 13:44:58,597 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) Create interceptor chain for org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@17297941 on public java.lang.String com.example.xa.ExampleMessageBean.invoke(java.lang.String,java.lang.String,java.lang.String) throws java.lang.Exception
      2009-01-30 13:44:58,597 WARN [org.jboss.ejb3.interceptors.registry.InterceptorRegistry] (InboundConnection) applicable interceptors is non-existent for public java.lang.String com.example.xa.ExampleMessageBean.invoke(java.lang.String,java.lang.String,java.lang.String) throws java.lang.Exception
      2009-01-30 13:44:58,597 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InjectInterceptorsFactory
      2009-01-30 13:44:58,597 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) new InjectInterceptorsFactory
      2009-01-30 13:44:58,597 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) Create interceptor chain for org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@17297941 on public void com.example.xa.ExampleMessageBean.ejbCreate() throws javax.ejb.EJBException
      2009-01-30 13:44:58,597 WARN [org.jboss.ejb3.interceptors.registry.InterceptorRegistry] (InboundConnection) applicable interceptors is non-existent for public void com.example.xa.ExampleMessageBean.ejbCreate() throws javax.ejb.EJBException
      2009-01-30 13:44:58,597 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InjectInterceptorsFactory
      2009-01-30 13:44:58,597 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) new InjectInterceptorsFactory
      2009-01-30 13:44:58,597 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) Create interceptor chain for org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@17297941 on public void com.example.xa.ExampleMessageBean.ejbRemove() throws javax.ejb.EJBException
      2009-01-30 13:44:58,597 WARN [org.jboss.ejb3.interceptors.registry.InterceptorRegistry] (InboundConnection) applicable interceptors is non-existent for public void com.example.xa.ExampleMessageBean.ejbRemove() throws javax.ejb.EJBException
      2009-01-30 13:44:58,597 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InjectInterceptorsFactory
      2009-01-30 13:44:58,597 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) new InjectInterceptorsFactory
      2009-01-30 13:44:58,597 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) Create interceptor chain for org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@17297941 on public void com.example.xa.ExampleMessageBean.setMessageDrivenContext(javax.ejb.MessageDrivenContext) throws javax.ejb.EJBException
      2009-01-30 13:44:58,597 WARN [org.jboss.ejb3.interceptors.registry.InterceptorRegistry] (InboundConnection) applicable interceptors is non-existent for public void com.example.xa.ExampleMessageBean.setMessageDrivenContext(javax.ejb.MessageDrivenContext) throws javax.ejb.EJBException
      2009-01-30 13:44:58,597 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (InboundConnection) Creating advice InjectInterceptorsFactory
      2009-01-30 13:44:58,597 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) new InjectInterceptorsFactory
      2009-01-30 13:44:58,597 DEBUG [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (InboundConnection) Create interceptor chain for org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@17297941 on public boolean com.example.xa.ExampleMessageBean.handles(java.lang.String)
      2009-01-30 13:44:58,597 WARN [org.jboss.ejb3.interceptors.registry.InterceptorRegistry] (InboundConnection) applicable interceptors is non-existent for public boolean com.example.xa.ExampleMessageBean.handles(java.lang.String)
      2009-01-30 13:44:58,613 DEBUG [org.jboss.ejb3.interceptors.aop.InterceptorSequencer] (InboundConnection) aroundInvoke [advisedMethod=public boolean com.example.xa.ExampleMessageBean.handles(java.lang.String), unadvisedMethod=public boolean com.example.xa.ExampleMessageBean.handles(java.lang.String), metadata=null, targetObject=com.example.xa.ExampleMessageBean@32f533, arguments=[Ljava.lang.Object;@10a62e8]
      2009-01-30 13:44:58,629 ERROR [STDERR] (InboundConnection) Jan 30, 2009 1:44:58 PM ExMessageEndpointManager get
      WARNING: Class TelcoSession.CustomerHome is unhandled



        • 1. Re: RA failing to invoke MDB method (on 5.0.0, worked on 4.2
          jaikiran

          Any idea where this message is coming from?

          2009-01-30 13:44:58,629 ERROR [STDERR] (InboundConnection) Jan 30, 2009 1:44:58 PM ExMessageEndpointManager get
          WARNING: Class TelcoSession.CustomerHome is unhandled


          • 2. Re: RA failing to invoke MDB method (on 5.0.0, worked on 4.2
            matterbury

            That is my message, saying that the MDB didn't return true from the invocation of its 'handles' method (which is called 5 times in this case).

            The MDB logs the invocation of this method in the same way, so there should be 5 messages like "PM ExampleMessageBean handles" yadda yadda, but there are none, which is what concerns me - it appears that the bean's method is never actually invoked, although all that DEBUG and WARN is from the container setting up the calls (AFAIK).

            Thanks, m.

            • 3. Re: RA failing to invoke MDB method (on 5.0.0, worked on 4.2
              jaikiran

              Can you post the relevant code, please? Among others things, wanted to make sure the correct loggers and logger levels are being used.

              • 4. Re: RA failing to invoke MDB method (on 5.0.0, worked on 4.2
                matterbury

                Unfortunately no, but I can say:
                * the logging code is the same in the bean and RA,
                * they both use the Java logger,
                * they both get a logger using Logger.getLogger(classname),
                * they both use Logger.entering() and Logger.logp(),
                * they both log messages in JBoss 4.2.3GA,
                * they both log messages in glassfish v2,
                * the bean does not log messages in JBoss 5.0.0.

                I am really only after some idea of how to track this down.
                I don't expect anyone to be able to diagnose/solve the problem remotely :-)

                Thanks!

                • 5. Re: RA failing to invoke MDB method (on 5.0.0, worked on 4.2
                  jaikiran

                  One thing that i know that has changed in JBoss-5 related to logging is that the server.log appender is now having a default threshold. Earlier there was no threshold so any "level" of logs including TRACE level would be logged into that. But in JBoss-5.0 you should pass the threshold log level through the jboss.server.log.threshold param. Ex:

                  -Djboss.server.log.threshold=TRACE


                  So if you are logging at TRACE level then you might have to pass this. And that's the reason why i asked about logging :)

                  Other than that, you could attach a debugger and add breakpoints and run JBoss in debug mode to see the flow of control.

                  So far, nothing seems to be odd from the logs.