The Web service endpoint interface is used to define the ‘Web services methods’. It is necessary for an enterprise bean that implements the Web service to implement methods having the same signature, as the methods of the Web service endpoint interface. There are a numbers of restrictions exist on which types to use as parameters and results of service endpoint interface methods. It provides the client’s view of the Web service, hiding the stateless session bean from the client. A Web service endpoint interface must conform to the rules of a JAX-RPC service definition interface. A Web service endpoint interface must conform to the following rules:
It should extend the java.rmi.Remote interface.
It must not have constant declarations, such as public, final, or static.
The methods must throw the java.rmi.RemoteException or one of its subclasses. Method parameters and return types must be supported JAX-RPC types.
For example:
Archive for the ‘ SCBCD ’ Category
What is the Web service endpoint interface?
Author: Daisy WilliamsAug 27
What is a remote client?
Author: Daisy WilliamsAug 26
A remote client is a location independent client of an enterprise bean. A client that runs in the same JVM as a bean instance uses the same API to access the bean as a client that runs in a different JVM on the same or different machine. The remote client uses a remote interface that specifies the remote business methods that a client can call on an enterprise bean. It also uses a remote home interface that specifies the methods used by remote clients for locating, creating, and removing instances of enterprise bean classes. The following are the characteristics of a remote client:
It is allowed to run on a different machine and a different Java virtual machine (JVM) than the enterprise bean it accesses.
How to build an enterprise bean that allows only local access?
Author: Daisy WilliamsAug 24
Local accessibility is the default accessibility of an enterprise bean. If the bean’s business interface is not decorated with @Local or @Remote, and the bean class does not specify the interface using @Local or @Remote, the business interface is by default a local interface. An enterprise bean that allows only local access can be created in any of the following two ways:
By annotating the business interface of the enterprise bean as a @Local interface:
@Local
public interface InterfaceName { … }
By decorating the bean class with @Local and specifying the interface name.
How to create an enterprise bean that allows remote access?
Author: Daisy WilliamsAug 23
Remote access allows an enterprise bean to run on a different machine with a different Java virtual machine (JVM). An enterprise bean that allows remote access can be created in any of the following ways:
By decorating the business interface of the enterprise bean with the @Remote annotation:
@Remote
public interface InterfaceName { … }
By decorating the bean class with @Remote, and specifying the business interface or interfaces:
@Remote(InterfaceName.class)
public class BeanName implements InterfaceName { … }