Simple Web Profile Application Server
Gurkan Erdogdu looks at the world of Web Profile, and Java EE projects within the ASF.
The Java EE 6 Web Profile specification defines the Java EE Web Profile (“Web Profile”), a profile of the Java Platform, Enterprise Edition specifically targeted at web applications. Siwpas, (Simple Web Profile Application Server) is an application server aimed at implementing the Java EE Web Profile specification. In this article, the components of Siwpas, its current state and the level of compatibility regarding the Web Profile Specification will be discussed.
Java Enterprise Edition (Java EE or formerly known as Java 2 Platform, Enterprise Edition or J2EE) is an enterprise platform for developing highly available, secure, reliable and scalable business applications. The Java EE platform has undergone several changes from its first release version J2EE 1.2 (December 12, 1999). The latest version of the specification is Java Platform, Enterprise Edition (Java EE) Specification, v6. In this white paper, Java EE and Java Platform, Enterprise Edition (Java EE) Specification, v6 will be used interchangebly. The Java EE Specification defines “Java EE Profiles”. A Java EE profile (simply “a profile”) represents a configuration of the platform suited to a particular class of applications.
“Java EE Web Profile” is a “Java EE Profile” that consists of several independent specifications related to web application development. Siwpas is an open source (LGPL license) application server based on Apache Software Foundation (ASF) Java EE projects. The latest version of Siwpas is “CR-5” and the first commerical quality version is planned to be released at the end of March. This white paper has been organized as follows: Java EE Web Profile section gives some details about Web Profile. The next section talks about the ASF and its Java EE based projects. The MechSoft Siwpas section explains the components of Siwpas and its compatibility regarding the Web Profile specification. This white paper ends with Summary and References sections.
Java EE 6 Web Profile
The Java EE Platform Specification consists of a huge number of specifications (APIs). For platform provider companies, it is not easy to develop a fully compliant Java EE Platform that implements all of the required components of the Java EE Platform Specification. For application developers, it is not necessary to use all of the Java EE APIs for developing enterprise applications. Because of these observations, the Java EE Expert Group (EG) has defined Profiles in Java EE v6 and the first standard profile has been defined, “Java Platform, Enterprise Edition 6 (Java EE 6) Web Profile Specification”.
The Web Profile is aimed at developers of modern web applications. Aiming “modern” web applications then implies offering a reasonably complete stack, composed of standard APIs, and out-of-the-box capability to address the needs of a large class of web applications. Furthermore, this stack should be easy to grow, so as to address any remaining developer needs. The Web Profile stack has consisted of several technologies. Table 1 shows the Web Profile required components. Java web applications are generally written as 3-tiers. These tiers are “Web Tier”, “Business Tier ” and “Persistence Tier”. Each of the Web Profile component sits on these tiers as follows:
• Web Tier: Servlet, Java Server Pages, Debugging Support for Other Languages, Standard Tag Library for JSP, Java Server Faces.
• Business Tier: Enterprise Java Beans Lite, Persistence Tier, Java Persistence API
Some of the components are used for general functionality. These components and their functions are as follows:
• Common Annotations for the Java Platform: This JSR will develop annotations for common semantic concepts in the J2SE and J2EE platforms that apply across a variety of individual technologies:
• Java Transaction API: Transaction management and demarcation
• Bean Validation: Management of business constraints
• Managed Beans: Common lifecycle of managed beans
• Interceptors: Aspect Oriented Programming (AOP) operations
• Context and Dependency Injection for Java EE: Dependency injection for Java EE
• Dependency Injection for Java: Dependency injection for standard Java
As we know, the Java EE Web Profile is a subset of the Java EE Platform specification. Lots of Java EE Platform specification required components are not contained in the Java EE Web Profile. For exampe, these are components that not defined for the Java EE Web Profile specification: JAX-WS, JAX-RPC, JAX-R, SAAJ, JAX-RS, JAX-B, JMS, JAAS, JASPIC, JACC, JCA, JavaMail, JSR77, JSR88. Finally, it is worth remembering that Web Profile products are allowed to ship with additional technologies, to the required ones. It is conceivable that products will offer choices during installation between different configurations, some richer in extensions, or even allow for complete customization beyond the required core (“à la carte” installation).
Apache EE Projects
The Apache Software Foundation provides organizational, legal, and financial support for a broad range of open source software projects. The Foundation provides an established framework for intellectual property and financial contributions that simultaneously limits the contributors’ potential legal exposure. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users. The pragmatic Apache License makes it easy for all users, commercial and individual, to deploy Apache products.
In Siwpas, we use ASF Java EE projects for satisfying Java EE Web Profile required components. These projects and their correspondence to Web Profile components are shown below.
With the exception of the Apache OpenEJB project, each of the above ASF projects is standalone compatible with TCK (Technology Compatibility Kit). In other words, Tomcat 7, MyFaces 2, OpenWebBeans, Bean Validation and OpenJPA are TCK compliant projects on their own.
EJB Lite container in Siwpas is a subset of the Apache OpenEJB project and is called a Siwpas EJB Lite Container. Currently Siwpas EJB Lite Container has not been tested with EJB 3 Lite TCK.
Mechsoft Siwpas Application Server
Siwpas (pronounced as Simple Web Profile Application Server) is a lightweight Java application server platform for developing enterprise quality Java EE web applications. Siwpas integrates above ASF Java EE based projects for providing a Java EE Web Profile compatible runtime platform Integrating different sets of projects on the same runtime is not an easy task . MechSoft has been writing an integration layer component to integrate Apache Tomcat 7 runtime with Siwpas EJB 3.1. Lite container runtime.
Moreover, a cool web based management console for managing all aspects of Siwpas has been written. The Siwpas management console will be released with the 1.0.0 GA release of Siwpas and provides the following management operations:
• Overall realtime view of the current running system: CPU, Memory, OS, JVM Heap size
• Server configuration
• Applications view and deployment operations
• JMX, JNDI and ClassLoader views
• Web and EJB Container runtime status
• And more…
Figure 2 shows a sample snapshot view from Siwpas console “Applications View” page.
Why Siwpas, why another server?
Before Siwpas was developed, Apache OpenWebBeans (implementation of Context and Dependency Injection for Java EE Specification) and Apache OpenEJB were used in some commercial projects, but we wanted to use a lightweight application server in a cloud infrastructure. At that time there was no open source application server for using the OpenWebBeans and the OpenEJB in a lightweight server runtime. Therefore it was decided to implement a lightweight server based on Apache Tomcat 7.
Nowadays, a huge number of application developers and enterprise companies want to use lightweight application servers for deploying and running their web applications. They do not want to use heavyweight Java EE Servers that are fully compliant with Java EE Specifications. They want to manage lightweight, cloud environment friendly servers. Nonetheless, they also need more technology stack for implementing their web based applications, such as “JPA, JSF, JTA , EJB etc.” Moreover, most of them deploy their critical enterprise web applications into the Apache Tomcat in their production systems.
Siwpas is aimed at providing a lightweight application server runtime based on Apache Tomcat 7 . It also fills web applications technology requirements via ASF Java EE projects. In summary, Siwpas translates Apache Tomcat 7 into a more powerful enterprise web server.
The benefits of using Siwpas can be listed as follows:
• It has a lightweight but powerful runtime environment
• It is based on the very-well known JSP & Servlet Container, Apache Tomcat 7
• It consists of Web Profile Specification technology stack
• It consists of powerful, commerical quality ASF Java EE Projects
• It is an open source project
• It is supported by MechSoft (7×24 enterprise support)
• It is light and will be always light
• It has a very cool JSF based administration console
Web Profile Compliance
Currently Siwpas does not claim compliance with Java EE Web Profile Specification because it has not been tested with Java EE Web Profile TCK. This does not mean that Siwpas will never be certified as a Web Profile Compliance application server. In order to test Siwpas with Java EE Web Profile TCK, MechSoft has to be a licensee of Oracle and we are discussing a reasonable way to obtain this TCK. As mentioned in the above paragraphs, with the exception of Apache OpenEJB, ASF Java EE projects are TCK compliant with their respective specificiations.
There are two different editions of Siwpas: Community Edition and Enterprise Edition. The table below shows differences between each edition.
The Java EE Web Profile Specification is the first standard profile specification in the Java EE Profiles that is explained in the Java EE Platform Specification. Instead of using full profile compatible Java EE servers, developers are now able to use more lightweight server runtimes for developing their Java based web applications. This does not mean that full profile application servers such as Apache Geronimo will be useless. Some enterprise applications still need to use other cool features of the Java EE full profile, such as Remote EJB Invocation, Asynchronous Message Processing via JMS, CORBA Integration etc. In an upcoming version of the Java EE platform, a number of more specific profiles can be seen. Siwpas is a lightweight web application server based on the ASF Java EE projects. It provides Java EE Web Profile components with a powerful web based administration console. It is one of the lightweight application servers to implement Java EE Web Profile Specification.