3 Replies Latest reply on Nov 18, 2009 7:30 AM by wolfgangknauf

    Remote and local interface on same ejb instance

    zlajaj

      Hi,

      Is ti posible to get remote and local interface on same ejb instance.
      For example get local ejb bean on server and than pass it as remote to client.
      Both local and remote interfaces must operate on the same ejb bean instance.

      Thanks
      Zlaja

        • 1. Re: Remote and local interface on same ejb instance
          jaikiran

          Sorry, but i did not understand your question. Can you please elaborate on what you are doing?

          • 2. Re: Remote and local interface on same ejb instance
            zlajaj

            Thanks for reply

            I have three stateful beans A,B and C. Beans B and C are parts of A bean and A bean access it through local interface. Is ti posible to create remote interface for same instances, B and C beans, and delegate it to remote client.

            This means thath both clients, A bean and remote client, operate on same bean instance.




            Thanks
            Zlaja

            • 3. Re: Remote and local interface on same ejb instance
              wolfgangknauf

              Hi,

              do you mean something like this?

              @Stateless
              public class ABean implements ARemote
              {
               //Access B and C through local interface?
               @EJB
               private BBean;
              
               @EJB
               private CBean;
              }
              
              
              @Remote
              public interface ARemote
              {
              }
              
              
              @Stateless
              public class BBean implements BLocal
              {
              }
              
              
              @Local
              public interface BLocal
              {
              }
              
              @Stateless
              public class CBean implements CLocal
              {
              }
              
              
              @Local
              public interface CLocal
              {
              }
              


              If not, please modify my sample. Currently, I don't get your question ;-).

              Best regards

              Wolfgang