Containers provide underlying services to their deployed components. As a developer, you can concentrate on implementing business logic rather than solving technical problems faced in enterprise applications. This pic shows you the services provided by each container. For example, web and EJB containers provide connectors to access EIS, but not the applet container or the ACCs. Java EE offers the following services:

  • JTA: This service offers a transaction demarcation API used by the container and the application. It also provides an interface between the transaction manager and a resource manager at the Service Provider Interface (SPI) level.
  • JPA: Standard API for object-relational mapping (ORM). With its Java Persistence Query Language (JPQL), you can query objects stored in the underlying database.
  • JMS: JMS allows components to communicate asynchronously through messages.It supports reliable point-to-point (P2P) messaging as well as the publish-subscribe (pub-sub) model.
  • Java Naming and Directory Interface (JNDI): This API, included in Java SE, is used to access naming and directory systems. Your application uses it to associate (bind) names to objects and then to find these objects (lookup) in a directory. You can look up datasources, JMS factories, EJBs, and other resources. Omnipresent in your code
    until J2EE 1.4, JNDI is used in a more transparent way through injection.
  • JavaMail: Many applications require the ability to send e-mails, which can be implemented through use of the JavaMail API.
  • JavaBeans Activation Framework (JAF): The JAF API, included in Java SE, provides a framework for handling data in different MIME types. It is used by JavaMail.
  • XML processing: Most Java EE components can be deployed with optional XML deployment descriptors, and applications often have to manipulate XML documents. The Java API for XML Processing (JAXP) provides support for parsing documents with SAX and DOM APIs, as well as for XSLT. The Streaming API for XML (StAX) provides a pull-
    parsing API for XML.
  • JCA: Connectors allow you to access EIS from a Java EE component. These could be databases, mainframes, or Enterprise Resource Planning (ERP) programs.
  • Security services: Java Authentication and Authorization Service (JAAS) enables services to authenticate and enforce access controls upon users. The Java Authorization Service Provider Contract for Containers (JACC) defines a contract between a Java EE application server and an authorization service provider, allowing custom authorization
    service providers to be plugged into any Java EE product.
  • Web services: Java EE provides support for SOAP and RESTful web services. The Java API for XML Web Services (JAX-WS), replacing the Java API for XML-based RPC (JAX-RPC), provides support for web services using the SOAP/HTTP protocol. The Java API for RESTful Web Services (JAX-RS) provides support for web services using the REST style.
  • Management: Java EE defines APIs for managing containers and servers using a special management enterprise bean. The Java Management Extensions (JMX) API is also used to provide some management support.
  • Deployment: The Java EE Deployment Specification defines a contract between deployment tools and Java EE products to standardize application deployment.

Advertisements