Remote interface client view

5 March 2012 By Nithya Vasudevan 1,855 views No Comment
0 Flares Twitter 0 Facebook 0 Google+ 0 0 Flares ×
  • A remote client of a session bean can be another enterprise bean deployed in the same or different container; or it can be an arbitrary Java program, such as an application, applet, or servlet.
    • For example, EJB deployed in JBoss container and servlet client deployed in Tomcat.
  • In EJB 3.x, a remote client accesses a session bean through the bean’s remote business interface.
  • The remote client view of an enterprise bean is location independent. A client running in the same JVM uses the same API to access the bean as a client running in a different JVM on the same or different machine.
  • The arguments and results of the methods of the remote business interface are passed by value.
  • To provide a remote interface view for the client, the business interface of the bean should be annotated with @Remote.

import javax.ejb.Remote;

public interface HelloWorld {
	String sayHello();

Tags: , , , ,