Sie sind auf Seite 1von 7

What makes J2EE suitable for distributed multitiered

Applications?
- The J2EE platform uses a multitiered distributed
application model. Application logic is divided into
components according to function, and the various
application components that make up a J2EE
application are installed on different machines
depending on the tier in the multitiered J2EE
environment to hich the application component
belongs. The J2EE application parts are!
"lient-tier components run on the client machine.
Web-tier components run on the J2EE server.
#usiness-tier components run on the J2EE server.
Enterprise information s$stem %E&'(-tier softare runs on the
E&' server.
What is J2EE? - J2EE is an environment for developing and
deplo$ing enterprise applications. The J2EE platform
consists of a set of services, application programming
interfaces %A)&s(, and protocols that provide the functionalit$
for developing multitiered, eb-based applications.
What are the components of J2EE application?
- A J2EE component is a self-contained functional
softare unit that is assembled into a J2EE application
ith its related classes and files and communicates ith
other components. The J2EE specification defines the
folloing J2EE components!
Application clients and applets are client components.
Java 'ervlet and Java'erver )ages technolog$ components
are eb components.
Enterprise Java#eans components %enterprise beans( are
business components.
*esource adapter components provided b$ E&' and tool
vendors.
What do Enterprise Java#eans components contain? -
Enterprise Java#eans components contains #usiness code,
hich is logic
that solves or meets the needs of a particular business domain
such as banking, retail, or finance, is handled b$ enterprise
beans running in the business tier. All the business code is
contained inside an Enterprise #ean hich receives data from
client programs, processes it %if necessar$(, and sends it to
the enterprise information s$stem tier for storage. An
enterprise bean also retrieves data from storage, processes it
%if necessar$(, and sends it back to the client program.
&s J2EE application onl$ a eb-based? - +o, &t depends on
t$pe of application that client ants. A J2EE application can
be eb-based or non-eb-based. if an application client
e,ecutes on the client machine, it is a non-eb-based J2EE
application. The J2EE application can provide a a$ for
users to handle tasks such as J2EE s$stem or application
administration. &t t$picall$ has a graphical user interface
created from 'ing or AWT A)&s, or a command-line
interface. When user re-uest, it can open an .TT)
connection to establish communication ith a servlet running
in the eb tier.
Are Java#eans J2EE components? - +o. Java#eans
components are not considered J2EE components b$ the
J2EE specification. The$ are ritten to manage the data flo
beteen an application client or applet and components
running on the J2EE server or beteen server components
and a database. Java#eans components ritten for the J2EE
platform have instance variables and get and set methods for
accessing the data in the instance variables. Java#eans
components used in this a$ are t$picall$ simple in design
and implementation, but should conform to the naming and
design conventions outlined in the Java#eans component
architecture.
&s .T/0 page a eb component? - +o. 'tatic .T/0 pages
and applets are bundled ith eb components during
application assembl$, but are not considered eb
components b$ the J2EE specification. Even the server-side
utilit$ classes are not considered eb components, either.
What can be considered as a eb component? - J2EE Web
components can be either servlets or J') pages. 'ervlets are
Java programming language classes that d$namicall$ process
re-uests and construct responses. J') pages are te,t-based
documents that e,ecute as servlets but allo a more natural
approach to creating static content.
What is the container? - "ontainers are the interface beteen
a component and the lo-level platform specific functionalit$
that supports the component. #efore a Web, enterprise bean,
or application client component can be e,ecuted, it must be
assembled into a J2EE application and deplo$ed into its
container.
What are container services? - A container is a runtime
support of a s$stem-level entit$. "ontainers provide
components ith services such as lifec$cle management,
securit$, deplo$ment, and threading.
What is the eb container? - 'ervlet and J') containers are
collectivel$ referred to as Web containers. &t manages the
e,ecution of J') page and servlet components for J2EE
applications. Web components and their container run on the
J2EE server.
What is Enterprise Java#eans %EJ#( container? - &t manages
the e,ecution of enterprise beans for J2EE applications.
Enterprise beans and their container run on the J2EE server.
What is Applet container? - &/anages the e,ecution of
applets. "onsists of a Web broser and Java )lugin running
on the client together.
.o do e package J2EE components? - J2EE components
are packaged separatel$ and bundled into a J2EE application
for deplo$ment. Each component, its related files such as 1&2
and .T/0 files or server-side utilit$ classes, and a
deplo$ment descriptor are assembled into a module and
added to the J2EE application. A J2EE application is
composed of one or more enterprise bean,Web, or application
client component modules. The final enterprise solution can
use one J2EE application or be made up of to or more J2EE
applications, depending on design re-uirements. A J2EE
application and each of its modules has its on deplo$ment
descriptor. A deplo$ment descriptor is an 3/0 document
ith an .,ml e,tension that describes a component4s
deplo$ment settings.
What is a thin client? - A thin client is a lighteight interface
to the application that does not have such operations like
-uer$ databases, e,ecute comple, business rules, or connect
to legac$ applications.
What are t$pes of J2EE clients? - 2olloing are the t$pes of
J2EE clients!
Applets
Application clients
Java Web 'tart-enabled rich clients, poered b$ Java Web
'tart technolog$.
Wireless clients, based on /obile &nformation 5evice )rofile
%/&5)( technolog$.
What is deplo$ment descriptor? - A deplo$ment descriptor is
an E,tensible /arkup 0anguage %3/0( te,t-based file ith
an .,ml e,tension that describes a component4s deplo$ment
settings. A J2EE application and each of its modules has its
on deplo$ment descriptor. 2or e,ample, an enterprise bean
module deplo$ment descriptor declares transaction attributes
and securit$ authori6ations
for an enterprise bean. #ecause deplo$ment descriptor
information is declarative, it can be changed ithout
modif$ing the bean source code. At run time, the J2EE server
reads the deplo$ment descriptor and acts upon the component
accordingl$.
What is the EA* file? - An EA* file is a standard JA* file
ith an .ear e,tension, named from Enterprise A*chive file.
A J2EE application ith all of its modules is delivered in
EA* file.
What is JTA and JT'? - JTA is the abbreviation for the Java
Transaction A)&. JT' is the abbreviation for the Jave
Transaction 'ervice. JTA provides a standard interface and
allos $ou to demarcate transactions in a manner that is
independent of the transaction manager implementation. The
J2EE '57 implements the transaction manager ith JT'.
#ut $our code doesn4t call the JT' methods directl$. &nstead,
it invokes the JTA methods, hich then call the loer-level
JT' routines. Therefore, JTA is a high level transaction
interface that $our application uses to control transaction. and
JT' is a lo level transaction interface and e8b uses behind
the scenes %client code doesn4t directl$ interact ith JT'. &t is
based on ob8ect transaction service%9T'( hich is part of
"9*#A.
What is JA3)? - JA3) stands for Java A)& for 3/0. 3/0
is a language for representing and describing te,t-based data
hich can be read and handled b$ an$ program or tool that
uses 3/0 A)&s. &t provides standard services to determine
the t$pe of an arbitrar$ piece of data, encapsulate access to it,
discover the operations available on it, and create the
appropriate Java#eans component to perform those
operations.
What is J2EE "onnector? - The J2EE "onnector A)& is used
b$ J2EE tools vendors and s$stem integrators to create
resource adapters that support access to enterprise
information s$stems that can be plugged into an$ J2EE
product. Each t$pe of database or E&' has a different resource
adapter. +ote! A resource adapter is a softare component
that allos J2EE application components to access and
interact ith the underl$ing resource manager. #ecause a
resource adapter is specific to its resource manager, there is
t$picall$ a different resource adapter for each t$pe of
database or enterprise information s$stem.
What is JAA)? - The Java Authentication and Authori6ation
'ervice %JAA'( provides a a$ for a J2EE application to
authenticate and authori6e a specific user or group of users to
run it. &t is a standard )luggable Authentication /odule
%)A/( frameork that e,tends the Java 2 platform securit$
architecture to support user-based authori6ation.
What is Java +aming and 5irector$ 'ervice? - The J+5&
provides naming and director$ functionalit$. &t provides
applications ith methods for performing standard director$
operations, such as associating attributes ith ob8ects and
searching for ob8ects using their attributes. :sing J+5&, a
J2EE application can store and retrieve an$ t$pe of named
Java ob8ect. #ecause J+5& is independent of an$ specific
implementations, applications can use J+5& to access
multiple naming and director$ services, including e,isting
naming and
director$ services such as 05A), +5', 5+', and +&'.
What is 'truts? - A Web page development frameork.
'truts combines Java 'ervlets, Java 'erver )ages, custom
tags, and message resources into a unified frameork. &t is a
cooperative, s$nergistic platform, suitable for development
teams, independent developers, and ever$one beteen.
.o is the /;" design pattern used in 'truts frameork? -
&n the /;" design pattern, application flo is mediated b$ a
central "ontroller. The "ontroller delegates re-uests to an
appropriate handler. The handlers are tied to a /odel, and
each handler acts as an adapter beteen the re-uest and the
/odel. The /odel represents, or encapsulates, an
application4s business logic or state. "ontrol is usuall$ then
forarded back through the "ontroller to the appropriate
;ie. The forarding can be determined b$ consulting a set
of mappings, usuall$ loaded from a database or configuration
file. This provides a loose coupling beteen the ;ie and
/odel, hich can make an application significantl$ easier to
create and maintain. "ontroller! 'ervlet controller hich
supplied b$ 'truts itself< ;ie! hat $ou can see on the
screen, a J') page and presentation components< /odel!
'$stem state and a business logic Java#eans.

Das könnte Ihnen auch gefallen