4 Replies Latest reply on Aug 30, 2006 9:06 AM by abra cadabra

    Reflection on EJB session bean on client side

    J-C jc Apprentice

      I need to invoke method from a remote session bean from client using reflection API.
      I've tried:

      Method method = clazz.getMethod(MySession.class, null);
      MySession s= (MySession) ctx.lookup(...);
      Object o = method.invoke(s, args);

      Of course it does not works since s is neot an instance of MySession but a Proxy on MySession.

      How can I invoke a method of a remote session bean using reflection ?