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.

Monday Jun 16, 2014

JAX-RS 2 + Bean Validation 1.1

As many of you know, JAX-RS 2 is one of the most important parts of Java EE 7. One key enhancement in JAX-RS 2 that doesn't seem to get much attention is it's integration with Bean Validation 1.1 (specifically method validation). The key significance of the enhancement is that it allows for highly declarative data validation for edge client interfaces (in fact the method validation feature introduced in Bean Validation 1.1 is valuable for WebSocket or local/EJB services for this same reason). Bhakti Mehta explains JAX-RS 2 and Bean Validation 1.1 integration well in this blog post. In addition to covering JAX-RS 2, she also discusses how Bean Validation can be used with JAX-RS 1.1. You should also check out the following excellent video by celebrated Java champion Adam Bien showing JAX-RS 2 and Bean Validation 1.1 in action using live coding with NetBeans and GlassFish:

The documentation for Jersey, the JAX-RS 2 reference implementation included in GlassFish and WebLogic, also has an excellent section on the new feature.

Monday Mar 17, 2014

The JAX-RS 2 Client API by Example

The brand new client API is one of the most significant features introduced in JAX-RS 2/Java EE 7. The API has many uses such as unit/integration testing, system-to-system/M2M communication, Java SE/AWT/Swing/JavaFX REST clients and so on. Indeed you can think of the JAX-RS 2 client API as a general purpose replacement to for any HTTP communication. In an excellent recent blog post, Micha Kop introduces the major features of the JAX-RS 2 client API in an example driven fashion. He demonstrates doing a basic POST/GET/DELETE request, JSON support, resolving path parameters, asynchronous processing, invocation callbacks, delayed invocation, filters and much more (all with running examples included!). JAX-RS 2 specification leads Santiago Pericas-Geertsen and Marek Potociar also spent a great deal of time on the client API during their JavaOne 2013 talk (video embedded below).

The official Java EE 7 tutorial also has a great section on the JAX-RS 2 client API, as does the docs for the Jersey JAX-RS 2 reference implementation.

Friday Jan 31, 2014

JAX-RS Managed Clients in Jersey

As you probably know, JAX-RS 2/Java EE 7 now includes a brand new standard client API. If you don't know about it yet, you should check out this excellent blog entry by Mohamed Sanaulla now :-). The standard client API uses the factory/builder patterns and not injection. This makes it very well suited for Java SE based environments such as JUnit tests and JavaFX UIs. However Jersey, the JAX-RS 2 reference implemention included in GlassFish 4 goes much further by providing a managed JAX-RS client that makes full use of injection. This is ideal for server-side mash-ups and system-to-system/machine-to-machine communication.

Michal Gajdos of the Jersey team does an excellent job of explaining the API details in this code-driven blog entry. You can also check out the code on GitHub and running example on Heroku!

Monday Dec 23, 2013

Java EE@Oredev 2013

Oredev 2013 was held on 4-8 November in Malmo Sweden. This was my second time at the largest IT conference in the Scania region - I had been there in 2010 as an independent. This year it attracted a decent section of the Java crowd including my fellow Oracle colleagues Brian Goetz, Geertjan Wielenga, Attila Szegedi, Aleksey Shipilev, Cecilia Borg, Marcus Hirt and Tomas Nilsson as well as independent Adam Bien. Topics covered included Java EE, mobile, DDD, agile, HTML5, cloud, Java SE, OpenJDK, JavaScript and NoSQL.

I delivered a full day workshop on Java EE 7 and a technical talk on JAX-RS 2, both of which went well. More details on the sessions and Oredev, including the slide deck and code, posted on my personal blog.