Thursday Oct 16, 2014

OTN Virtual Technology Summit is approaching. Save the date!

The OTN Virtual Technology Summit is a set of free online events covering various technical topics such as Java SE, Java EE but also Middleware, Database, etc.  Each topic will be presented by a subject matter expert coming either from Oracle or from the community (Java Champions, Oracle ACEs, ...). And during each session, a live chat will let participants ask questions and clarifications on the presented subject. So this is a really great (and free!) learning opportunity.

This time, the Java EE session will be delivered by Josh Juneau, a renowned Java EE specialist and author of 2 popular Java EE 7 books!

More details will be provided soon (detailed agenda with session abstracts, registration page, etc.) will be published soon. But in the meantime, make sure to save the date in your agenda:
  • VTS America : November 18th, 2014 – 9am to 12:30pm PST
  • VTA Asia : November 19th, 2014 – 10:00am to 1:30pm IST
  • VTS Europe : November 26th, 2014 – 9am to 12:30pm GMT

Wednesday Oct 15, 2014

Java SE 8 (and Java EE 7) Comes to WebLogic!

As many of you know one of the key features of GlassFish 4.1 was support for Java SE 8. You may be glad to hear that WebLogic 12.1.3 now is also officially certified against Java SE 8. This makes WebLogic one of the earliest major commercially supported Java EE platforms to certify for Java SE 8. Keep in mind, WebLogic 12.1.3 also supports some key Java EE 7 APIs such as WebSocket, JSON-P, JAX-RS 2 and JPA 2.1 (read this excellent Aquarium entry by my colleague Bruno Borges for details).

This means that you can start using some of the very well received Java SE 8 features such as lambdas, streams and the new Date-Time API in Java EE 6 and Java EE 7 applications even in the most demanding 24 x 7 enterprise environments. WebLogic 12.1.3 has also taken advantage of new JDK 8 features such as improved garbage collection, security enhancements and JDBC 4.2.

You can read more details in a well written blog entry by Steve Felts of the WebLogic team.

Tuesday Oct 14, 2014

JSR 339 Maintenance Release: JAX-RS 2.0 rev A

JAX-RS 2.0 (JSR 339) has been slightly revised through the JCP Maintenance Release process and has recently passed the JCP MR ballot

This update (JAX-RS 2.0 rev A) is mostly about clarifications (including JavaDoc clarifications) and some fixes in Jersey, the JAX-RS Reference Implementation. The updated documents will be published soon on the JSR 339 page but in the meantime, you can check this page for details about the changes of JAX-RS 2.0 rev A.

It should be noted that GlassFish 4.1, the Java EE 7 Reference Implementation, already supports this version of the JAX-RS specification (i.e. JAX-RS 2.0 rev A).

Monday Oct 13, 2014

Calling All JMS Enthusiasts: Join JMS 2.1!

As you might be aware, the initial wave of Java EE 8 JSRs are now launched, including the platform JSR itself, CDI 2, JSON-B, JMS 2.1, Servlet 4, JAX-RS 2.1, MVC and JSF 2.3. Most of these JSRs are now actively looking to form their initial expert groups, including JMS 2.1 (filed as JSR 368). JMS 2.1 specification lead Nigel Deakin has written up a very handy guide on joining the JMS 2.1 expert group. In fact the guidance applies very well to most JSRs, so it is definitely worth a read if you have an interest in joining a JSR. As you can expect, applications to join the expert group are maintained completely in the open. The current nominations for JMS 2.1 are listed here.

JMS 2.1 will largely continue the focus on API modernization started in JMS 2.0. While we worked primarily on synchronous send and receive, this time the expert group will hone in on improving receiving asynchronous messages - hopefully resulting in a more powerful and simpler alternative to JMS Message Driven Beans (MDBs). Some initial ideas towards this can be found here and here. There are of course many other items under consideration such as improving JMS provider pluggability, redelivery delays, redelivery limits and dead message queues.

Note that you can always participate in a JSR without officially being part of the expert group by simply subscribing to the JSR user alias. In case of JMS, that alias is users at jms-spec dot java dot net. Also remember that you can contribute on an even more lightweight format through Adopt-a-JSR. If you have any questions about participating in JMS 2.1, you should feel free to email Nigel directly at nigel dot deakin at oracle dot com.

Friday Oct 10, 2014

JSON Binding, Slides from JavaOne 2014

At JavaOne 2014, there were several sessions covering Java EE topics. One of the most expected features in Java EE 8 is the JSON Binding API. Martin Grebac from the Expert Group shared his slides with the proposals (yes, lots of code already!) for this API and also details how you can participate and be involved in the development and specification process for JSR 367 - JSON-B.

Get the slides now from JavaOne 2014 (PDF) and follow these links below to participate:

Spotlight on GlassFish 4.1: #12 GlassFish Tools for Luna

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

#12 GlassFish Tools for Luna

A new version of the GlassFish Tools (aka the 'GF Eclipse Plugin') has just been released for Luna, the latest and greatest Eclipse version. This version supports both GF 3.1.x and GF 4.1 and is a recommended upgrade as it introduces several UI improvements and fixes various issues.  Note that this capability is also offered in the 'Oracle Enterprise Pack for Eclipse' (aka OEPE).

Installation is simple, just drag this 'Install' button and drop it into your Eclipse Luna workspace.  Follow the process and make sure to select both 'GlassFish Tools' and 'Oracle Java EE' features.  You can also do this from the Eclipse Marketplace.

To configure a GlassFish instance, open the Eclipse preferences window and specify, in the 'Runtime Environments' section, where your GF 4.1 install is located.  Be aware that the UI uses the generic 'GlassFish 4' version, which encompass 4.1 as well!

Questions, remarks, REFs around 'GlassFish Tools for Eclipse' and OEPE can be asked here.

Wednesday Oct 08, 2014

The Java EE 7 Tutorial

"The only thing that interferes with my learning is my education." (Albert Einstein)

The Java EE 7 Tutorial is one of the lesser-known gem. It is an extensive tutorial that covers the Java EE platform and its different APIs. The nearly 1.000 pages of the Tutorial might looks a bit daunting for newcomers. But let's be clear, one doesn't have to go through the complete tutorial! The tutorial has been structured in a way to make it easy to learn specific aspects of the platform. And last but not least, the Tutorial also covers more advanced parts of the platform such as JCA for example. In short, the Java EE Tutorial is a great ressource to learn the Java EE platform at large but also learn more specific aspects of Java EE. The tutorial comes in 3 flavours, a free online version and free PDF version but also a 2 tomes based books edition (paper & Kindle version). 

The Tutorial also bundles many samples that demonstrate specific API but also a few sample applications that shows how to use and combine the different API's to build a complete application. The samples can be download from the SVN repository but also using the GlassFish update center. The following short screencast shows how to install the samples in NetBeans using the GF update center. It's easy, the samples are just a few clicks away!

It should be mentioned that that the Tutorial and its samples have been recently updated for the release of GlassFish 4.1 (see here for more details).

And if you find any issue on the Tutorial or on one if its samples, please make sure to fill a Jira ticket. That input is valuable to continue to maintain and improve the Java EE Tutorial!

Monday Sep 29, 2014

jBatch Suite: Visual Development for the Java API for Batch Processing/Java EE 7

As many of you know, the Java API for Batch Processing (JSR 352) is one of the key APIs added in Java EE 7. The API is largely based on POJOs, annotations and some XML. As a result you can be pretty productive even without an IDE. As a Java developer, however, like me you probably enjoy the usability of modern IDEs like NetBeans and may be wondering what IDE support there is for the Java API for Batch Processing. Although Java IDEs have been very good about supporting Java EE 7 generally, none of them have had much specific support for JBatch - until now that is. Sensing a gap Gaurav Gupta has stepped up with jBatch Suite. jBatch Suite is a NetBeans plugin that allows for both UML style modelling and code generation for Java Batch. Conveniently, it is available through the NetBeans Plugin Portal Update Center (Tools > Plugins). The following video is a great overview of the basic functionality in the plugin:

Gaurav has actually put together a very nice set of video demos covering the majority of functionality in the plugin on YouTube. The NetBeans plugin website offers further details as well as download. Contributions are welcome through the project for the plugin. Enjoy!

Friday Sep 26, 2014

Kito Mann's JSF 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 Kito Mann. Kito has long been a respected JSF consultant, popular speaker, author and JCP expert. He is the editor-in-chief of, co-host of the Enterprise Java Newscast, host of the JSF Podcast interview series, and the author of JavaServer Faces in Action from Manning publications (I met him a long time ago in the process of writing EJB 3 in Action).

Kito has one the highest number of talks from a single speaker in the Java EE track this year. We wanted to talk to him about his JSF sessions at JavaOne 2014, as well as JSF generally:

The following are the sessions we talked about:

  • JSF 2.2 Deep Dive: This tutorial is a two-hour deep dive into all the new features in JSF 2.2 and is probably one of the best bits of training you can have on the technology.
  • PrimeTime JSF with PrimeFaces 5: This session is a look into what is new in PrimeFaces 5, easily the most popular part of the JSF plugin ecosystem.
  • JavaServer Faces Antipatterns and Best Practices: This is an invaluable session if you are a JSF user. Kito shares his wealth of experience as a JSF consultant and navigates the best practices, patterns and anti-patterns for the technology.
  • Mobile JavaServer Faces: This is a deeply well researched session on the available resources for developing mobile applications using JSF. If you are a JSF user being asked to develop mobile functionality, this session is definitely for you.
  • JSF 2.2 in Action: In this one hour session, Kito will overview the features introduced in JSF 2.2 using demos and real life context.

Besides Kito'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.

Thursday Sep 25, 2014

Spotlight on GlassFish 4.1: #11 Enable Remote Admin

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

#11 Enable Remote Admin

When you unzip GlassFish 4.1, the Administration user has no password set. This was introduced quite some time ago to simplify the developer experience. For obvious security reasons, the remote admin capabilities are also disabled. So the default Admin user is 'admin' and its password is empty.

To enable remote Admin, you should first define a password for the admin user and then enable remote admin. The trick is that the change-admin-password command is asking the admin password, in that case you should leave it empty.

./asadmin change-admin-password 
Enter admin user name [default: admin]> [leave it empty to use the default value]
Enter the admin password> [make sure to leave this field empty]
Enter the new admin password> myNewPassword
Enter the new admin password again> myNewPassword
Command change-admin-password execute

You can enable the securre-admin.

./asadmin enable-secure-admin
Enter admin password for user "admin"> [fill in the new password you have defined]
You must restart all running servers for the change in secure admin to take effect. Command enable-secure-admin executed successfully.

And just restart the domain and you are all set!

./asadmin restart-domain domain1

The 'empty admin password' is mentionned in the initial page of the first chapter of the Administration Guide.

Wednesday Sep 24, 2014

Java EE 8 JSRs Unanimously Approved!

The 7 JSRs submitted in August for Java EE 8 have been unanimously approved, with 24 'Yes' votes, by the JCP Executive Committee!
The different Specification Leads are now starting to formally assemble their Expert Group (see instructions for joining the JCP). JUG members can also help with any of these JSRs through the Adopt-a-JSR Program. And in case of doubt, just reach out to the Specification Lead you wan to work with, he/she will be able to guide you (e.g. JMS).

Those recently approved JSRs added to CDI 2.0, which was approved a few weeks ago, give us an impressive initial set of 8 JSRs for Java EE 8!

Tuesday Sep 23, 2014

MVC 1.0 (JSR 371) at JavaOne

In the early days... well... just a few weeks ago, the idea was to standardise MVC under the JAX-RS umbrella.  At that time, we didn't think to submit a JavaOne proposal for a dedicated MVC session. But since then, a lot of things has happened and MVC has now its own JSR (see here for some background).  

Fortunately, we were able to squeeze, the the JavaOne schedule, a dedicated MVC 1.0 BoF. This BoF will be hosted by Manfred Riem who is leading this new specification with Santiago Pericas Geertsen. It will take place on Tuesday Sep. 30 (7:00-7:45 PM) at the Hilton (Continental Ballroom 4), make sure to add it to your schedule!

Manfred is also co-leading JSF 2.3, you can see Manfred's JavaOne duties here.

Monday Sep 22, 2014

Meet the Java EE 8 Experts at JavaOne

During JavaOne, you will have many occasions to discuss with different Java EE Specification Leads or other key Java EE staff:

This year, we have also arranged a Meet the Experts area. It is a designated space in the JavaHub where most of the Specification Leads will be present at a dedicated time (see schedule below). Oracle's Java EE Evangelists and Heather VanCura from the JCP will also be present. It will be the ideal place to carry on informal conversations about Java EE8. Also, keep in mind that the various Expert Groups are being formed so it is also the perfect time to ask what it takes to join an EG!

Monday, September 29 (Dedicated pavilion hours: 1:30-2:30 PM)

10-11 AM  Bruno Borges  Adopt-a-JSR for Java EE 8, any Java EE 8 technologies
11-12 PM  Martin Grebac  JSON-B
12-1 PM  Kin-man Chung  JSON-P and EL
1-2 PM

 Marek Potociar

 Pavel Bucek 

 JAX-RS 2.1

 WebSocket 1.1

2-3 PM  Linda DeMichiel  Java EE 8
4-5 PM  Reza Rahman  Adopt-a-JSR for Java EE 8, any Java EE 8 technologies

Tuesday, September 30 (Dedicated pavilion hours: 1:30-2:30 PM)

10-11 AM  Heather VanCura  JCP/JCP.Next (JSR 364), Adopt-a-JSR
11-12 PM  Martin Mares  Java EE Management
12-1 PM  Nigel Deakin  JMS 2.1
1-2 PM  Reza Rahman  Adopt-a-JSR for Java EE 8, any Java EE 8 technologies
2-3 PM  Ed Burns, Shing Wai Chan  JSF 2.3 and Servlets 4.0
4-5 PM  Marek Potociar  JAX-RS 2.1

Wednesday, October 1 (Dedicated pavilion hours: 2:00-3:00 PM)

12-1 PM  Brian Oliver  JCache
1-2 PM  David Delabassée  Adopt-a-JSR for Java EE 8, any Java EE 8 technologies
2-3 PM  Manfred Riem  MVC 1.0 and JSF 2.3

Wednesday Sep 17, 2014

JMS 2 Hands-on-Lab Video and Materials

I ran a virtual JMS 2 hands-on-lab on August 14th. Stephen Chin graciously hosted the lab through his excellent NightHacking virtual worldwide meetups. The goal of the lab was to give attendees some first-hand experience with the primary changes in JMS 2. In the first hour or so I did a brief presentation overviewing JMS 2 and went over the JMS 2 Javadocs. The rest of the time attendees actually wrote JMS 2 code mostly by themselves. There was also some pretty good interaction and Q&A throughout the lab. The entire lab was video recorded and is available below. The slides I used are available on SlideShare.

The lab materials are hosted on GitHub for anyone to use. The lab uses NetBeans 8, GlassFish 4 and Arquillian. I've deliberately designed the lab materials to be fairly self-guided so you can definitely use the lab materials on your own (or perhaps even run the lab in your own company/JUG?) . You are always welcome to reach out to me when needed.

Whether it can be called TDD (Test-Driven Development) is debatable but in the lab you'll basically be putting in code to finish a set of JUnit tests using JMS 2, starting from incomplete code with comments on what to do (don't worry, a completed solution is also posted :-)).

Tuesday Sep 16, 2014

Java EE Configuration JSR Deferred

Configuration was one of the more popular items on the Java EE 8 survey. While the exact features that would be included in a configuration JSR for Java EE remains relatively vague, I think we were all looking forward to a possible JSR largely spearheaded by Anatole Tresch of Credit Suisse. The idea was that such a JSR would provide a cohesive solution for configuring Java EE applications and would receive a level of support from Oracle, including possibly sharing responsibility for leading the specification. Unfortunately the configuration JSR effort has currently been deferred for unforeseen but unavoidable circumstances principally related to long-term resourcing commitments especially for developing and maintaining the associated reference implementation (RI) as well as the compatibility test kit (TCK).

This is truly unfortunate as this would have been a shining example of a non-Java EE vendor (in this case Credit Suisse) contributing a significant part of the Java EE platform. It is still important to applaud Anatole Tresch for his initiative, passion, dedication and courage. Similarly the community should be grateful to Credit Suisse for seriously considering such a significant investment to help move the Java EE platform and community forward. As all of us in IT know, making tough calls on resourcing is never easy and it is far better to make difficult decisions early rather than at later stages of an effort. Anatole is still moving forward with his JavaOne 2014 talk on the configuration JSR effort. The talk is a great opportunity to share ideas and solidify underlying use cases through community feedback. This thought provoking post alludes to some of the complex uncertainties that this JSR would need to carefully explore.

While a cohesive configuration JSR effort must be deferred at least for now, there is no reason to dismay too much. Some of the more well-understood problems that such as JSR would have solved could still be considered as part of the Java EE 8 platform JSR. A separate JSR would have likely required a high degree of collaboration at the platform level anyway. Another possibility is to have core APIs like CDI consider what needs to be done to make configuration easier in Java EE. Lastly, it's worth keeping in mind that some of the problems that such as JSR would have addressed may already be solvable using mechanisms included in Java EE or with tools that are commonly used in Java EE development such as:

  • Using the <alt-dd> tag that has been included in Java EE for a while.
  • CDI @Alternative.
  • JSF project stages.
  • The configuration centric features included in DeltaSpike Core. The mature Apache Commons Configuration project has had similar capabilities for a while, albeit more focused on look-up (rather than injection) and Java SE (rather than Java EE).
  • The rich set of configuration and conditional build focused Maven features such as profiles and replacers (this really isn't anything specific to Maven, most emerging or mainstream build systems have such capabilities for good reasons).

In my own personal experience as a consultant I have found the Maven features in particular a sufficient, easy-to-use and elegant solution for the vast majority of Java EE projects. That being said the distinction for the configuration JSR might have been that while Maven is a build-time solution, there is perhaps a need to solve configuration issues at deployment-time or at run-time. One should note though that while dependent upon non-standard tooling many modern application servers do support changing JNDI bindings at runtime.

What do you think? As always, don't hesitate to sound off here.

Please note that any views expressed here are my own only and certainly does not reflect the position of Oracle as a company.