1 Reply Latest reply on Mar 31, 2005 3:42 AM by Mario Winterer

    Can a local interface extend a remote interface?

    Keyur Shah Newbie

      Will this work? If it works, is it a good pattern to follow?:

      @Remote
      public interface MyRemote {
       RemoteableObject getRemoteableObject();
      }
      
      @Local
      public interface MyLocal extends MyRemote {
       LocalObject getLocalObject();
      }
      
      @Stateless
      public class MyEJB implements MyLocal, MyRemote {
      ...
      }
      

      MyEJB implementing MyRemote is redundant, but doing it this way will ensure that the container automatically creates local and remote JNDI bindings