⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 2.mht

📁 Enterprise Java Bean的PPT文档,很好的东西.
💻 MHT
📖 第 1 页 / 共 5 页
字号:
access enterprise beans running in the business tier. But if there is =
need for a=20
web client it can open an HTTP connection to establish communication =
with a=20
servlet running in the Web tier.</P>
<P><FONT color=3D#800000><I>Note: If required, a command line interface =
can be=20
used. </I></FONT></P>
<H3>Web Components :</H3>
<P>J2EE Web components can be either servlets or JSP pages. Servlets are =
Java=20
programming language classes that dynamically process requests and =
construct=20
responses. JSP pages are text-based documents that execute as servlets =
but allow=20
a more natural approach to creating static content. HTML pages and =
applets are=20
bundled with Web components during application assembly, but are not =
considered=20
Web components by the J2EE specification. Similarly, server-side utility =
classes=20
can also be bundled with Web components like HTML pages, but are not =
considered=20
Web components by the J2EE specification. Shown below in figure is Web=20
components communication.</P>
<P><IMG height=3D326=20
src=3D"http://www.tusc.com.au/tutorial/images/chap2/WebComponetsCommunica=
tion.png"=20
width=3D693 align=3Dleft border=3D0 name=3DGraphic4><BR clear=3Dleft>The =
Web tier might=20
include a JavaBeans component to manage the user input and send that =
input to=20
enterprise beans running in the business tier for processing as shown =
above in=20
the figure.. </P>
<H3>Business Components :</H3>
<P>Business code, which is logic that solves or meets the needs of a =
particular=20
business domain such as banking, retail, or finance, is handled by =
enterprise=20
beans running in the business tier. </P>
<P><IMG height=3D320=20
src=3D"http://www.tusc.com.au/tutorial/images/chap2/BusinessComponetsComm=
unication.png"=20
width=3D689 align=3Dleft border=3D0 name=3DGraphic5><BR clear=3Dleft>The =
figure above=20
shows communication with business components, where an enterprise bean =
receives=20
data from client programs, processes it (if necessary), and sends it to =
the=20
enterprise information system tier for storage. An enterprise bean also=20
retrieves data from storage, processes it (if necessary), and sends it =
back to=20
the client program. </P>
<P>There are three kinds of enterprise beans: session beans (stateless =
and=20
stateful), entity beans (bean managed and container managed), and =
message-driven=20
beans. A session bean represents a transient conversation with a client. =
When=20
the client finishes executing, the session bean and its data are gone. =
In=20
contrast, an entity bean represents persistent data stored in one row of =
a=20
database relation/table. If the client terminates or if the server shuts =
down,=20
the underlying services ensure that the entity bean data is saved. A=20
message-driven bean combines features of a session bean and a Java =
Message=20
Service (JMS) message listener, allowing a business component to receive =
JMS=20
messages asynchronously.</P>
<P><FONT color=3D#800000><I>Note : Java Beans are not considered J2EE =
components=20
by the J2EE specification as JavaBeans are different from Enterprise =
Beans.=20
JavaBeans component architecture can be used in both server and client =
tiers to=20
manage the communication between an application client or applet and =
components=20
running on the J2EE server or between server components and a database, =
whereas=20
Enterprise JavaBeans components are only used in the business tier as a =
part of=20
the server tier. JavaBeans have instance variables and has an accessor =
and=20
mutator methods to access properties of bean or say, accessing the data =
in the=20
instance variables which simplifies the design and implementation of =
JavaBeans=20
components.</I></FONT></P>
<P>Enterprise Information System Tier :</P>
<P>The enterprise information system tier handles enterprise information =
system=20
software and includes enterprise infrastructure systems such as =
enterprise=20
resource planning (ERP), mainframe transaction processing, database =
systems, and=20
other legacy information systems. J2EE application components might need =
access=20
to enterprise information systems for database connectivity. </P>
<H3>J2EE Containers :</H3>
<P>J2EE containers provide access to the underlying services of the J2EE =
Server=20
environment via containers for different types of components. =
Traditionally,=20
application developers have to write code for handling transaction, =
state=20
management, multithreading, resource pooling etc. Now the J2EE container =

provides these services allowing you to concentrate on solving business=20
problems.</P>
<P>Containers are the interface between a component and the low-level=20
platform-specific functionality that supports the component. For =
example, before=20
a Web, enterprise bean, or application client component can be executed, =
it must=20
be assembled into a J2EE application and deployed into its container. =
</P>
<P>The assembly process involves specifying container settings for each=20
component in the J2EE application and for the J2EE application itself. =
Container=20
settings customize the underlying support provided by the J2EE server, =
which=20
includes services such as Java Naming and Directory Interface, security, =

transaction management etc.</P>
<P>The J2EE server provides Enterprise JavaBeans (EJB) and Web =
containers. EJB=20
container manages the execution of enterprise beans for J2EE =
applications,=20
whereas Web container manages the execution of JSP page and servlet =
components=20
for J2EE applications. Other than these two containers there are an =
Application=20
client container and Applet container, which are not part of J2EE server =
as=20
these reside on the client's machine as shown below. </P>
<P><IMG height=3D275=20
src=3D"http://www.tusc.com.au/tutorial/images/chap2/ContainersUsedInJ2EE.=
png"=20
width=3D694 align=3Dleft border=3D0 name=3DGraphic6><BR clear=3Dleft>An =
Application client=20
container manages the execution of application client components whereas =
an=20
Applet container manages the execution of applets. These are typically =
the JRE=20
(Java Runtime Environment) and a Java-enabled Web browser =
respectively.</P>
<P><BR><BR></P>
<H3>Packaging :</H3>
<P>In order to deploy a J2EE application, after developing different =
components,=20
it is packaged into special archive files that contain the relevant =
class files=20
and XML deployment descriptors. These XML deployment descriptors contain =

information specific to each bundled component and are a mechanism for=20
configuring application behavior at assembly or deployment time. These =
are=20
bundled into different archive types for different component types.</P>
<P>Web components are archived in Web Archive (.war) file which contains =

servlets, JSP and static components such as HTML and image files. The =
.war file=20
contains classes and files used in web tier along with a Web component=20
deployment descriptor.</P>
<P>Business components are archived in Java Archive (.jar) file which =
contains=20
an EJB deployment descriptor, remote, and object interface files along =
with=20
helper files required by EJB component.</P>
<P>Client side class files and deployment descriptors are archived in =
Java=20
Archive (.jar) file which make up the client application.</P>
<P>J2EE application is bundled in an Enterprise Archive (.ear) file =
which=20
contains the whole application along with deployment descriptor that =
provides=20
information about the application and its assembled components. </P>
<P><IMG height=3D473=20
src=3D"http://www.tusc.com.au/tutorial/images/chap2/J2EEPackaging.png" =
width=3D683=20
align=3Dleft border=3D0 name=3DGraphic7><BR clear=3Dleft><BR><BR></P>
<H3>J2EE Platform Roles :</H3>
<P>Building the different components of a J2EE application involves =
various=20
roles in the development, deployment and management of an enterprise=20
application.</P>
<P>The application component provider develops the reusable components =
of J2EE=20
application, which can be Web components, enterprise beans, applets, or=20
application clients for use in J2EE applications. </P>
<P>The application assembler takes all building blocks from the =
application=20
component provider and combines them into J2EE applications.</P>
<P>The deployer is responsible for the installation/deployment of =
components in=20
a J2EE environment or J2EE server.</P>
<P>The system administrator is responsible for configuration and =
administration=20
of computing systems in an enterprise.</P>
<P>The tool provider is a vendor used to develop, package and deploy =
J2EE=20
applications. </P>
<P><FONT color=3D#800000><I>Note : All these above mentioned roles can =
be assigned=20
to a person or an organization.</I></FONT></P>
<H3>Distributed Architecture in J2EE :</H3>
<P>All the J2EE applications implement a distributed architecture. In =
this an=20
object is associated with a name, where names are provided by naming =
service, by=20
advertising to various components and resolving client references to =
these=20
service components as shown in figure below.</P>
<P><IMG height=3D360=20
src=3D"http://www.tusc.com.au/tutorial/images/chap2/DistributedSystems.pn=
g"=20
width=3D688 align=3Dleft border=3D0 name=3DGraphic8><BR clear=3Dleft>As =
a result of that,=20
object references are obtained, by looking up for an object by its =
advertised=20
name, once found, reference is obtained, and then carry out the =
necessary=20

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -