background image

Java Persistence API

<< Java API for XML Registries | Sun Java SystemApplication Server Platform >>
<< Java API for XML Registries | Sun Java SystemApplication Server Platform >>

Java Persistence API

Java Persistence API
The Java Persistence API is a Java standards-based solution for persistence. Persistence uses an
object-relational mapping approach to bridge the gap between an object oriented model and a
relational database. Java Persistence consists of three areas:
The Java Persistence API
The query language
Object/relational mapping metadata
Java Naming and Directory Interface
The Java Naming and Directory Interface
TM
(JNDI) provides naming and directory
functionality, enabling applications to access multiple naming and directory services, including
existing naming and directory services such as LDAP, NDS, DNS, and NIS. 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 Java EE
application can store and retrieve any type of named Java object, allowing Java EE applications
to coexist with many legacy applications and systems.
Java EE naming services provide application clients, enterprise beans, and web components
with access to a JNDI naming environment. A naming environment allows a component to be
customized without the need to access or change the component's source code. A container
implements the component's environment and provides it to the component as a JNDI naming
context.
A Java EE component can locate its environment naming context using JNDI interfaces. A
component can create a javax.naming.InitialContext object and looks up the environment
naming context in InitialContext under the name java:comp/env. A component's naming
environment is stored directly in the environment naming context or in any of its direct or
indirect subcontexts.
A Java EE component can access named system-provided and user-defined objects. The names
of system-provided objects, such as JTA UserTransaction objects, are stored in the
environment naming context, java:comp/env. The Java EE platform allows a component to
name user-defined objects, such as enterprise beans, environment entries, JDBC DataSource
objects, and message connections. An object should be named within a subcontext of the
naming environment according to the type of the object. For example, enterprise beans are
named within the subcontext java:comp/env/ejb, and JDBC DataSource references in the
subcontext java:comp/env/jdbc.
Java Authentication and Authorization Service
The Java Authentication and Authorization Service (JAAS) provides a way for a Java EE
application to authenticate and authorize a specific user or group of users to run it.
Java EE 5 APIs
The Java EE 5 Tutorial · September 2007
62