# Using Derby as a Java EE resource manager

The Java Platform, Enterprise Edition (the Java EE platform) is a standard for development of enterprise applications based on reusable components in a multi-tier environment. In addition to the features of the Java Platform, Standard Edition (the Java SE platform), the Java EE platform adds support for Enterprise JavaBeans (EJB) technology, the Java Persistence API, JavaServer Faces technology, Java Servlet technology, JavaServer Pages (JSP) technology, and many more. The Java EE platform architecture is used to bring together existing technologies and enterprise applications in a single, manageable environment.

Derby is a Java EE platform conformant component in a distributed Java EE system. As such, Derby 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. Within this system, Derby can serve as the resource manager.

For more information on the Java EE platform, see http://www.oracle.com/technetwork/java/javaee/documentation/index.html.

Note: This section does not show you how to use Derby as a Resource Manager. Instead, it provides details specific to Derby that are not covered in the specification. This information is useful to programmers developing other modules in a distributed Java EE system, not to end-user application developers.

In order to qualify as a resource manager in a Java EE system, the Java EE platform requires three basic areas of support. These three areas of support involve implementation of APIs and are described in "Java EE Compliance: Java Transaction API and javax.sql Extensions" in the Derby Reference Manual.

This chapter describes the Derby classes that implement the APIs and provides some implementation-specific details.

- Classes that pertain to resource managers
  Derby provides two embedded variants of each DataSource interface defined by the JDBC API.
- Getting a DataSource
  Normally, you can simply work with the interfaces for javax.sql.DataSource, javax.sql.ConnectionPoolDataSource, and javax.sql.XADataSource, as shown in the following examples.
- Shutting down or creating a database
  If you need to shut down or create a database, it is easiest just to work with the Derby-specific implementations of interfaces, as shown in these examples.