Wednesday May 30, 2012

Transactional Interceptors in Java EE 7 - Request for feedback

Linda described how EJB's container-managed transactions can be applied to the Java EE 7 platform as a whole using a solution based on CDI interceptors. This can then be used by other Java EE components as well, such as Managed Beans.


The plan is to add an annotation and standardized values in the javax.transaction package. For example:

@Target({TYPE, METHOD})
public @interface Transactional {
   TxType value() default TxType.REQUIRED

And then this can be specified on a class or a method of a class as:

public class ShoppingCart {
   public void checkOut() {...}

This interceptor will be defined as part of the update to Java Transactions API spec at

The Java EE 7 Expert Group needs your help and looking for feedback on the exact semantics. The complete discussion can be read here. Please post your feedback to and we'll also consider comments posted to this entry.

Wednesday Apr 25, 2012

Java EE 7 Platform Early Draft Specification Now Available

The Java EE 7 Platform Expert Group has released an Early Draft of the specification. The Appendix EE.B describe all the changes in this version. The associated Web Profile Early Draft is released as well and the Appendix WP.A.1 describe the changes from previous versions.

Following the JCP 2.8 transparency rules, the progress can be monitored at and feedback provided at users@javaee-spec.

The following individual components have also released their Early Drafts:

Spring to Java EE 6 Articles

David Heffelfinger's 4-part article series on Spring to Java EE 6 migration published the last part. The part 1, part 2 and part 3 takes a sample Spring application and builds it using java EE 6. It even compares the generated WAR files and LoC in XML configuration in the two environments.


Here are some other blogs/articles that cover the topic:

What are you reasons for migrating from Spring to Java EE 6 ? Let us know.

Tuesday Apr 24, 2012

Server Side Events with HTML 5 and GlassFish

While this is not the first post on Server Side Events,  Bhakti and Jitu continue the discussion of using Server-Side Events (SSE) as HTML 5, Java EE 7, and GlassFish Server move full steam ahead.

The blog posts include example source code that can be deployed to recent (trunk) builds of GlassFish Server.  Bhakti uses SSE and CDI to build an application that tracks a twitter search, while Jitu discusses how GlassFish adds a bit more abstraction for the developer and references a video player sample application available in the GlassFish trunk.

Monday Apr 23, 2012

Expression Language 3.0 / JSR 341 Early Draft Now Available

Expression Language (EL) has been a separate specification since JSP 2.0 but still part of the same JSR. The JSR 341 places EL in a separate specification. The Expert Group released Expression Language 3.0 Early Draft is now posted for a formal review.

Some of the main goals of the JSR are to separate ELContext into parsing and evaluation contexts, adding operators like equality, string concatenation, etc, and integration with CDI such as generating events before/during/after the expressions are evaluated.


Download the Early Draft and and follow the updates at For more information about EL 3.0 (JSR 341), check out the JSR project on The archives of EG discussion are available at jsr341-experts and you can subscribe to the users@el-spec and other aliases on the Mailing Lists page.

Thursday Apr 19, 2012

Java EE Brings Power to the POJO

Enterprise Java Beans (EJBs) have come a long way in since J2EE 1.4.  Beginning with Java EE 5, building transactional, secure, message-oriented, and persistence-aware business components has become significantly simpler. EJBs have become annotated Java objects, where  annotations enhance the features of the POJO thanks to integrated JSRs like EJB 3.1, Bean Validation, Interceptors, Contexts and Dependency Injection, Expression Language, JAX-RS Java Persistence Architecture, and more.  Let's not forget convention over configuration!

Thanks to some "house cleaning", Container Managed Persistence (CMP) and Bean Managed Persistence (BMP) have been deprecated.  While still supported in Java EE 6, vendors have the option of not supporting BMP/CMP in the future Java EE 7 release.  If your applications use BMP/CMP, it is time to investigate the much simpler Java EE 6 programming model! Along these lines, here are some resources to help you out.

Cheng Fang has a post on remote EJB invocation using GlassFish, where one EJB can invoke another EJB across JVMs. This is a recommended read if you are building distributed applications or integrating multiple business systems.

Learning about EJBs is as easy as picking up the Java EE 6 Tutorial, the EJB 3.1 Cookbook, or Enterprise JavaBeans 3.1.  More generically, check out Adam Bien's books on Java EE, which cover EJBs as well.

Tuesday Apr 17, 2012

WebSockets and Java EE 7: JSR 356 Starting Up

Java API for WebSocket (aka JSR 356) will define a standard API for creating WebSocket applications. The Expert Group consists of RedHat, Google, Caucho, VMWare and other individuals like JeanFrancois Arcand and Justin Lee.


GlassFish has support for WebSocket using Grizzly on server and client for some time. The JSR will provide standards-based code to write WebSocket applications.

Danny Coward has started websocket-spec and you can read the EG discussions at jsr356-experts. The users@websocket-spec allows you to participate in the discussion. Of course, all this will be delivered as part of Java EE 7 which is now scheduled for Q2 2013.

How are you using WebSocket ? Would you like to join the EG and contribute ?

Monday Apr 16, 2012

Hitachi Cosminexus v9.0 - 14th Java EE 6 Compliant Server

We now have a new Java EE 6 product in the family - HItachi uCosminexus Application Server V9.0. They provide full Java EE 6 platform compliance.

Hitachi Logo

The detailled tested configuration for this product should sound pretty familiar to readers with components such as EclipseLink, Weld, and Metro.

This brings the total number of Java EE 6 compliant application servers to 14. Which one are you using for deploying your enterprise applications ?

Tuesday Apr 10, 2012

Java EE 6 and Maven 3 using CLI

NetBeans and Eclipse provide tools, templates, wizards and code generators for building a Java EE 6 application. They both also allow a Java EE 6 Maven project to be created. In his recent screencast, Adam Bien explained how a Java EE 6 project can be easily created at command-line using Maven 3.

Java EE 6 using Maven 3 Screencast

The screencast walks through the process of creating the project using command-line. The created project has no dependency on NetBeans and GlassFish but can still be opened in NetBeans and deployed on GlassFish.

A complete list of Adam's screencasts are available here. Tons of similar videos are also available on GlassFishVideos channel.

Sunday Apr 08, 2012

Unlock the Java EE 6 Platform using NetBeans 7.1

NetBeans IDE provide tools, templates, and code generators that can be used for the specifications that are part of the Java EE 6 Platform.

Key to the Platform

In a recent article Geertjan builds a simple end-to-end application using the standard Model-View-Controller architecture. It uses Java Persistence API 2, Servlets 3, JavaServer Faces 2, Enterprise Java Beans 3.1, Context and Dependency Injection 1.0, and Java API for RESTful Web Services 1.1 showing the complete stack.

A self-paced and an extensive hands-on lab covering this article and much more is also available here. A video (47-minutes) explaining how to build a similar application can be viewed here.

Friday Apr 06, 2012

Tab Sweep: FacesMessage enhancements, Look up thread pool resources, JQuery/JSF integration, Galleria, ...

Recent Tips and News on Java, Java EE 6, GlassFish & more :

Radio Receiver

Fixing remote GlassFish server errors on NetBeans (Igor Cardoso)
FacesMessage Enhancements (PrimeFaces)
How to create and look up thread pool resource in GlassFish (javahowto)
Jersey 1.12 is released (Jakub Podlesak)
VisualVM problem connecting to monitor Glassfish (Raymond Reid)
JSF 2.0 JQuery-JSF Integration (John Yeary)
JDBC-ODBC Bridge Example (John Yeary)
The Java EE 6 Example - Gracefully dealing with Errors in Galleria - Part 6 (Markus Eisele)
Logout functionality in Java web applications (JavaOnly)
Java User Groups Promote Java Education ( Editor's Daily Blog)
JavaEE Revisits Design Patterns: Aspects (Interceptor) (Developer Chronicles)
Java EE 6 Hand-on Workshop @ IIUI (Shahzad Badar)
javaee6-crud-example (Arjan Tims)
Sample CRUD application with JSF and RichFaces (Mark van der Tol)
5 useful methods JSF developers should know (Java Code Geeks)

Here are some tweets from this week ...

Almost 9000 Parleys views at the #JavaEE6 #Devoxx talk I did with @BertErtman. Not even made available for free yet! #JavaEE6 is hot :-)
Sent three proposals for Øredev, about #JavaEE6, #OSGi and a case study about Leren-op-Maat (OSGi in the cloud) together with @m4rr5
[blog] The Java EE 6 #Example - Gracefully dealing with #Errors in #Galleria - Part 6 #javaee6
Tomorrow, there is a session about Java EE6 #javaee6 at islamia university #bahawalpur under #pakijug.about 150 students going to attend it.

Wednesday Apr 04, 2012

JSF 2.2 Update from Ed Burns

In a recent interview the JavaServer Faces specification lead, Ed Burns, gave an update on JSF 2.2. This is a required component of the Java EE 7 platform.

The work is expected to wrap up by CY 2012 and the schedule is publicly available. The interview provide an update on how Tenant Scope from CDI and multi-templating will be included. It also provide details on which HTML 5 content categories will be addressed.

Ed Burns

The EG discussions are mirrored at jsr344-experts@javaserverfaces-spec-public. You can also participate in the discussion by posting a message to users@javaserverfaces-spec-public. All the mailing lists are open for subscription anyway and JIRA for spec provide more details about features targeted for the upcoming release.

A blog at J-Development provide complete details about the new features coming in this version. And an Early Draft of the specification is available for some time now.

Thursday Mar 29, 2012

Migrating Spring to Java EE 6 Article Series at OTN - Part 3

The spring season is characterized by migration of birds, whales, butterflies, frogs, and other animals for different reasons. If you use Spring framework and are interested in migrating to a standards-based Java EE platform, for whatever reason, then we have a solution for you.


David Heffelfinger's, a renowned author and an ardent Java EE fan, has published third part of Spring to Java EE migration series at OTN. The article series takes a typical Spring application and shows how to migrate it to Java EE 6 using NetBeans.

This new part builds upon part 1 and part 2 and also compares the generated WAR files and LoC in XML configuration in the two environments. There is an interesting discussion on Why Java EE 6 over Spring ? as well.

Tuesday Mar 27, 2012

JavaOne Japan, Russia, and India Coming Up


As mentioned earlier, regional JavaOne conferences are just around the corner. More details are available and listed below:

JavaOne Tokyo (Japan)
Date: April 4-5, 2012
Location: Academy Hills 49F, Roppongi Tokyo
Event Web site : Japanese | English

JavaOne Moscow (Russia)
Date: April 17-18, 2012
Location: Russian Academy of Sciences
Event Web site : Russian | English

JavaOne Hyderabad (India)
Date: May 3-4, 2012
Location: Hyderabad International Convention Center
Event Web site : English

We're looking forward to meeting you at one of those events to chat anything Java EE and GlassFish!

By the way, the Call for Papers for JavaOne 2012 San Francisco is closing on April 9th so make sure to submit your talk today.