Наши услуги
Умный Дом
A client program creates a new session object when invoking a create method on a session bean home object.
Услуги нашей компании
We begin by describing the client view of an entity bean: the view seen by an application developer who uses an entity bean in a client application. Note that the client application developer is typically different from the developer—or company—that developed the bean.
An entity bean is a component that gives its client a true object-oriented abstraction of a business entity or a business process. For example, a real-life business entity may be an account, employee, customer, and so forth. A business process, on the other hand, can be the sequence involved in granting a loan approval, opening a bank account, scheduling a meeting, and so forth. When an entity bean is used to implement a business entity or a process, each individual business entity or process is represented by an entity object.
In most cases, entity beans are used with a local client view. Such entity beans are developed with local interfaces, which enable the bean to take advantage of the complete range of the EJB 2.0 and 2.1 architectural features. For example, an entity bean implemented with container-managed persistence can participate in container-managed relationships with other entity beans. With container-managed relationships, the EJB container manages the persistent relationships between entity beans much like it manages a bean's persistence.
This example illustrates the possibilities for further extending the integration of Star Enterprise's benefits enrollment system with its insurance providers' plan administration applications. Providence Health, a provider of health insurance plans, has installed in its enterprise a Web service that its clients use to access information about plan contents and costs. Star Enterprise decides to use this existing Web service and to "pull" information from Providence Health's Web service when an employee requests information about Providence Health's health plans.
Recall from the example in Chapter 8 that Star Enterprise uses a PlanEJB entity bean to store insurance plan information. This entity bean, which uses container-managed persistence, was developed by Wombat Inc. In that example, the PlanEJB bean stored its persistent state in BenefitsDatabase. We now develop an entity bean that delegates its business methods to Providence Health's Web service. This entity bean, ProvidencePlanEJB, is developed with bean-managed persistence. ProvidencePlanEJB extends PlanEJB and "wraps" the Web service from Providence Health. But first let us look at the Providence Health Web service itself.