Tuesday Feb 17, 2015

Tyrus and Autobahn|Testsuite compliance

The Tyrus Team has just released Tyrus 1.10 (JSR 356 Reference Implementation). With only a few fixes (see Pavel's blog for details), this release could be seen as a minor one. It is however an important milestone as it is the first Tyrus release that passes the Autobahn|Testsuite, a test harness used to verify WebSocket client and server implementations for specification conformance and implementation robustness.

In this release, the Tyrus Team has also introduced 2 new samples that explore ways of sharing data between JavaScript and Java (see Pavel's blog for more details). 

Additional resources: 

Monday Feb 16, 2015

Manfred Riem Discusses JSF and Java EE MVC on JSF Central Podcast

Manfred Riem was a guest on the most recent JSF Central Podcast. For those unaware Manfred is the co-specification lead for both JSF 2.3 and Java EE MVC 1.0. Manfred talked about Mojarra, JSF 2.2, JSF 2.3 as well as MVC 1.0. The podcast is available here and you can read the transcript here.

The podcast is led by Kito Mann - well respected enterprise consultant, author, blogger and JSF community member. Kito has been a long time supporter of JSF with a long track record of contributing as a JCP standards group expert.

The newscast is in fact part of the JSF Central portal and covers topics of interest for the JSF ecosystem. Past contributors to the podcast have included folks like Ed Burns, Cagatay Civici, Neil Griffin, Lincoln Baxter and Shay Shmeltzer. All of the podcasts are archived here.

Besides the podcast, the JSF central portal itself is a very valuable resource for the JSF community you should explore. It does a very nice job listing JSF articles, books, projects, products and other resources.

Friday Feb 13, 2015

The JavaOne 2014 Rock Stars are Here!

The JavaOne team just announced the Rock Star speakers for JavaOne 2014. Not very surprisingly Java EE had a strong showing. That's very significant as the Rock Stars are based on attendee ratings. I am extremely humbled to join the very fortunate ranks this year. Having an insider view of JavaOne, I know exactly how selective JavaOne really is (it is by far the most selective Java conference in the world). For that reason to me every speaker at JavaOne is a star on their own right. The Rock Star awards are just an attempt to recognize the talent and hard work of some of these people using some set of objective criteria.

Here are the Java EE Rock Star speakers and their highly rated talks (linked are the videos):

You can find the full list of Rock Star speakers and their talks here. Who knows, maybe you join these ranks next year?

Thursday Feb 12, 2015

Project Avatar Update

Project Avatar began 3+ years ago as a client side JavaScript project in an effort to participate in and learn from the JavaScript community. With client-side JavaScript frameworks evolving at a rapid pace and leaders starting to separate from the “pack”, we leveraged our Middleware strength and added a server-side component. Project Avatar was released to the community at JavaOne 2013, and delivered an end-to-end JavaScript programming model who’s server-side component was aligned with Java EE compatible containers like GlassFish and WebLogic. Avatar.js, the Node.js compatible runtime, provided the ability to use Node libraries within Java EE compatible containers like GlassFish and WebLogic.

However, we ran into Node.js compatibility issues with this approach, performance issues (tuning for Java EE and Node in same VM), and the programming model we introduced achieved some limited interest in the Java EE community and the Node community. With that in mind we began work on what we call “Avatar 2.0”, which focused on Node compatibility and running in its own JVM, along with continued Java interoperability and Java EE-related interoperability like layering a JavaScript library on top of JPA.

What we began to find is that the services that were of interest have begun exposing functionality via RESTful APIs directly. For example, the Oracle Database Node.js Driver makes direct Java interoperability with Java EE for Node applications less interesting. Rather than trying to reinvent Avatar again, we have decided to put it on hold and let the market evolve a bit. We’ll continue to track the industry and re-evaluate down the road.

With that being said, we have learned a lot about JavaScript and Node.js in the process, and the Avatar work has been leveraged within Oracle more than meets the eye. For example, the early need for WebSockets within Avatar resulted in Tyrus, the WebSocket implementation in GlassFish and WebLogic today. The performance improvements Avatar really needed out of Nashorn have been delivered to Nashorn users within multiple JDK releases, including the forthcoming JDK 8 Update 40. Last, we realized just how important the Node.js community is. While Avatar is being put on hold, we are ramping up our investment in Node.js with the planned delivery of the Oracle Node Cloud Service in 2015, built on native Node.js. In addition, we do see a lot of tactical interest in using Nashorn within Java Applications, as described for example by InfoQ and Adam Bien.


We'd like to thank those who have provided us feedback throughout the life of Project Avatar. It has been very much appreciated and helped us us more than you know.

Avatar and Avatar.js project pages, along with the code and related binaries, will remain available for folks to learn from and leverage.

JavaOne Is Coming to Brazil!

The flagship Java technology conference is returning to Latin America! JavaOne will take place on June 23–25 in São Paulo - Brazil.

We all know Brazilians are vocal Java supporters but clearly, this event open to all! And in order to have a strong Server-Side track, we need your support. So please make sure to submit your Java EE related proposals as soon as possible as there are only 2 weeks left to do so (the CFP is closing end of February).

Registration will open soon. For more information about JavaOne Latin America, you can check this site. Site which will be updated with more details as we get closer to the event.

Wednesday Feb 11, 2015

Java EE @ Java2Days 2014

Java2Days 2014 was held on November 17-19 in Sofia, Bulgaria. It is far and away the largest Java conference in the Balkans region and now perhaps one of the most important conferences in Europe as a whole. This was another great year for this rapidly growing, vibrant event. It attracted a host of international and local speakers including Arun Gupta, Geertjan Wielenga, Roberto Cortez, Ivan St. Ivanov, Andy Gumbrecht and Andrew Lombardi. Topics included Java SE, Java EE, HTML5/JavaScript, mobile, OSGi, IoT and the cloud. I am extremely grateful that the organizers invited me again this year and very glad that I was able to accept.

Java EE had a strong showing this year:

  • What's Coming in Java EE 8 - me
  • Nuts and Bolts of WebSocket - Arun
  • Java EE 7 Hands-on Lab - Arun, Ivan and me
  • Apache Tomcat to Apache TomEE in 1-n Steps - Andy Gumbrecht
  • Java EE 7 Batch Processing in the Real World - Roberto and Ivan
  • Coding for Desktop and Mobile with HTML5 and Java EE 7 - Geertjan
  • JavaScript/HTML5 Rich Clients Using Java EE 7 - me, Ivan
  • Forge and Arquillian Hands-on Lab - Ivan, me
  • Why Open Standards and Java/EE Matter (to You) - me

More details on the sessions and Java2Days, including the slide decks, video and code, posted on my personal blog.

Tuesday Feb 10, 2015

Java EE 7 Maintenance Release

The Java EE 7 specification (JSR 342) was finalised end of May 2013 and since then, various minors errors have been reported. Those will soon be addressed as the Java EE 7 specification will go through a maintenance release (see Linda's announcement here).

You can check the proposed changes here and a draft of the specification with the proposed changes incorporated here.

Those proposed corrections should only impact the specification document itself and not the Reference Implementation nor the TCK. So once this MR will be done and voted, the version of the specification should be Java EE 7 Rev A.

Friday Feb 06, 2015

Java EE @ JDK.IO 2014

JDK.IO 2014 was held in Denmark on January 19-20 at the IT University of Copenhagen. It is the yearly conference of 'JavaGruppen', the Danish JUG. The conference sessions covered a variety of Java topics ranging from core Java, Java EE, and JavaFX. Speakers included my colleague David Delabassee, Simon Ritter, Adam Bien, Heinz M. Kabutz, Bert Ertman, Ryan Cuprak, Simon Maple and Markus Eisele.

David covered the Java EE portion of the keynote. He also presented a talk on Java EE 8. His slides from SlideShare are embedded below:

My friend, fellow co-author of EJB 3 in Action, Connecticut JUG leader and JavaOne Rock Star Ryan Cuprak presented a couple of very cool sessions. The first one, titled Hybrid Mobile Development with Apache Cordova and Java EE 7 demonstrates how Java EE can be used as a very effective mobile development back-end using APIs like JAX-RS, WebSocket and JSON-P. The talk was delivered at JavaOne 2014 as a tutorial and includes an excellent end-to-end demo. Video from the JavaOne talk is embedded below:

Ryan also presented another popular talk from JavaOne 2014 - 50 EJB 3 Best Practices in 50 Minutes. At JavaOne he had co-presented the talk with my other co-author Michael Remijan. The video from that talk is embedded below:

Ryan wrote up a very nice trip report of JDK.IO on his personal blog that you should check out. Other Java EE related talks included one by Markus Eisele on Java EE 7 and Apache Camel.

Thursday Feb 05, 2015

MongoDB as a Glassfish Security Realm

As many of you know application servers like GlassFish have excellent built-in support for common authentication providers like a database or LDAP. Using these as security realms is typically just as simple as a few clicks on an admin console UI or a command (or two) using the admin CLI. But what if your authentication storage mechanism is a little more exotic? How about something really exotic like the popular MongoDB NoSQL database? Is there a way to make it work with GlassFish/Java EE security?

Not to worry - in that case you are looking at creating a custom JAAS based authentication module, configuring it with GlassFish and using it as a Java EE security realm instead of using one of the built-in choices. It's really not as scary as it sounds - Lee Chuk Munn from the Advanced Technology Applications Practice for the National University of Singapore, Institute of Systems Science shows us exactly how to do it, step-by-step. In a characteristically awesome blog post, he explains the basics of GlassFish security realms, creating a JAAS based custom authentication module for MongoDB, registering the module as a security realm and using it. Enjoy!

Wednesday Feb 04, 2015

Java EE MVC to be Based on JAX-RS

One of the key Java EE 8 APIs, MVC 1.0 (JSR 371) is solidly moving forward. A key decision for the expert group to consider was whether to base the specification on Servlet or JAX-RS. MVC clearly has many semantic commonalities with both specifications such as HTTP method mapping, mime-type handling, session/request/cookie manipulation and so on. Specifications like JSF and JAX-RS are based on Servlet so it is not unnatural to base MVC on the foundational Java EE specification too. However basing MVC on the lower level Servlet specification would likely mean introducing many APIs that are potential duplicates of what is already available in the higher level JAX-RS API. On the other hand basing MVC on JAX-RS would mean significantly minimizing the possibility of API duplication. It would also mean the programming model between JAX-RS and MVC would be very similar, reducing the learning curve for both newcomers and experienced Java EE developers.

For these reasons it is not too surprising that the expert group has decided to move ahead by basing MVC on JAX-RS. MVC expert group member Ivar Grimstad shares the details including an early view on how the API may wind up looking like in a recent post. Do you have an opinion to share on this?

Tuesday Feb 03, 2015

Batch API Hands-on Lab

During last JavaOne, we held a Hands-on-Lab on JSR 352. JSR 352 is one of the new Java EE 7 APIs. The formal API is name is 'Batch Applications for the Java Platform' but it is often referred to as the 'Batch API'.

The goal of this Lab is twofold, introducing the Batch API to newcomers and then explaining some of the most advanced JSR 352 features. For that reason, the Lab has been divided in 5 exercices:
  • Exercice 1 will introduce you the main concepts of JSR 352 such as Step, Job, JSL, etc. 
  • Exercice 2 will enhance the first exercise and introduce mutli-steps jobs combining Chunk step with a Batchlet step.
  • Exercice 3 will cover checkpoint and the JobOperator interface which can be used to resume a failed job.
  • Exercice 4 will build introduce you to listeners, a mechanism that can be used to intervene within the life-cycle of a batch job (e.g. to catch errors).
  • Exercice 5 will introduce the concept of Job Partitioning, a more advanced feature of JSR 352.
This Lab has been developed and tested on GlassFish 4.1 but it should work on any Java EE 7 compatible application server (note that JSR 352 is part of the full platform). This Lab is now hosted on GitHub so to learn JSR 352, just clone the https://github.com/java-ee/BatchLab repository and check the masterLab document.

Monday Feb 02, 2015

CDI and DeltaSpike Overview by CDI Specification Lead

For those of us that have been using CDI for a while it's easy to forget that basic refreshers are extremely valuable for newcomers. Fortunately this point is not lost on current CDI specification lead Antoine Sabot-Durand. He recently finished presenting a three-part webinar covering CDI and DeltaSpike.

In the first of these webinars Antoine covered the very basics of CDI (along with some advanced features). The slides are here and the video is below:

In the second webinar in the sequence Antoine covered a few more advanced features, most notably CDI portable extensions. The slides are here and the video is below:

In the third webinar installment Antoine gave a basic overview of DeltaSpike. DeltaSpike is a very handy set of CDI plugins that all Java EE developers should we aware of. DeltaSpike very deservedly won the Duke's Choice Award for 2014. The slides are here and the video is below:

You should also check out Antoine's more forward looking JavaOne 2014 talk on CDI 2 posted here.

Friday Jan 30, 2015

GlassFish 4 Command Line 101

At it's heart Java EE is a standard API and SPI for developing applications that are deployed to an application server runtime. Though some people miss this point most application servers like WebLogic and GlassFish are far more than vessels for applications. Application servers also typically provide a rich set of features geared towards scalability, security, systems integration, optimization, diagnostics, management and monitoring. The GlassFish command line interface (CLI) is a great example of just such a feature. Though many people prefer to administer GlassFish though the graphical admin console, the CLI is extremely useful for scripting administration tasks as well as potentially getting things done faster.

If you haven't explored the GlassFish CLI you should definitely take a look to get a sense of it's power and utility. Andy Pielage of C2B2 consulting has one of the best write-ups that I have seen for the GlassFish CLI. He explains the basics, offers useful insights and explores some of the most useful commands using great examples. It's a fantastic resource for getting started with the CLI.

Thursday Jan 29, 2015

Using Jersey Client with Netflix Hystrix

There are lot of discussions about Microservice architecture. Lot of them are focused mostly on the benefits of Microservices; sometime some of the drawbacks are overlooked. I am not going to start another discussion on this but one thing is clear: as soon as you have multiple services, you should expect that some of them will fail at some point. Failure is almost inevitable!

Your infrastructure has to be designed with service failure (and degradation) in mind because you don't want all your services to be unavailable just because one of the underlying service is down (or just very slow). Your application needs to be able to isolate any potential failure and offers, at any time, some sort of graceful degradation. The overall idea is to introduce intelligence at the end point level to cope with such issue. You need a circuit breaker to avoid cascading failure. 

Netflix Hystrix is one of the popular solutions for introducing those circuit breaking capabilities. Hystrix is a latency and fault tolerance library designed to isolate points of access to remote services. In case of failure, Hystrix can stop cascading failure and enable resilience in distributed systems. Libor Kramolis from the Jersey Team has just published an article showing how to use the new Jersey Client Reactive API with Netflix Hystrix (and RxJava Observable).

Wednesday Jan 28, 2015

Enterprise Java Newscast: A Good Resource to Stay Up-to-Date

There's so much going on in the Java EE ecosystem that it's very hard to stay up-to-date without getting overwhelmed. As one of the curators of this humble blog I know that all too well. For those very short of time one of the resources that can help you is the JSFCentral Enterprise Java Newscast. It is led by Kito Mann - well respected enterprise consultant, author, blogger and JSF community member. Kito has been a long time supporter of JSF with a long track record of contributing as a JCP standards group expert. The newscast is in fact part of the JSFCentral portal. In the newscast Kito and company discuss interesting recent releases, news items and upcoming events. They also tend to have fairly lively discussion on the newscast on hot topics.

Kito very kindly invited me to join the latest newscast (episode 24). We covered a wide variety of topics including Java EE 8 JSRs, Jersey, RichFaces, Infinispan, Hibernate OGM, WebLogic, Adopt-a-JSR, JavaOne videos and some of my upcoming conferences. The MP3 audio for the episode is available on the linked page. The following are some of the items I contributed (most from this blog):