We all heard about the innovations of EE 6 platform. We read about the servlet 3.0 spec, about the EJB3.1, about JAX-RS, about CDI, about JPA 2.0 and JSF 2.0. But what do we know about JSR-316, the JSR behind the JEE 6 platform itself?
Basically this spec is talking about the general things in the platform, such as security, transaction, profiles and so on, but if you look at the download page of JSR-316 you see 3 different specification documents:
1. Java EE 6 Specification.
2. Java EE Web Profile Specification.
3. Java EE 6 Managed Beans Specification.
The first 2 specs are well known (to me at least), for there were some talks about them on the blog-sphere. On the other hand the Managed Beans thing is new to my eyes.. So lets understand what each document is talking about...
Java EE 6 Specification is the general document that is talking about the EE platform:
1. The first meaningful chapter is an introduction to the platform. It talks about general architecture, containers and the role of application servers in general. It also mentions key components and apis of the platform, these are not new to EE 6 but they are inseparable from it (for example the JMS, JPA, JNDI etc..). Another thing that is explained here is the roles of the different parties such as application server vendors, developers, deployers, tool providers and system administrators.
2. Next chapter talking about security, which is a common component to some main specs such as EJB and Servlet containers.
3. The next chapters are talking about transaction management, resources, namings (JNDI) and dependency injection. All these are cross cutting issues that many components and apis are usign in this way or another.
4. Following is the most interesting chapter for developers. It's called application programming interface (API) and is basically explaining the various apis that are part of the platform, what the aim of each api, and what problems they are solving and how. There no deep dive into the apis. Just a general summaries.
5. Then we have a boring interoperability chapter and application assembly and deployment chapters, which i find quite fascinating. Don't know why but i just love all the packaging and deployment issues.
6. And now comes the new kid on the block, the profiles. This chapter is explaining the philosophy behind profiles, and defines some rules that must apply to any profile that is created (via a different specification documents). In short, what happened here is that the vendors of the EE platform (IBM, ORACLE, JBOSS and many others) were (and still are) expected to implement the whole EE spec. This includes many technologies and many specs, with the respect and backward comparability to previous versions of the platform. For example, to implement EE6 IBM will have to work very hard to provide application server which implements all the specs. It takes many ears to produce a mature working implementation of EE server. So, The profiles were introduced, to make life easier. The web profile for example is just a subset of technologies which needed to help developers write web based application. We usually don't need iteration with messaging systems when writing a simple web application. So only technologies that are related to the web will be inside the web profile. This will help the vendors to produce some functionality faster. The first profile that is introduced is the WEB profile, which has it's own document as part of JSR-316, we will dive into it shortly..
7. After the profiles chapter nothing interesting pops up, some chapters about Application clients, service providers and migration from older platform issues.
So to summarize the first document in the EE spec , it talks about the cross platform issues such as naming, security, assembly and deployment, development model and transaction management as well as the newly introduced features such as profiles (the spec defines what will be common to all defined profiles, for example) .
Java EE Web Profile Specification is a small spec which basically defines the subset of technologies and specs needed for the EE 6 web profile. These are the required components on the Web Profile:
•Servlet 3.0
•JavaServer Pages (JSP) 2.2
•Expression Language (EL) 2.2
•Debugging Support for Other Languages (JSR-45) 1.0
•Standard Tag Library for JavaServer Pages (JSTL) 1.2
•JavaServer Faces (JSF) 2.0
•Common Annotations for Java Platform (JSR-250) 1.1
•Enterprise JavaBeans (EJB) 3.1 Lite
•Java Transaction API (JTA) 1.1
•Java Persistence API (JPA) 2.0
•Bean Validation 1.0
•Managed Beans 1.0
•Interceptors 1.1
•JSR-299 1.0
•JSR-330 1.0
Java EE 6 Managed Beans Specification. As said before i don't know a lot about this spec, if we look inside the document we can see the flowing introduction "Managed Beans are container-managed objects with minimal requirements, otherwise known under the acronym “POJOs” (Plain Old Java Objects). They support a small set of basic services, such as resource injection, life cycle callbacks and interceptors. Other, more advanced, aspects will be introduced in companion specifications, so as to keep the basic model as simple and as universally useful as possible." I guess that this introduction explains everything, now lets look deeper inside the spec.. Actually the spec is pretty shell, it defines the annotation for the managed bean and two life cycle annotations, Post Construct and Pre destroy. Another thing is that these beans can use is injected resources and interceptors as defined each in their own specification. The last thing is the extension specs. Basically as i understand this, this spec will be extended by other specs, providing a powerful component model for the EE platform. The only question that left is why so many component models?? We have the EJB, We have the JSFs Manages Beans and now we will have the extended Managed Beans? Oh well..
Tuesday, December 8, 2009
Subscribe to:
Post Comments (Atom)

The J2EE Deployment API Specification Proposed Final Draft is available for download. JSR 88 describes an open standard for deploying J2EE applications to a J2EE platform. This API allows any tool to deploy J2EE applications to any J2EE platform.
ReplyDelete