Java Reference
In-Depth Information
create a new interface and add the @javax.jws.WebService annotation. The follow-
ing code snippet demonstrates this for the BidService :
@WebService
public interface BidSoapService {
List<Bid> getBids(Item item);
}
As this interface demonstrates, it's possible to selectively hide methods you don't want to
expose via web services. This interface omitted the cancelBid and addBid methods;
these methods are thus not available via SOAP web services. They're still available via the
local and remote interfaces. The @WebService annotation doesn't place any special re-
strictions on either the interface or the implementing bean. We'll discuss EJB web services
in great detail in chapter 8 .
3.2.6. Lifecycle callbacks
Stateless session beans have a very simple lifecycle—they either exist or they don't. This
lifecycle is shown in figure 3.5 . Once a bean is created, it's placed in a pool to service cli-
ent requests. Eventually a bean is destroyed, either when the load on the server decreases
or when the application is shutdown. The container does the following:
Search WWH ::




Custom Search