Thursday Jul 31, 2014

Java EE @ NFJS Lone Star Software Symposium Austin

As some of you may be aware, I recently joined the well-respected US based No Fluff Just Stuff (NFJS) Tour. The NFJS series Lone Star Software Symposium was held July 18 - 20 in Austin, Texas. The Austin show is one of the smaller ones but still was good overall. It is one of the few events of it's kind that take place this part the country so it is extremely important.

I had three talks total over two days, more or less back-to-back. I had decent attendance for all my sessions and had many of the same folks staying for multiple sessions which is always a very good sign. I did talks on Java EE 7/Java EE 8, the Cargo Tracker Java EE Blue Prints and JMS 2. More details, including slide decks and code as well as my NFJS tour schedule, posted on my personal blog.

Wednesday Jul 30, 2014

Spotlight on GlassFish 4.1: #3 Changing the release number

'Spotlight on GlassFish 4.0.1' is a series of posts that highlights specific enhancements of the upcoming GlassFish 4.0.1 release. It could be a new feature, a fix, a behavior change, a tip, etc.

#3 Changing the release number
Originally, the upcoming release of GlassFish was going to be called GlassFish 4.0.1 as it was mostly focused on fixing issues. But based on its actual content, we decided that calling it 4.1 would make more sense and reflect more the scope of this release:
  • Support for Java SE 8 
  • Support for Java EE 7 specifications that had a Maintenance Release : CDI 1.2, WebSocket 1.1 and their respective implementations, Weld and Tyrus.
  • Updated implementations of Jersey, Grizzly, Mojarra, EclipseLink, HK2, Metro, Open MQ, EL, Derby, JavaMail, etc.
  • And some of those implementations brings additional capabilities to GlassFish (e.g. Jersey brings OAuth support)
  • Several hundreds of fixes!
  • An updated version of the Java EE 7 Tutorial
Changing a version number during a release stabilization phase is a bit tricky but we decided it was worth the effort (and the risk!). So please bare with us for as the build infrastructure is being updated to reflect this change! Everything should be back onto track in a day or two.

Tuesday Jul 29, 2014

Java API for WebSocket 1.1

Java API for WebSocket (JSR 356) is going through the JCP maintenance release process as it enters today the Maintenance Review Ballot. This ballot will end in a week on August 4. 

The proposed changes are relatively limited but are nevertheless important. In the current specification (1.0), the issue is located in the Session.addMessageHandler(MessageHandler) method which is forcing implementations to get the generic type of the message handler instance. And in some cases, that approach can be problematic (e.g. with lambda based message handler).

To solve this, the 1.1 version of the JSR 356 specification introduces 2 new addMessageHandler() methods (and keep the existing method for backward compatibility). For the complete descriptions of the issue and the 2 new methods, check here.

If everything goes well (i.e. Maintenance Review Ballot passed in time), Tyrus (JSR 356 Reference Implementation) will be updated to reflect those changes and should be integrated in the upcoming GlassFish 4.1 release.

Monday Jul 28, 2014

David Blevins' Java EE Sessions at JavaOne 2014

For the Java EE track at JavaOne 2014 we are highlighting some key sessions and speakers to better inform you of what you can expect, right up until the start of the conference.

To this end we recently interviewed David Blevins. Although not as well known as some of the other folks in the Java EE community, David has been instrumental in the ecosystem for a very long time. He has been the powerhouse developer behind the innovative OpenEJB project and a key committer on many other Java EE related Apache projects including OpenWebBeans. Over the years he has ardently advocated for Java EE and directly contributed to many Java EE expert groups including EJB 3.1, EJB 3.2, Java EE 6 and Java EE 7. More recently he launched Apache TomEE - a project that turns the Tomcat vs Java EE debate on it's head by creating a Java EE certified application server squarely focused on Tomcat users. David is also a JavaOne Rock Star. We are very honored to have David speak at JavaOne and interview him on his sessions this year:

David has several key sessions on the track:

  • Java EE Game Changers: It never fails to surprise me how many pretty intelligent folks still associate Java EE with J2EE (a technology now more a decade in the past). Many of these folks don't realize just how much has changes especially since Java EE 6 and certainly as of Java EE 7 and beyond. This session is primary geared towards these folks and outlines why Java EE and the JCP today is a fundamental game changer. You probably should attend even if you are already a Java EE fan - besides covering key evolutions David will also cover forward looking ideas that are on his keen radar to keep moving the platform forward.
  • Apache TomEE, Java EE Web Profile, and More on Tomcat: If you are a current Tomcat user curious about Java EE, this is a session you shouldn't miss. Using live coding, David will show exactly how the real world Java EE development experience using TomEE looks like. He will also explain the fundamental value proposition of Java EE/TomEE and explain some of the technical details of how TomEE is made possible. 
  • Java EE 8 Community Update and Panel: This panel is intended to be an open forum for discussing Java EE 8. The panel consists of both some implementors like David/TomEE and some key independent folks in the community. The panel will be moderated by my colleague Bruno Borges. The idea is to encourage panelists to interact with each other and the audience - so bring your questions, comments and ideas!

Besides David's sessions, we have a very strong program for the Java EE track and JavaOne overall - just explore the content catalog. If you can't make it, you can be assured that we will make key content available after the conference just as we have always done.

The early bird offer for JavaOne expires August 1st so if you plan to come to JavaOne it would be wise to register early now and save some money for yourself or your organization. I certainly hope to see you there.

Friday Jul 25, 2014

Using Server-Sent Events (SSE) with Nothing More Than Servlet

As many of you know, HTML 5 Server-Sent Events (SSE) stands between the two extremes of completely stateless REST/HTTP and fully bidirectional WebSocket. It is a relatively simple mechanism that allows for sending data from the server to the client once a connection is established via plain HTTP. An interesting side-effect of this basic simplicity is you could conceivably use SSE with nothing more than the plain Servlet API. The downside of taking this approach is that you don't have the much higher level, easier to use specialized APIs for SSE such as the ones long included in Jersey (and now being proposed as part of Java EE 8).

The GlassFish team's own Shing Wai Chan explores the idea of using SSE from plain Servlets in an excellent recent post. The post is a very good way of understanding how SSE actually works under the hood. Besides demonstrating the basics of SSE from an HTTP perspective, the post also shows the JavaScript SSE API available on the browser as well as using the Servlet 3 async API and Java EE 7 concurrency utilities with Servlet based SSE.

Thursday Jul 24, 2014

Servlet 4.0

The Servlet API is one of the most used API, if not the most used API of the Java EE Platform! It was revised for Java EE 7, Servlet 3.1 (JSR 340) added quite some new capabilities such as support for the HTTP 1.1 upgrade mechanism (required for supporting WebSocket for example), non-blocking asynchronous IO, various security related improvements and so on. Shing Wai Chan (Spec Lead of Servlet 3.1) has just posted a draft proposal for the Servlet 4.0 JSR.

Moving from 3.1 to 4.0 clearly means that this will be a major revision of the Servlet specification and it has a key theme, i.e. HTTP/2. It will be the first new version of the HTTP protocol since the current version (HTTP 1.1) which was standardized ... end of the last century (RFC 2616)! HTTP/2 will bring many improvements over HTTP/1.x. In his draft proposal, Shing Wai lists the HTPP/2 features that he expects to be exposed by the Servlet 4.0 API:

  • Request/Response multiplexing
  • Stream Prioritization
  • Server Push
  • Upgrade from HTTP 1.1 

HTTP 1.x is a fairly simple request/response protocol. Things will probably change with HTTP/2 multiplexing capabilities, so some of the paradigms we know since years will have to evolve too! And since it is not a small task to drive a major evolution of such an important API, Ed Burns will help Shing Wai and will co-lead this JSR with him.

HTTP/2 will be the key theme of Servlet 4.0 but the Expert Group will probably tackle additional capabilities.

In terms of timing, we expect Java EE 8 to support Servlet 4.0 but there is a constraint: HTTP/2 itself! At this stage, HTTP/2 is still in active development. It is however expected to be completed well in advance of the completion date of Java EE 8. In his proposal Shing Way explains why it is now relatively safe to consider adding HTTP/2 support to the Servlet API.

So make sure to check the Servlet 4.0 draft JSR proposal and give your feedback before the proposal is submitted to the JCP.

PS: you can now follow @Servlet_Spec on Twitter! 
PPS: feedback can be sent to the Servlet Spec User mailing list (registration is only required to post to the list, not to read it)

Wednesday Jul 23, 2014

Adam Bien's Java EE Sessions at JavaOne 2014

For the Java EE track at JavaOne 2014 we will highlight some key sessions and speakers to better inform you of what you can expect.

To this end we recently interviewed none other than Adam Bien. In the very unlikely case that you don't know who Adam is he is a key Java EE advocate, independent consultant, Java EE expert member, highly popular speaker, blogger and author. To add to Adam's extensive credentials he is also a Java Champion, Top Java Ambassador and JavaOne Rock Star. Few folks have done as much to advocate Java EE as Adam has, especially in Germany and Europe. We are very honored to have Adam speak at JavaOne and interview him on his sessions this year:

Adam has several key sessions on the track:

  • Unorthodox Enterprise Practices: Modern Java EE aside, server-side Java is certainly not a new technology. Over the years server-side Java development has picked up the clutter of many outdated practices and patterns. In this live coding session Adam attempts to remove some of that clutter by demonstrating first hand just how lean and lightweight Java EE 7 applications should be. Many of the practices he demonstrates are from the real world projects in his highly successful consulting practice.
  • Enterprise Nashorn: As some of you may be aware, Nashorn is the brand new JavaScript engine included in  JDK 8. In this session Adam demonstrates some innovative uses of Nashorn with Java EE 7 applications.
  • Java EE 8 Community Update and Panel: This panel is intended to be an open forum for discussing Java EE 8. The panel consists of both some vendors and key folks in the community like Adam. The panel will be moderated by my colleague Bruno Borges. The idea is to encourage panelists to interact with each other and the audience.

Adam also has a session titled Productive JavaFX 8. In this session he discusses ideas like integrating JavaFX with Java EE 7 and Java SE 8. If you are already a Java EE fan or still just evaluating, you will be well-served to attend Adam's sessions at JavaOne. In the months running up to JavaOne we hope to highlight a few more key folks and sessions, so do stay tuned.

The early bird offer for JavaOne now expires August 1st so if you plan to come to JavaOne it would be wise to register early and save some money for yourself or your organization. I certainly hope to see you there.

Tuesday Jul 22, 2014

JavaServer Faces 2.3 (JSF 2.3)

Ed Burns (Specification Lead of JSF 2.2 - JSR 344) has just posted a draft JSR proposal for JavaServer Faces 2.3. Manfred Riem will help Ed to drive JSF forward. If you have been involved in the JSF community, you should know Manfred already as he is very active in that community!

The exact content of this JSR will discussed and agreed by the Expert Group but Ed is suggesting some initial ideas such as Multi-field validation, EL performance optimizations and cross-form Ajax clarifications.

As mentioned in the previous post, CDI is becoming increasingly important across the Java EE platform. @Inject FacesContext and ‘Ajax method invocation’ are two of the features that Ed is proposing to improve the CDI / JSF integration.  ‘Ajax method invocation’ is a feature that would allow invoking CDI managed bean methods directly from Ajax, allowing the response to be sent using JSON.

It should be noted that previous versions of JSF intentionally lagged one version behind the Java EE version in which it was bundled (e.g. JSF 2.2 is part of Java EE 7 but it also works on top of Java EE 6). This release plans to abandon this approach in favor of being able to leverage platform features from Java EE 8 and Java SE 8.

So if you have any feedback before the JSF 2.3 JSR proposal is submitted to the JCP, now is the time to raise your voice! 

Thursday Jul 17, 2014

Contexts and Dependency Injection for Java 2.0 (CDI 2.0)

CDI (Context and Dependency Injection) is a 'recent' specification. CDI 1.0 has been introduced in Java EE 6 and has been slightly revised (CDI 1.1) for Java EE 7. In just a few years, CDI has become a key technology for the Java EE platform. CDI is becoming increasingly important as different parts of the platform are leveraging CDI more and more (e.g. JTA 1.2 @Transactional, Beans Validation 1.1 method level validations, etc.). And it is expected that CDI adoption within Java EE will only continue to grow as, for example, some upcoming Java EE 8 specifications are considering leveraging CDI too (e.g. JMS 2.1). 

Red Hat, the CDI Specification Lead, has just submitted to the JCP a JSR proposal for CDI 2.0. CDI 2.0 would be a major evolution of the current CDI specification, with 2 main focus : Java SE support and modularity.
  • Java SE support : Define the behaviour of CDI in a pure Java SE environment. 
  • Modularity : Define a granular, modular CDI model to help other Java EE specifications to better integrate with it. This would also probably be useful when CDI will be used in a pure Java SE context.
CDI 2 will be targeted for inclusion in Java EE 8. The Java SE features of CDI 2.0 would work on Java SE 8. In terms ot timing, CDI 2.0 is aligned with the current Java EE 8 roadmap. The CDI 2.0 JSR proposal will soon be posted on the JCP site for a 2 weeks JSR review period, the JSR approval ballot should then follow. 

In the meantime, you can read the CDI 2.0 JSR proposal here and for some technical background on what CDI 2.0 might be, you should check Antoine Sabot Durand (CDI 2.0 Specification Lead) 'Forward CDI 2.0' piece.

Wednesday Jul 16, 2014

Java EE @ UberConf

UberConf was held June 24 - June 27 in Denver, Colorado. For those unaware, this is essentially the largest single annual event under the NFJS umbrella and to a certain extent the culminating point of the US based tour. Unlike the usual NFJS events that are squarely locally focused, it's intent is to be a national/international conference. Consequently it has a larger set of attendees, speakers, tracks and sessions. This year's event was very vibrant and clearly a success by all measures.

I had six talks total over three days, essentially back-to-back. I had excellent attendance for all my sessions and had many of the same folks staying for multiple sessions which is always a very good sign. I did talks on Java EE 7/Java EE 8, the Cargo Tracker Java EE Blue Prints, JMS 2, aligning Java EE 7 with the HTML 5/JavaScript Rich Client landscape, JAX-RS 2 and aligning Java EE with the NoSQL landscape. I also helped out with Arun Gupta's excellent Java EE 7 lab. More details, including slide decks and code, posted on my personal blog.

Tuesday Jul 15, 2014

Java API for JSON Binding (JSON-B)

JSON-P (Java API for JSON Processing - JSR-353) provides a portable standard solution to parse, generate, transform, and query JSON using 2 APIs, a streaming API and an object model API based on the streaming API. JSON-P was one of the API added to Java EE7.

But clearly JSON parsing and JSON generation was a first step and only a (important) part of the global equation. To convert Java objects from/to JSON representation, you have to rely on different solutions, different frameworks such as EclipseLink MOXy or Google GSON to just name two! The issue is that, obviously, all those frameworks are all different since there is no standard in that space. This was also clearly reflected in the Java EE 8 Community Survey as JSON Binding was the most asked feature!

Oracle plans to submit a new JSR to solve that particular problem, i.e. the 'Java API for JSON Binding' JSR. The JSON-B JSR aims to define a standard binding layer for converting Java objects to JSON messages and vice versa. JSON-B will leverage and complement JSON-P (JSR 353). The draft proposal for the JSON-B JSR has just been made public to gather feedback and recruit supporters before it is submitted to the JCP in August. JSON-B will be targeted for inclusion in Java EE 8 but will also work with Java EE 7. And timing wise, it is aligned with the current Java EE 8 roadmap.

It's summer time and August isn't that far, so make sure to read the proposal and gives us your feedback quickly!

Monday Jul 14, 2014

VRaptor 4: A CDI Based MVC Framework for Java EE

As you may know one of the surprising results of the Java EE 8 survey was the desire for an action oriented MVC framework for Java EE. What many folks may not be aware is that there are actually a few action oriented web framework solutions out there that are already very aligned with Java EE. One such solution that really stands out is VRaptor.

Built on top of CDI, it has some very interesting defaults geared towards ease-of-use/productivity. It also supports key Java EE APIs such as JPA and JTA. To build a bit more awareness for the web framework, key commiter Rodrigo Turini recently wrote an excellent article on InfoQ. It is a very well-written article that serves as a good getting started guide with the innovative framework. Rodrigo will also be talking about VRaptor 4 at JavaOne 2014.

Jersey MVC has also long provided a very similar action oriented solution based on top of JAX-RS. All of these solutions could certainly be used now and serve as valuable input to any future effort to standardize an action oriented web framework in Java EE.

Friday Jul 11, 2014

Arun Gupta's Java EE Sessions at JavaOne 2014

For the Java EE track at JavaOne 2014 we will highlight some key sessions and speakers to better inform you of what you can expect.

There's no better place to start this effort than an interview with Red Hat's Arun Gupta about his Java EE sessions at JavaOne. In the unlikely case that you don't know who Arun is, he is the former "GlassFish Guy", prolific Java EE advocate, author and blogger. He now enjoys a well-deserved and coveted role as the head of developer advocacy at Red Hat. A great deal of the current success of the Java EE and GlassFish communities can be attributed to Arun's tireless hard work, boundless energy and infectious enthusiasm. We are very honored to have Arun speak at JavaOne:

Arun has several key sessions on the track:

  • Lessons Learned from Real-World Deployments of Java EE 7: There are already three fully compliant Java EE 7 platforms: GlassFish, WildFly and JEUS. In addition WebLogic is strongly on the path of becoming Java EE 7 certified and already supports some key Java EE 7 APIs in 12.1.3. A number of folks have been learning, evaluating and using Java EE 7 on these platforms. Some of these folks have even started to deploy Java EE 7 applications. In this practically focused session Arun discusses some key real world lessons learned from these known early deployments.
  • Java EE 7 Soup to Nuts: In this equally practically focused tutorial (JavaOne tutorials are essentially two-hour long sessions), Arun goes beyond the Java EE 7 APIs and features to talk about what is needed to develop a real application end-to-end. He covers IDEs such as Eclipse, NetBeans and IntelliJ, platforms like GlassFish, WildFly, OpenShift and CloudBees as well as useful tools such as Forge, Arquillian, Hudson/Jenkins and JRebel.

If you are already a Java EE fan or still just evaluating, you will be well-served to attend Arun's sessions at JavaOne. In the months running up to JavaOne we hope to highlight a few more key folks and sessions, so do stay tuned.

The early bird offer for JavaOne expires July 18th so if you plan to come to JavaOne it would be wise to register early and save some money for yourself or your organization. I certainly hope to see you there.

Thursday Jul 10, 2014

Spotlight on GlassFish 4.0.1: #2 Simplifying GF distributions

'Spotlight on GlassFish 4.0.1' is a series of posts that highlights specific enhancements of the upcoming GlassFish 4.0.1 release. It could be a new feature, a fix, a behavior change, a tip, etc.

#2 Simplifying GF distributions

For any particular GlassFish release, we used to have different distributions. We had an English and a multilingual (ML) version of GlassFish. We had a Zip based distribution. We also had versions with a native installer... on different platforms (Windows and Unix's). Finally, from a Java EE standpoint, we had 2 types of distributions: Full Platform and Web Profile. If we factor in all those criteria’s together, this gives 12 different distributions!  And that was just for the Open Source edition of GlassFish! Needless to say that this was costly and not necessarily very useful as clearly, the statistics shows that the Zip distribution was the most popular one.


GF 4.0 Download Wizard

For 4.0.1, we have decided to greatly simplify this by only producing 2 Zip based distributions: a Web Profile distribution and a Full Java EE Platform distribution. To install GlassFish 4.0.1, you just need to unzip the archive in the desired location. And GF is already pre-configured and ready to be started (the only assumption is that you have a JDK installed). The advantage of the Zip distribution is that it is simple and universal, it works on any platform. This approach is also very convenient when it comes to script GF installation. Other open source application server are also using Zip distributions, so we should be on the right track.

Wednesday Jul 09, 2014

Java EE @ NFJS Central Ohio Software Symposium

As some of you may be aware, I recently joined the well-respected US based No Fluff Just Stuff (NFJS) Tour. My first engagement with NFJS was the New York Software Symposium on April 4-5. The show went relatively well. My second engagement was extremely encouraging - the Central Ohio Software Symposium in Columbus, Ohio on June 6-8. Unlike New York, the Columbus show was fully sold out and very vibrant.

I had five talks total over two days, essentially back-to-back. I had a full house for all my sessions and had many of the same folks staying for multiple sessions which is always a very good sign. I did talks on Java EE 7/Java EE 8, the Cargo Tracker Java EE Blue Prints, JMS 2, aligning Java EE 7 with the HTML 5/JavaScript Rich Client landscape and JAX-RS 2. More details, including slide decks and code, posted on my personal blog.