Категории

Архив

Корзина пуста...

Container artifacts

These are the additional classes that the EJB container generates to manage the session bean at runtime and to support the distributed object protocol.

Читать подробнее

Инсталляция

A stateless session bean typically implements a procedural service on top of a database or legacy application.

Читать подробнее

Developing a New Web Service

With either approach, you ultimately obtain a set of service endpoint interfaces for the Web service that you are developing. The service endpoint interface contains the business methods that you need to implement in the stateless session bean class. There will be one stateless session bean for each service endpoint interface.

The stateless session bean implementation class is implemented using the same programming model as described in previous chapters. There is only one restriction: if the bean does not have home and component interfaces—local or remote—then the getEJBObject/getEJBLocalObject and getEJBHome/getEJBLocalHome methods of the SessionContext interface should not be invoked. Of course, in special cases, a stateless session bean may have a Web service endpoint interface as well as remote or local home and component interfaces, in which case this restriction does not apply. One new method on the SessionContext interface is the getMessageContext method. This method returns a JAX-RPC SOAPMessageContext object, from which the bean can access the SOAP message that was sent by the client to get access to headers and other information not available from other method parameters.

For more advanced uses, a bean may also provide JAX-RPC Handler classes. Handlers are like interceptors that have access to the low-level SOAP messages. The handler's handleRequest method is invoked by the container after receiving the SOAP request message but before invoking the bean's business method. The handler's handleResponse method is invoked by the container after the bean's business method completes but before sending the SOAP response message back to the client. A handler may examine, modify, add, or remove SOAP headers in the request or response messages. Examples of handler use include getting security information such as principal names and credentials; encrypting or signing message bodies; specifying transaction context, and so forth. Handlers may set properties in the JAX-RPC MessageContext, and these properties can be obtained by the stateless session bean class. Refer to the JAX-RPC tutorial, which is part of the Java™ Web Services Tutorial, at http:/java.sun.com/webservices for more information on programming handlers.

Ваш комментарий

Введите число с картинки: