Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3939

Remote client is able to access bean with Local interface

XMLWordPrintable

    • Hide

      Create local business interface
      @Local
      public interface HelloWorld {
      String sayHello();
      }

      Create bean implementation,

      @Stateless
      public class HelloWorldBean implements HelloWorld {
      public HelloWorldBean() {
      }
      public String sayHello()

      { return "Hello World !!!"; }

      }

      Deploy and create client according to this documentation, https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI

      Add reqd jars and run the client. It works for both @Local and @Remote.

      But it should NOT work for @Local.

      Show
      Create local business interface @Local public interface HelloWorld { String sayHello(); } Create bean implementation, @Stateless public class HelloWorldBean implements HelloWorld { public HelloWorldBean() { } public String sayHello() { return "Hello World !!!"; } } Deploy and create client according to this documentation, https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI Add reqd jars and run the client. It works for both @Local and @Remote. But it should NOT work for @Local.

      The remote client is able to access bean with local client view. Should the container not prevent this access?

      Please see steps to reproduce.

              jaikiran Jaikiran Pai (Inactive)
              macpraveen Praveen M (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: