1 Reply Latest reply on Jun 14, 2006 7:07 AM by andy

    EJB 3.0 lookup remote EJB invokes local instance

    Yuri Eisen Newbie

      Hi

      This topic describes the problem and also gives solution.
      Our application will be deployed on hundreds of JBOSS machines.
      We try to use the EJB 3.0 annotations and fail to problems.
      The @Stateless bean with @RemoteBinding that deployed on many mashines can not be invoked remotely - we assign the PROVIDER_URL with Ip of remote JBOSS mashine and InitialContext is OK, also lookup return object is OK.
      But invocation of any method invokes locally.
      Deep view of JBOSS code in debug shows that default configuration of
      ejb3-interceptors-aop.xml defines IsLocalInterceptor as first interceptor to all client stacks and causes to this abnormal behaviour.

      Our solution: put additional stack definition in ejb3-interceptors-aop.xml
      and add interceptorStack parameter to @RemoteBinding annotation.

      It works.