But if you were to change the method definitions in the interfaces, you might have to modify the client code as well.Therefore, it is important that you design the interfaces and no-interface views carefully to isolate your clients from possible changes in the enterprise beans.Provided that it uses the correct protocols (SOAP, HTTP, WSDL), any web service client can access a stateless session bean, whether or not the client is written in the Java programming language.
JNDI supports a global syntax for identifying Java EE components to simplify this explicit lookup.
When you design a Java EE application, one of the first decisions you make is the type of client access allowed by the enterprise beans: remote, local, or web service.
(For more information on JAX-WS, see Chapter 28, "Building Web Services with JAX-WS".) Second, a web service client can invoke the business methods of a stateless session bean.
Message beans cannot be accessed by web service clients.
The A web service client can access a Java EE application in two ways.
First, the client can access a web service created with JAX-WS.
Not only do clean interfaces and no-interface views shield the clients from any complexities in the EJB tier, but they also allow the enterprise beans to change internally without affecting the clients.
For example, if you change the implementation of a session bean business method, you won't have to alter the client code.
Although it is uncommon, it is possible for an enterprise bean to allow both remote and local access.
If this is the case, either the business interface of the bean must be explicitly designated as a business interface by being decorated with the The no-interface view of an enterprise bean is a local view.
, using the Java Naming and Directory Interface syntax to find the enterprise bean instance.