Download "user manual"

Transcript
JavaBeans
JavaBeans are an architecture developed by Sun Microsystems, Inc. describing
an API and a set of conventions for reusable, Java-based components. Code
written to Sun’s JavaBeans architecture is called JavaBeans or just beans.
Beans are recommended for use in conjunction with servlets and JSPs in the
following ways:
򐂰 As the client interface to the Model layer. An Interaction Controller servlet will
use this bean interface.
򐂰 As the client interface to other resources. In some cases this may be
generated for you by a tool.
򐂰 As a component that incorporates a number of property-value pairs for use by
other components or classes. For example, the JavaServer Pages
specification includes a set of tags for accessing JavaBeans properties.
Enterprise JavaBeans
Enterprise JavaBeans is Sun's trademarked term for its EJB architecture (or
component model). When writing to the EJB specification, you are developing
enterprise beans (or, if you prefer, EJBs).
Enterprise beans are distinguished from JavaBeans in that they are designed to
be installed on a server, and accessed remotely by a client. The EJB framework
provides a standard for server-side components with transactional
characteristics. The EJB developer specifies the required transactional and
security characteristics of an EJB in a deployment descriptor (this is sometimes
referred to as declarative programming). In a separate step, the EJB is then
deployed to the EJB container provided by the application server vendor of your
choice.
There are three types of Enterprise JavaBeans:
򐂰 Session beans
򐂰 Entity beans
򐂰 Message-driven beans
The J2EE 1.3 platform requires support for EJB 2.0. As a tool provider,
WebSphere Application Server V5.0 supports J2EE 1.3 and therefore supports
EJB 2.0. EJBs are packaged into EJB modules (JAR files) and then combined
with Web modules (WAR files) to form an enterprise application (EAR file). EJB
deployment requires generating EJB deployment code specific to the target
application server.
Chapter 7. Technology options
123