2 Replies Latest reply on Jan 21, 2010 4:20 AM by amar slimane

    Get and control the methods list of an ejb at the client side

    amar slimane Newbie

      Hi,

       

      We 're using JBoss AS 5.1.0.GA and we have several deployed servers but not with the same version.

      And when we invoke a method which does not exist in a server we 've got a NullPointer exception :

       

      java.lang.NullPointerException
        at org.jboss.ejb3.service.ServiceContainer.dynamicInvoke(ServiceContainer.java:477)
        at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
        at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
        at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
        at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
        at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
        at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
        at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:551)
        at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
        at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:211)
        at org.jboss.remoting.Client.invoke(Client.java:1724)
        at org.jboss.remoting.Client.invoke(Client.java:629)
        at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at rte.gsr.app.jboss.ClientIntercepteur.invoke(ClientIntercepteur.java:114)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
        at $Proxy3.invoke(Unknown Source)
        at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
        at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
        at $Proxy2.toto(Unknown Source)

       

       

      Is it possible to get and control the methods list of an ejb with the proxy

      at the client side (in a interceptor for example).

       

      Thanks in advance.

        • 1. Re: Get and control the methods list of an ejb at the client side
          jaikiran pai Master

          slimamar wrote:

           

          Hi,

           

          We 're using JBoss AS 5.1.0.GA and we have several deployed servers but not with the same version.

          And when we invoke a method which does not exist in a server we 've got a NullPointer exception :

           

          java.lang.NullPointerException
            at org.jboss.ejb3.service.ServiceContainer.dynamicInvoke(ServiceContainer.java:477)
            at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)


          I am not sure what exactly you mean by invoking a method which does not exist in the server. Can you please explain and provide more details?

          • 2. Re: Get and control the methods list of an ejb at the client side
            amar slimane Newbie

            Actually, we 're developping an application which is supplied at our customers.

            For each customer, the application's version is not the same.

            And sometimes we can have (we want) an application client with a version who communicates

            with an application server with a different version.

            So, we can have a definition of an ejb at the client side different than the definition of this ejb at the server side.

            In tis case, we want to detect for each ejb's method invocation if the method does exist or not at the server side.