apache > db
Apache DB Project
 
Font size:      

J2EE Overview

J2EE Overview

J2EE, or the Java 2 Platform, Enterprise Edition, is a standard for development of enterprise applications; one example is Enterprise Java Beans (EJBs) with distributed capabilities.

Derby Version 10 is a J2EE-conformant component in a distributed J2EE system. As such, it is one part of a larger system that includes, among other things, a JNDI server, a connection pool module, a transaction manager, a resource manager, and user applications. (Derby also supports the JTA API, which is not a current J2EE requirement, but this functionality provides another piece of the same system.) Within this system, Derby can serve as the resource manager.

For more information on J2EE, see the J2EE specification available at http://java.sun.com/j2ee/docs.html.

In order to qualify as a resource manager in a J2EE system, J2EE requires these basic areas of support:

  • JNDI support.

    Allows calling applications to register names for databases and access them through those names instead of through database connection URLs. Implementation of one of the JDBC extensions, javax.sql.DataSource, provides this support.

  • Connection pooling

    A mechanism by which a connection pool server keeps a set of open connections to a resource manager (Derby). A user requesting a connection can get one of the available connections from the pool. Such a connection pool is useful in client/server environments because establishing a connection is relatively expensive. In an embedded environment, connections are much cheaper, making the performance advantage of a connection pool negligible. Implementation of two of the JDBC extensions, javax.sql.ConnectionPoolDataSource and javax.sql.PooledConnection, provide this support.

  • XA support.

    XA is one of several standards for distributed transaction management. It is based on two-phase commit. The javax.sql.XAxxx interfaces, along with java.transaction.xa package, are an abstract implementation of XA. For more information about XA, see X/Open CAE Specification--Distributed Transaction Processing: The XA Specification, X/Open Document No. XO/CAE/91/300 or ISBN 1 872630 24 3. Implementation of the JTA API, the interfaces of the java.transaction.xa package (javax.sql.XAConnection, javax.sql.XADataSource, javax.transaction.xa.XAResource, javax.transaction.xa.Xid, and javax.transaction.xa.XAException), provide this support.

With the exception of the core JDBC interfaces, these interfaces are not visible to the end-user application; instead, they are used only by the other back-end components in the system.

Note:
For information on the classes that implement these interfaces and how to use Derby as a resource manager, see Chapter 6, "Using Derby as a J2EE Resource Manager" in the Derby Developer's Guide.

Previous Page
Next Page
Table of Contents
Index