learn more...The Java EE application program interface (API) consists of a suite of technology components and services that are used to build enterprise applications. It includes components that may be used to build presentation and business logic, APIs for managing business transactions, security and infrastructure tools to support the application operating environment, and tools for both internal and external integration. The following is a list of major technologies provided by Java EE. Enterprise Applications and Transactions Components Servlet, JavaServer Pages (JSP), Java Server Faces (JSF), and EJB are server-side components that are used to define presentation logic and business logic. HTTP The HTTP client-side API is provided by the java.net package, and the HTTP server-side API is defined using servlets and JSPs. HTTPS The same HTTP protocol runs over the SSL protocol by the same client and server API. JavaMail The mail API provides an application-level interface for application components to send Internet e-mails. Java Transaction (JTA) API The JTA API is intended to demarcate transaction boundaries between the container and the application to implement distributed transactional applications. Java Naming and Directory Interface (JNDI) JNDI API provides an application-level interface to access naming and directory services as well as a service provider interface to attach a provider of a naming and directory service. JavaBeans Activation Framework (JAF) JAF provides a framework for handling data in different Multipurpose Internet Mail Extension (MIME) types, originating in different formats and locations. Security Services Java Authorization Service Provider Contract for Container (JACC) Contract between a Java EE application server and an authorization service provider. Java Secure Socket Extension (JSSE) API for Secure Socket Layer that provides session security for data confidentiality, data integrity and server authentication. Java Cryptography Architecture (JCA) A basic framework for accessing and developing cryptographic functionality. Java Crypto Services (JCE) Cryptographic framework with advanced cryptographic functions to support multiple cryptographic service providers. CertPath or Certification Path API for creating, building, and validating digital certification paths. Java Generic Security Services Application Program Interface (JGSS) API for uniform access to security services atop a variety of underlying security mechanisms, including Kerberos, which are building blocks for single sign-on and data encryption. Integration and Interoperability Remote Method Invocation over the Internet Inter-ORB Protocol (RMIIIOP) The API allows remote Java calls using RMI over IIOP, which can access CORBA objects or services from a Java RMI application directly. Java Interface Description Language (IDL) Java IDL allows a Java EE application to act as a CORBA client to invoke external CORBA objects using the IIOP protocol. JDBC API JDBC API provides connectivity with the back-end database systems, which includes connections, connection pooling, and distributed database services. Java EE Connector Architecture Connector Architecture is a service provider interface that allows resource adapters connected to Enterprise Information Systems (EIS) or legacy systems to be plugged in to any Java EE service components. Web Services This includes API support for synchronous Web services (Java API for XML-based RPC, or JAX-RPC), asynchronous Web services (SOAP with Attachments API for Java, or SAAJ), and access to XML registry servers (Java API for XML Registries, or JAXR). JAXP provides a standard way to parse XML documents and to transform those using stylesheets. Java EE 5.0 adds simpler and broader support for Web services by introducing JAX-WS 2.0 (successor to JAX-RPC) and JAXB 2.0. Management Java EE technologies support a variety of clients, for exampleJava EE: applet, Java ME client (or mobile devices), and application clients (browsers and rich clients). These clients can access different service components provided by the Java EE via HTTP protocol or secure HTTPS protocol using Secure Socket Layer (SSL) or Transport Layer Security (TLS). The Java EE consists of the Web Container (usually implemented as a Web server) and the Enterprise Java Bean (EJB) Container (usually implemented as an application server). A .NET client can also send service requests to the Web Container or the EJB Container via a variety of interoperability options such as Web services (which interoperate with JAX-RPC) and a bridge (which interoperates with RMI-IIOP). Building Interoperable Components The following provides a brief description of these programming language elements and the underlying Java EE services: Servlets Servlets will be deployed to a "context" (a virtual name for the servlets deployed) on the local host, for example, myContextRoot, and can be invoked via the URL http://localhost:8080/myContextRoot/myServlet where myServlet is the name of the servlet. The file web.xml stores information about the servlet configuration, where the actual Java class will be referenced to a physical Java class name (in this example, myServletClass) and the URL pattern (for example, /myContextRoot). The web.xml file is a deployment file, stored in the ./WEB-INF directory of the Web server or application server. JSP Static HTML Content This is a normal HTML document, where the JSP compiler does not need compilation. Scripting Elements These are simple Java codes that are designed to handle presentation logic, rather than business logic. JSP Directives These are instructions for the JSP compiler to process, for example, to import Java classes into the page or to provide special handling instructions for the page when invoked. JSP Actions Actions are tags that control the runtime behavior of JSP and manage the responses returned to the client. Standard actions include useBean (instantiate and use the JavaBean in the JSP), include (include a file when the JSP is requested), setProperty (set the property of the JavaBean), getProperty (get the property of the JavaBean), param (provide the name and value of the parameter as additional information), forward (forward the requester to a new page), and plugin (generate client browser-specific HTML tags that result in invoking the Java Plug-in software codes). JSP Taglibs Taglibs are XML-like custom tags with optional attributes and bodies for a JSP. They can be used to perform simple data transformation, filter certain data content, or to conceal the complexity of accessing data sources and other Java objects. Using taglibs can make the processing logic more structured and easier to maintain in a single JSP and can be included in a JSP by adding a JSP directive <%@ taglib uri="/myTag" prefix="myPrefix" %>. The prefix denotes a tag library descriptor (for example, myTag.tld). The actual Java class is referenced in the web.xml with the taglib name and the physical URI location. JSF EJB There are three types of EJBs: Session Beans Session beans denote a conversation between the client application and the remote service component. When a client requests a business service by invoking a remote service component, the session bean (the remote component) replies. A stateful session bean may determine to persist the session state of the interactions or invocations between the client and the remote service components. If the session state is retained, the stateful session bean can better manage the transaction integrity or resume after the session fails over. This is usually achieved by using the container services such as Java serialization and Java reflection. A stateless session bean does not persist the session state. Entity Beans Entity beans synchronize the state with a persistence data store using the container services. In other words, business data can be persisted to the back-end database reliably and securely using entity beans. If developers explicitly design and specify how business data should be persisted in the database, then the entity bean is said to be bean-managed persistence. If developers make use of the container tools, which are provided by the application server vendor, to manage the object-relational mapping from the entity bean to the underlying relational database, then the entity bean is said to be container-managed persistence. Message Driven Beans (MDB) MDBs allow an EJB to receive a Java Message Service (JMS). In other words, an EJB can be the target of a JMS message. This can bring the benefits of providing reliable, asynchronous delivery of information from the client using JMS to the server using EJBor vice versa. Besides, MDB can be easily interoperable with other Java EE components using messaging and EJB. Java EE 5.0 introduces EJB 3.0, which uses annotation (@Stateless, @EJB) to simplify the development complexity and effort in building EJBs. Supporting Services for Interoperability Database connectivity service JDBC. Transaction management service JTA. Naming service JNDI. Communication and connectivity services HTTP, HTTPS, SSL, RMI / IIOP. Messaging service JMS, JavaMail. Among these Java EE services, the communication and connectivity services are crucial to supporting Java EE .NET interoperability using the bridge technology (such as RMI/IIOP bridge). The Messaging service is often used for synchronous and asynchronous Web services integration strategy. For example, SAAJ requires JavaMail to handle document attachments. Deploying Java EE Applications Dropping the EAR file into an auto-deploy directory (for example, %AS_HOME%\domains\domain1\autodeploy in Sun Java System Application Server where %AS_HOME% is the directory where the application server binaries reside). Using an ANT script to deploy (for example, Sun Java System Application Server uses a customized ANT script called asant). Using a Web administration console to deploy. Using a command line interface (for example, asadmin deploy in Sun Java System Application Server). Using an IDE such as NetBeans to deploy. Management of access rights for security control is very important for application deployment. The security role is defined in the application.xml file, which is a declarative security feature of the Java EE architecture. An application deployment tool will copy all EAR files to the Java EE application server, generate any necessary implementation classes and help documentation, and deploy the application EAR files to the deployment directory of the Java EE application server. After that, architects and developers need to configure the application server-specific information, such as creating data sources and connection factories and administer JMS queue names. |
||||||
Disclaimer
1) E-articles is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringement, please read the terms of service and contact us to investigate the problem.
2) E-articles is not responsible for inaccuracies, falsehoods, or any other types of misinformation this article may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here. link to this article |