Oracle Blog

News from the GlassFish Community

Friday May 30, 2014

If you work in the US and still don't know what the No Fluff Just Stuff (NFJS) Tour is, you are doing yourself a very serious disfavor. NFJS is basically a set program of world class speakers and topics offered at major US cities year round. I am proud to share with you that I recently joined the legendary NFJS troupe. My hope is that this will help solve the lingering problem of effectively spreading the Java EE message here in the US.

I had my tour debut on April 4-5 with the NFJS New York Software Symposium. I did four of my most favorite talks and it was not that bad for a start - I have more in the coming months in Columbus Ohio, Denver Colorado and Austin Texas. More details on the tour posted on my personal blog.

Thursday May 29, 2014

Still have lingering questions on the goals and future of GlassFish? Want to know a little more about the upcoming GlassFish 4.0.1 release? Something on your mind about Java EE 8/GlassFish 5? You have a golden opportunity to pose your questions and speak your mind tomorrow!

The good folks over at C2B2 have gone through a lot of time and effort to organize a very useful online event for the London GlassFish User Group - they are having me answer all your questions online, in real time, "face-to-face". Steve Millidge of C2B2 will be moderating the questions and joining the conversation. Did I mention the event was online, free and open to anyone?

The event is tomorrow (May 30th), so make sure to register as soon as possible through the C2B2 website (the registration page has more details on the event). It will be held at 4:30 PM BST / 11:30 AM EST / 8:30 AM PST - you must register to participate. Hope to talk to you tomorrow?

Wednesday May 28, 2014

SSE (Server-Sent Event) is a standard mechanism used to push, over HTTP, server notifications to clients. SSE is often compared to WebSocket as they are both supported in HTML 5 and they both provide the server a way to push information to their clients but they are different too! See here for some of the pros and cons of using one or the other.

For REST application, SSE can be quite complementary as it offers an effective solution for a one-way publish-subscribe model, i.e. a REST client can 'subscribe' and get SSE based notifications from a REST endpoint. As a matter of fact, Jersey (JAX-RS Reference Implementation) already support SSE since quite some time (see the Jersey documentation for more details).

There might also be some cases where one might want to use SSE directly from the Servlet API. Sending SSE notifications using the Servlet API is relatively straight forward. To give you an idea, check here for 2 SSE examples based on the Servlet 3.1 API.

We are thinking about adding SSE support in Java EE 8 but the question is where as there are several options, in the platform, where SSE could potentially be supported:

the Servlet API

the WebSocket API

JAX-RS

or even having a dedicated SSE API, and thus a dedicated JSR too!

Santiago Pericas-Geertsen (JAX-RS Co-Spec Lead) conducted an initial investigation around that question. You can find the arguments for the different options and Santiago's findings here.

So at this stage JAX-RS seems to be a good choice to support SSE in Java EE. This will obviously be discussed in the respective JCP Expert Groups but what is your opinion on this question?

Tuesday May 27, 2014

Kerry Wilson is a Software Engineer at the Vanderbilt University Medical Center. He served in a consultant role to design a lightweight systems integration solution for the next generation Foundations Recovery Network using GlassFish, Java EE 6, JPA, @Scheduled EJBs, CDI, JAX-RS and JSF. He shared his story at the JavaOne 2013 Sunday GlassFish community event - check out the video below:

Kerry outlined some of the details of the implementation and emphasized the fact that Java EE can be a great solution for applications that are considered small/lightweight. He mentioned the productivity gains through the modern Java EE programming model centered on annotations, POJOs and zero-configuration - comparing it with competing frameworks that aim towards similar productivity for lightweight applications. Kerry also stressed the quality of the excellent NetBeans integration with GlassFish and the need for community self-support in free, non-commercial open source projects like GlassFish. You can check out the details of his story on the GlassFish stories blog.

Do you have a Java EE/GlassFish adoption story to share? Let us know and we will highlight it for the community.

Friday May 23, 2014

The GlassFish team would like to give an update on the GlassFish Server Open Source Edition 4.0.1 (GlassFish 4.0.1) release that we have been diligently working on. GlassFish 4.0.1 plans include:

Bug fixes. This release will, or course, incorporate the many bugs fixes that have already been addressed in the trunk since GlassFish 4.0. We continue to work hard fixing bugs as we head towards release. Oracle is committed to delivering a high quality development experience with GlassFish!

Refresh component libraries. GlassFish 4.0.1 plans to use updated versions of many sub-projects it relies on, like Jersey, Tyrus, Mojarra, JavaDB, and more. These projects bring their own set of bug fixes and even some incremental features.

Tuesday May 20, 2014

Tyrus is JSR 356 (Java API for WebSocket) Reference Implementation. The Team working on it doesn't stand still as they have just released another update, i.e. Tyrus 1.6!

As usual, each Tyrus release comes with a set of fixes but also with some new features, here are some them :

The ability to switch to JDK 1.7 based transport on the client side

JMX based Monitoring Server Side Resources Utilisation

WebSocket Application Descriptor Language (WSADL) : an XML descriptor of deployed endpoints. WSADL is to WebSocket what WADL is to RESTful web services.

etc.

Also, there was a problem with JSR 356 that prevent to use, in a consistent way, Lambda expressions when registering a message handler. The good news is that this is now solved in Tyrus 1.6! We can also expect in the weeks to come a small update to the JSR 356 specification to clarify this point as well.

Monday May 19, 2014

We are now ready for the third and final instalment of the 2014 Java Virtual Developer Day. This time, the schedule is geared towards Asia and Pacific Time Zones. So the APAC Java Virtual Developer Day will take place on May 28th (see below for exact timing)! Please note that this is not the date originally announced a few weeks ago so make sure to update your calendar with this new date and schedule (*)!

(*) Java Developer Day APAC - May 28th, 2014 :

10:30 AM - 2:30 PM IST

1:00 PM - 5:30 PM SGT

3:00 PM - 7:30 PM AEDT

7:00 AM - 11:00 AM CEST

If you want to learn about the latest evolution happenings in the Java Platform (Java Embedded, Java SE and obviously Java EE) make sure to attend this free event! You can find the complete up-to-date agenda here (PDF) and how to register here. Please note that if you live in Central Europe, you also have the possibility to attend this event as the timing is quite European friendly too!

Thursday May 15, 2014

One of the things that makes JSF different from other approaches to server-side Java web development is that it offers a much higher level of abstraction and transparently maintains UI state. While this is valuable is making web development feel like more traditional pure MVC UI development (think Swing, AWT or JavaFX), maintaining UI state is not always necessary. In fact, having a stateless view can be a valuable optimization technique as long as you design for it and can afford to do it. In recognition to this fact, JSF 2.2 allows a view to be marked stateless. Ed Burns discussed this feature towards the beginning of his JavaOne 2013 talk titled JSF 2.2 New Features in Context (see embedded video below):

Wednesday May 14, 2014

Since Java EE 6, we have seen a number of folks migrate from the popular Spring Framework to vanilla Java EE, especially in the GlassFish, JBoss and TomEE ecosystems. A small handful of these folks have spoken at JavaOne and we will likely have a few more this year as well - see the embedded slide deck below from JavaOne Rock Stars Bert Ertman and Paul Bakker.

Recently Thomas Wöhlke has taken this further by migrating the entire Spring Pet Clinic example application to Java EE 7 and RichFaces. You can learn more about the effort here. His port works well on both GlassFish and WildFly. Incidentally, the Cargo Tracker Java EE Blue Prints application is also a port of a well known older Spring and native Hibernate application.

Perhaps this is worth a look if you are considering such a migration for your own good reasons?

Tuesday May 13, 2014

Tomorrow (May 14th - see below for timing), we will hold the 2014 Java Virtual Developer Day for Europe. And it's still possible to register!

During this free technical event, you will be hear about the latest news and evolutions in the Java Platform, from the embedded space to Java EE. On the Java EE front, we will cover all the new Java EE 7 APIs (WebSocket, Batch, Concurrency Utilities for Java and JSON-P). We will also spend time on JAX-RS 2.0 and JMS 2.0. Again, this is a free event so don't miss this opportunity!

You can find the complete agenda and registration details on this page.

Sunday May 11, 2014

Thanks to the popularity of REST, most of us now know HTTP methods like GET, POST, PUT and DELETE better than we probably care to. Nonetheless, most of you probably don't know much about a more obscure but pretty handy HTTP method - PATCH. If this is the case, you should check out this well-written blog post explaining the basics of HTTP PATCH.

JAX-RS 2 and Jersey do not support PATCH out of the box as it is not that widely understood or used quite yet. However, you can fairly easily add PATCH support using JAX-RS 2 - Oracle's own Gerard Davison shows us how. Like a small handful of us here at Oracle Gerard is a JavaLobby/DZone Most Valuable Blogger (MVB). Besides demonstrating how you might implement PATCH, the code-driven post uses a number of cool JAX-RS features such as meta annotations, name bindings, interceptors and providers. Enjoy!

Friday May 09, 2014

In our continued efforts to reach out the Java User Groups across the different regions, I had the privilege to attend the Jozi JUG annual event in South Africa a few weeks ago. It was a full day event packed with different topics, ranging from Embedded to Java SE and Java EE. I took care of the Java EE section.

You can find some personal thoughts about this nice community event on my personal blog here.

Thursday May 08, 2014

JavaServer Faces (JSR 344), one of the Java EE technology, is a server-side component framework for easily building Java based web applications. JSF offers many benefits but one of the great JSF advantage is that it is really simple to plug-in any compatible JSF components suite. PrimeFaces is one of those suite, it is a popular open source JSF component suite with various extensions and is recognised for the richness of its components. This week marks the release of PrimeFaces 5.0!

Wednesday May 07, 2014

So you want to build the Reference Implementation of Java EE 7 from the source code after tweaking a little bit? Guess what, it is not hard at all. Andrew Pielage from C2B2 provided us with a nice blog post about the steps required to build GlassFish Open Source Edition from the source. Below you find just a few hints of how easy it is to build GlassFish, but don't forget to check Andrew's post for more details on how to modify source code, build with better options, load the custom build on NetBeans, and more!

Let's start with the beginning. In order to isolate any potential performance issue, you first need to be able to accurately measure performance. The first part of the book discusses general methodologies for testing Java applications. It also discusses the usual pitfalls of Java benchmarking.Performance analysis is about about observing and understanding what an application is doing so the book continues with an ideal Java Performance Toolbox. It covers some of the tools available to monitor Java applications. It should be mentioned that Java Mission Control that has been recently added to Java SE 7 (starting with update 40) and Java SE 8 is also discussed.The book then dive into Java performance by discussing in great details two key fundaments that are the JIT (Just-In-Time) compiler and the Garbage Collection.The remaining chapters focus on best practice uses of various parts of the Java platform. It's the platform at large as it goes from memory use with the Java heap, native memory use, thread performance to Java EE, JPA and JDBC!

Scott Oaks, the author, has spend more than 15 yeas in the Java Performance Group at Sun and now at Oracle. I know Scott since more than 12 years, he is clearly someone that understand all the aspects related to Java Performance, from measuring to tuning. And not only that, Scott has also the capacity to distillate sometime complex technical aspects into easy to understand points. From a Java EE point of view, the book doesn't obviously covers the complete platform (see the ToC here) but nevertheless the book is a really a must-read for anyone writing Java applications based either on Java SE or Java EE. And the fact that the book also discusses Java EE and some of its APIs is certainly a nice additional bonus for any Java EE developer!