J2EE APIs
An Enterprise JavaBeans (EJB) component
or enterprise bean is a body of code with fields and methods
to implement modules of business logic. You can think of an enterprise bean as
a building block that can be used alone or with other enterprise beans to
execute business logic on the J2EE server.
There are three kinds of
enterprise beans: session beans, entity beans, and message-driven beans.
Enterprise beans often interact with databases. One of the benefits of entity
beans is that you do not have to write any SQL code or use the JDBC API directly
to perform database access operations; the EJB container handles this for you.
However, if you override the default container-managed persistence for any
reason, you will need to use the JDBC API. Also, if you choose to have a
session bean access the database, you have to use the JDBC API.
The JDBC API lets you
invoke SQL commands from Java programing language methods. You use the JDBC API
in an enterprise bean when you override the default container-managed
persistence or have a session bean access the database. With container-managed
persistence, database access operations are handled by the container, and your
enterprise bean implementation contains no JDBC code or SQL commands. You can
also use the JDBC API from a servlet or JSP page to access the database
directly without going through an enterprise bean.
The JDBC API has two
parts: an application-level interface used by the application components to
access a database, and a service provider interface to attach a JDBC driver to
the J2EE platform.
Java Servlet technology
lets you define HTTP-specific servlet classes. A servlet class extends the
capabilities of servers that host applications accessed by way of a
request-response programming model. Although servlets can respond to any type
of request, they are commonly used to extend the applications hosted by Web
servers.
JavaServer Pages (JSP) technology lets
you put snippets of servlet code directly into a text-based document. A JSP
page is a text-based document that contains two types of text: static template
data, which can be expressed in any text-based format such as HTML, WML, and
XML, and JSP elements, which determine how the page constructs dynamic content.
The Java Message Service
(JMS) is a messaging standard that allows J2EE application components to
create, send, receive, and read messages. It enables distributed communication
that is loosely coupled, reliable, and asynchronous. For more information on
JMS, see the online Java Message Service Tutorial:
The Java Naming and
Directory Interface (JNDI)
provides naming and directory functionality. It provides applications with
methods for performing standard directory operations, such as associating
attributes with objects and searching for objects using their attributes. Using
JNDI, a J2EE application can store and retrieve any type of named Java object.
Because JNDI is
independent of any specific implementations, applications can use JNDI to
access multiple naming and directory services, including existing naming and
directory services such as LDAP, NDS, DNS, and NIS. This allows J2EE
applications to coexist with legacy applications and systems. For more
information on JNDI, see the online JNDI Tutorial:
The Java Transaction API
(JTA) provides a standard interface for demarcating transactions. The J2EE
architecture provides a default auto commit to handle transaction commits and
rollbacks. An auto commit means that any other applications viewing data will
see the updated data after each database read or write operation. However, if
your application performs two separate database access operations that depend
on each other, you will want to use the JTA API to demarcate where the entire
transaction, including both operations, begins, rolls back, and commits.
J2EE applications can
use the JavaMail API to send
e-mail notifications. The JavaMail API has two parts: an application-level
interface used by the application components to send mail, and a service
provider interface. The J2EE platform includes JavaMail with a service provider
that allows application components to send Internet mail.
The JavaBeans Activation
Framework (JAF) is included because JavaMail uses it. It provides standard
services to determine the type of an arbitrary piece of data, encapsulate
access to it, discover the operations available on it, and create the
appropriate JavaBeans component to perform those operations.
The Java API for XML
Processing (JAXP) supports the processing of XML documents using Document
Object Model (DOM), Simple API for XML Parsing (SAX), and XML Stylesheet
Language Transformation (XSLT). JAXP enables applications to parse and
transform XML documents independent of a particular XML processing
implementation.
JAXP also provides
namespace support, which lets you work with schemas that might otherwise have
naming conflicts. Designed to be flexible, JAXP lets you use any XML-compliant
parser of XSL processor from within your application and supports the W3C
schema. You can find information on the W3C schema at this URL: http://www.w3.org/XML/Schema
.
The Java API for XML
Registries (JAXR) lets you access business and general-purpose registries over
the Web. JAXR supports the ebXML Registry/Repository standards and the emerging
UDDI specifications. By using JAXR, developers can learn a single API and get
access to both of these important registry technologies.
Additionally, businesses
submit material to be shared and search for material that others have
submitted. Standards groups have developed schemas for particular kinds of XML
documents, and two businesses might, for example, agree to use the schema for
their industry's standard purchase order form. Because the schema is stored in
a standard business registry, both parties can use JAXR to access it.
The Java API for
XML-based RPC (JAX-RPC) uses the SOAP standard and HTTP so client programs can
make XML-based remote procedure calls (RPCs) over the Internet. JAX-RPC also
supports WSDL so you can import and export WSDL documents. With JAX-RPC and a
WSDL, you can easily interoperate with clients and services running on
Java-based or non-Java-based platforms such as .NET. For example, based on the
WSDL document, a Visual Basic .NET client can be configured to use a Web
service implemented in Java technology or a Web service can be configured to
recognize a VB NET client.
JAX-RPC relies on the
HTTP transport protocol. Taking that a step further, JAX-RPC lets you create
service applications that combine HTTP with a Java technology version of the
Secure Socket Layer (SSL) and Transport Layer Security (TLS) protocols to
establish basic or mutual authentication. SSL and TLS ensure message integrity
by providing data encryption with client and server authentication
capabilities.
Authentication is a
measured way to verify whether a party is eligible and able to access certain
information as a way to protect against the fraudulent use of a system and/or
the fraudulent transmission of information. Information transported across the
Internet is especially vulnerable to being intercepted and misused, so
configuring a JAX-RPC Web service to protect data in transit is very important.
The SOAP with
Attachments API for Java (SAAJ) is a low-level API upon which JAX-RPC depends.
It enables the production and consumption of messages that conform to the SOAP
1.1 specification and SOAP with Attachments note. Most developers will not use
the SAAJ API, but will use the higher-level JAX-RPC API instead.
The J2EE Connector
architecture is used by J2EE tools vendors and system integrators to create
resource adapters that support access to enterprise information systems that
can be plugged into any J2EE product. A resource adapter is a
software component that allows J2EE application components to access and
interact with the underlying resource manager. Because a resource adapter is
specific to its resource manager, there is typically a different resource
adapter for each type of database or enterprise information system.
JAX-RPC and the J2EE
Connector Architecture are complementary technologies for enterprise
application integration (EAI) and end-to-end business integration.
The J2EE Connector
Architecture also provides a performance-oriented, secure, scalable, and
message-based transactional integration of J2EE-based Web services with
existing EISs that can be either synchronous or asynchronous. Existing
applications and EISs integrated through the J2EE Connector Architecture into
the J2EE platform can be exposed as XML-based Web services using JAX-RPC and
J2EE component models.
The Java Authentication
and Authorization Service ("JAAS") provides a way for a J2EE application
to authenticate and authorize a specific user or group of users to run it.
JAAS is a Java
programing language version of the standard Pluggable Authentication Module
(PAM) framework that extends the Java 2 Platform security architecture to
support user-based authorization.
The J2EE platform is a
platform-independent, full systems integration solution that creates an open
marketplace in which every vendor can sell to every customer. Such a
marketplace encourages vendors to compete, not by trying to lock customers into
their technologies but by trying to outdo each other by providing products and
services that benefit customers, such as better performance, better tools, or
better customer support.
- The J2EE APIs enable systems and applications integration through the following:
- Unified application model across tiers with enterprise beans
- Simplified response and request mechanism with JSP pages and servlets
- Reliable security model with JAAS
- XML-based data interchange integration with JAXP
- Simplified interoperability with the J2EE Connector Architecture
- Easy database connectivity with the JDBC API
- Enterprise application integration with message-driven beans and JMS, JTA, and JNDI
For All java Online classes Training Classes.. Contact : training@virtualnuggets.com
No comments:
Post a Comment