Thursday Apr 24, 2014

Reminder : Virtual Developer Days - Java 2014

The first occurrence of the Java Virtual Developer Day for 2014 will take place in less than 2 weeks! So if you plan to attend, it is time to register!
Not only you will have a chance to learn about the latest evolutions in the Java space, i.e. Java EE 7, Java SE 8 and Java Embedded. You will also have the opportunity to interact and ask questions to various experts.  And the best part is that VDD are free to attend so do not miss this opportunity!

To cope with the different Time Zones, the VDD will be run 3 times :
  • May 6th : 9:00 a.m. - 1:00 p.m. PDT / 12:00 p.m. - 4:00 p.m. EDT / 1:00 p.m. – 5:00 p.m. BRT
  • May 14th : 9:00 AM  - 1:00 PM BST/  10:00 AM  - 2:00 PM CEST / 12:00 Noon - 4:00 PM GST /  12:00 Noon - 4:00 PM MSK 
  • May 21st : 8:30 AM - 12:30 PM IST  / 11:00 AM  - 2:30 PM SGT / 1:00 PM  - 4:30 PM AEDT 
The complete agenda and the registration details can be found here.

Wednesday Apr 23, 2014

Webcast: Migrating from GlassFish to WebLogic

Logo

As previously announced, WebLogic Server is where Oracle is focusing it's commercial support efforts, supporting the increased delivery of bug fixes, new features, and Java EE 7 APIs.  Which is something our customers are keen to experience.

We will continue to invest in GlassFish as the reference implementation for the Java EE platform, which will continue to be a good option for users to deploy their applications using an open source product.  We will continue to develop and release the GlassFish Open Source Edition.

We are seeing that many GlassFish customers and users want to be on (or move to) a supported application server. Customers of Oracle GlassFish Server may now start planning the migration with ease, and users of GlassFish Server Open Source Edition can start studying the when's and how's of such migration.

Which is why for those who are looking forward to experiencing the feature-rich Oracle WebLogic application server, I will give you in this developer webcast an overview of Oracle WebLogic Server and take a sample Java EE application to walk you through the most common migration scenarios to get your applications redeployed on WebLogic. You will hear about:

  • WebLogic Installation Process, Architectural Concepts, and Clustering Setups
  • Migration of Common Java EE Resources (JDBC, JMS)
  • Seamless GlassFish to WebLogic Redeployment
  • Advanced Classloader Analysis and Configuration
  • Shared Libraries
  • Tools to automate massive migrations
Date: Wednesday, April 30, 2014
Time: 10:00am PT / 1:00pm ET
Register for free online event today

Watch the webcast, and if you have questions, send to me over Twitter at @brunoborges and I will be happy to answer them!


Tuesday Apr 22, 2014

New book: Java EE 7 with GlassFish 4 Application Server

The third edition of David Heffelfinger's Java EE book has been recently released. This updated edition is covering the latest version of the Java EE Platform, i.e. Java EE 7.

The book gives a wide introduction on the Java EE Platform and its major APIs in their latest version: JPA 2.1, EJB 3.2, JSF 2.2, CDI 1.1, JMS 2.0, JAX-RS 2.0, Beans Validation 1.1, JAX-WS 2.2, etc. The book also cover 2 of the APIs introduced in Java EE 7 : the WebSocket API and JSON-P.

So if you are new to Java EE 7 or if you have been stuck on an older version the platform, reading this book will give you a good technical overview of Java EE 7, its main APIs and they works. It will give a solid overall understanding of Java EE 7 to rapidly start. You will then be able to deep more easily in the Platform and its APIs.


NB : The book samples are using GlassFish 4 but most of the content of the book is also applicable to any other Java EE 7 application server... that's the beauty of the Java EE!

Friday Apr 18, 2014

CDI 1.2 Released

As you know, CDI 1.1 is an important part of Java EE 7. You may be happy to know that the CDI specification just releases another minor point release - 1.2. As you can imagine the release contains a small number of fixes and clarifications. If you are surprised that a technology that is part of the Java EE platform had an independent release, you really shouldn't be. Although for various practical reasons Java EE technologies are usually synchronized with the platform JSR, individual JSRs are completely free to follow their own release schedule. Past examples include JSF and JAX-RS (and quite possibly JCache now).

The detailed list of changes are outlined on the CDI specification site.

Thursday Apr 17, 2014

GlassFish Story by Rakuten/Makito Hashiyama

Rakuten is one of the largest e-commerce platforms in Japan and perhaps the world. They chose GlassFish to form a core of their extensive (24 X 7) platform. Makito Hashiyama, the lead for the Rakuten marketplace platform shared their adoption story at the JavaOne 2013 Sunday GlassFish community event - check out the video below:

Makito detailed how GlassFish enabled Rakuten to handle the peak load of one of the biggest online sales events in Japan. By tuning GlassFish worker threads on a (42 X 3) instance cluster Rakuten was able to process 12,000 transactions per minute despite having a high latency external system dependency. Makito mentioned that one of the key reasons Rakuten adopted GlassFish for their platform was because of early support for Java EE standards such as JAX-WS. He also mentioned that beyond simply using GlassFish Rakuten regularly contributes patches into the GlassFish code base. 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.

Wednesday Apr 16, 2014

JSON Schema

We often tends to compare JSON against XML, i.e. JSON is simple, XML is not so simple. JSON is light, XML is heavyweight, etc. But there are still reasons to prefer, in certain cases, XML over JSON : e.g. transformation capability, XML extensibility, validation, ...

A question I sometime get when I talk about JSON-P support in Java EE is what about Schema? The works around JSON Schema standardisation is progressing but right now, this is still a draft specification. Nevertheless, this is something that you can already start to use. For example, this post shows how-to generate JSON Schema with Eclipse Link MOXy today.

As said earlier, the JSON Schema space is evolving, there are works that needs to be done at various levels but we can expect, over-time, an improved support for JSON Schema in the Java ecosystem. 

Tuesday Apr 15, 2014

Asynchronous CDI Events?

CDI events are a very powerful feature that enable loose coupling in a very simple and type-safe way. One aspect of CDI events that surprises many folks is the fact that they are synchronous rather than asynchronous. The surprise is perhaps fairly natural as similar event systems are usually asynchronous. Piotr Nowicki explores the issue in a very well thought out post exploring the various options for making CDI events asynchronous using plain Java EE features such as EJB @Asynchronous, Singleton locks and JMS. Exploring this issue further is probably very timely with the gradual rise of node.js/Reactive Programming.

Very encouragingly CDI 2 specification lead Antoine Sabot-Durand himself mentioned asynchronous CDI events as a possibility in his personal CDI 2 wish list. He suggests adding an asynchronous flag to the @Observes annotation. A possible downside to this is that the consumer rather than the producer makes the decision to go asynchronous. Another possibility is putting the asynchronous marker on the producer possibly using the type annotations facility introduced in Java SE 8:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
public class EventProducer {
 
@Inject Event event;
 
public void doSomething() {
MyEvent e = new @Async MyEvent();
e.data = "This is a test event";
e.eventTime = new Date();
event.fire(e);
}
}
 
public class EventConsumer {
 
public void afterMyEvent(@Observes MyEvent event) {
// .. Insert event logic here
}
}
view raw CdiAsyncEvents.java hosted with ❤ by GitHub

What do you think about the issue and the possibilities? This is the time to sound off as the horizons for CDI 2 are emerging.

Monday Apr 14, 2014

David Heffelfinger's Java EE/GlassFish Adoption Story

David Heffelfinger is the Chief Technology Officer of Ensode Technology and an ardent US based Java EE/GlassFish advocate. He has authored no less than four titles on Java EE/GlassFish. David shared a Java EE/GlassFish adoption story at the JavaOne 2013 Sunday GlassFish community event - check out the video below:

He detailed how he convinced a long time customer to upgrade their application servers and use Java EE/GlassFish with PrimeFaces by hacking together a quick demo. Using the combination of Java EE 6, GlassFish, PrimeFaces and NetBeans allowed him to lead a relatively inexperienced team in delivering the first version of the application in just three weeks. David also mentioned that using GlassFish as a learning tool helps keep his skills sharp and in-demand as GlassFish adopts the newest Java EE APIs faster than the other options. You can check out the details of his story on the GlassFish stories blog.

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

Friday Apr 11, 2014

Non-blocking I/Os in Servlet 3.1

With the advent of platforms and frameworks such as Node.js, Vert.x, ... and more generally the rise of the Event-driven programming paradigm, asynchronous non-blocking I/Os are becoming more and more important in today's web applications.

Prior to Servlet 3.0, Servlet were synchronous. Servlet 3.0 (part of Java EE 6) added support for asynchronous request processing but only with ‘traditional’ I/Os (i.e. blocking I/Os) but this approach can sometime limit the scalability of an application.

The support for non-blocking I/Os has been added for Asynchronous Servlet in Servlet 3.1 (JSR 340 - part of Java EE 7). The net result is that the number of connections that can simultaneously be handled by the Servlet Container is greatly increased. This improves the resources utilization and the overall Web Container scalability.

It should be mentioned that other features haven added to the Servlet 3.1 such as support for the HTTP 1.1 Upgrade Mechanism. This new capability is used, for example, by the WebSocket API (JSR 356) to upgrade an existing HTTP connection to a TCP based WebSocket connection. In Servlet 3.1, the HTTP Upgrade Mechanism can also use non-blocking I/Os.

This article and this JavaOne session explains how asynchronous non-blocking I/Os in Servlet 3.1 The JavaOne session also covers the HTTP Upgrade mechanism and the other additions to the Servlet 3.1 API (various security enhancements and other miscellaneous features).

Thursday Apr 10, 2014

JSF + AngularJS = AngularFaces?

In case you haven't noticed, there's a pretty big shakeup going on in the world of Web UIs. Powered by several factors, JavaScript/rich client frameworks like AngularJS appear to be presenting a serious challenge to the server-side stalwarts of JSF, Spring MVC and the like. What will happen in the long run is anybody's guess.

In the meanwhile we can expect great thought experiments like the one represented by the recent survey results on the future of the view layer in Java EE applications put together by none other than java.net editor Kevin Farnham. Anyone that understands the Gartner Hype Cycle will likely observe that the crest of inflated expectations are probably already in full swing for JavaScript frameworks. In fact I would say that the reactions of the java.net readers if anything was a bit muted in favor of server-side frameworks as were some of the more well thought out comments that Kevin highlights. Another very interesting data point is the surprisingly good support for adding a new action-based/MVC web framework to Java EE in our own Java EE 8 community survey results.

One of my most recent talks titled JavaScript/HTML5 Rich Clients Using Java EE 7 actually tackles some of these very questions. Based on my years of experience working with a wide variety of clients and feedback from some JavaScript rich client early adopters I know well, it looks to me that the near future is likely one of mutual coexistence. In fact I think a very common scenario in the very near term is probably islands of JavaScript/rich client functionality in otherwise server-centric UIs. The ever vibrant JSF ecosystem is actually already busy trying to figure out this interesting puzzle. One of the most interesting such pilot projects is AngularFaces. It combines JSF and AngularJS in a way that almost makes it look too easy. If this is an approach that interests you, it is definitely a project worth checking out, not to mention the blog entry linked.

Do you have an opinion or insight on this you'd like to share? Now is a great time to express it or at least start thinking about it.

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

Wednesday Apr 09, 2014

Method Validation in Bean Validation 1.1

Although it's a point release Bean Validation 1.1 brings a number of important features to Java EE 7. Easily the most important such feature is method validation. Beyond helping enforce design-by-contract in key service layer API classes (typically implemented in EJB3 or CDI) method validation plays an important role in helping ensure valid input to remote client endpoins written in JAX-RS and WebSocket. Hardy Ferentschik of the JBoss community explains the feature well. There's also the 15-minute Bean Validation 1.1 presentation by specification lead Emmanuel Bernard on the GlassFish videos YouTube channel as well the slide deck for my own lighting talk:

If you are interested in how method validation might be used in a realistic scenario with JAX-RS and WebSocket, feel free to dig into my example application on GitHub demostrating how Java EE 7 can be used with JavaScript MV* frameworks (in this case AngularJS).

Tuesday Apr 08, 2014

New book: EJB 3 in Action, Second Edition

'EJB3 in Action' is one of the reference books when it comes to this important area of Java EE. The second edition covering EJB 3.2 has just been published.

Over the years, the EJB specification has come a long way and has been greatly simplified but nevertheless EJB is still a large specification to grasp. This book is a great (and up-to-date!) introduction to the EJB Component Model. The book goes beyond just introducing EJBs in details as it also explains technologies related to EJB such as CDI and JPA (the older amongst us will remember that EJB, back in the days, used to also handle persistence). The book has also a full chapter devoted to WebSocket, a new important Java EE 7 technology. The final chapter of the book is devoted to a critical, some time over looked, topics: testing.

This is not a pure theoretical book as it really gives 2 views, it first introduce and explains EJBs but also JPA, CDI, etc. The book then explain how to use EJBs and the other technologies, how to put them in action! All in all, a great book to add to any Java EE 7 bookshelf!

Disclaimer: 'EJB 3 in Action' was co-authored by our own Reza Rahman. But to be honest, I was already praising the first edition of the book when Reza wasn't yet working for Oracle.

Friday Apr 04, 2014

Free Java Virtual Developer Day

Next month, Oracle will host a Virtual Developer Day covering Java SE 8, Java EE 7 and Java Embedded.

By attending the VDD Java EE Track, you will get an introduction to the new APIs added to Java EE 7 : Concurrency Utilities for Java EE (JSR 236), the Batch API (JSR 352), JSON-P (JSR 353) and the WebSocket API (JSR 356). In addition, JAX-RS 2.0 and JMS 2.0 will also be covered.

The VDD is also your chance to interact with various Oracle experts. Several Specification Leads and the Java EE Evangelism Team will be available during the whole event to answer all your questions.


To cope with the different Time Zone, the VDD will be run 3 times :
  • May 6th - 9:00 a.m. - 1:00 p.m. PDT / 12:00 p.m. - 4:00 p.m. EDT / 1:00 p.m. – 5:00 p.m. BRT
  • May 14th - 9:00 AM  - 1:00 PM BST/  10:00 AM  - 2:00 PM CEST / 12:00 Noon - 4:00 PM GST /  12:00 Noon - 4:00 PM MSK 
  • May 21st - 8:30 AM - 12:30 PM IST  / 11:00 AM  - 2:30 PM SGT / 1:00 PM  - 4:30 PM AEDT 
The VDD is free to attend, just make sure to register. The complete agenda and the registration details can be found here.

Thursday Apr 03, 2014

Last Call to Submit to the JavaOne Java EE Track

This is a first and last reminder from us to all of the folks out there that the JavaOne CFP closes on April 15 - just about two weeks from now.

The procrastinator in you might be thinking two weeks is plenty of time. In reality if you haven't started working on your submissions yet, you are probably setting yourself up for some stress that will likely result in a weak submission. This is especially true if like most of us you will need to collaborate with others or get your boss's approval for your submission. Putting things in perspective the CFP has already been open for about a month so other folks already have a hefty head start to maximize their chances of getting accepted.

We have already had some very decent submissions on the Java EE track that has enabled us to get some early acceptances out and gear up the review process as I write this. That being said, we want to make sure everyone in the community has a fair chance to help us build a strong Java EE track agenda by submitting their best ideas. As always, never hesitate to get in touch if you have a question.

Here are some hopefully helpful hints to help you out:

What We Are Looking For
Consider the following as inspiration for submissions to the Java EE track (the only real limits of course are your own imagination on anything in the Java EE ecosystem):

  • Existing and upcoming Java EE technology JSRs and implementations
  • Cool stuff that extends Java EE in new and interesting ways
  • Case studies using Java EE 5, Java EE 6 or Java EE 7 (including migration from other technologies)
  • Best practices for using Java EE technologies
  • Emerging trends in the ecosystem such as mobile, HTML5, caching, complex event processing, modularity and the like
  • Insightful research, development and analysis work in server-side Java

The Cloud Track vs. The Java EE Track
Note that topics like IaaS, PaaS, SaaS, elasticity, multitenancy, NoSQL, Big Data, DevOps and the like should go on the cloud track instead of the Java EE track. Do make an honest effort in applying your judgement on which track to submit on. Either way, it's not a deal breaker if you don't get it exactly right - we will figure it out for you if all else fails. Similarly, please try not to submit talks that really belong in another track such as tools or dynamic languages to the Java EE track. Believe it or not, the Java EE track is actually far more competitive than many of the other tracks. Similarly, if something clearly belongs in the Java EE track, you'll be doing yourself a disfavor by not submitting to the track as the other track leads won't necessarily move your submission correctly.

The Video to Include With Your Submission
Some people are getting caught by surprise that this year we are requiring a video with the submission, so this may bear some explaining. One of the fundamental purposes of the video is to level the playing field for unkown but great speakers. It allows us to assess your submission a lot better by helping neutralize bias towards people that the reviewers are aware of personally. It need not be anything elaborate at all - just a simple explanation of what you are submitting. For experienced speakers, the video requirement is no big deal at all - just submit the video for any talk you have (or ideally video for the talk you are proposing).

Mark Stephens of IDR Solutions recently put out a great blog entry on the JavaOne submission video requirement. The entry is well worth a look.

Don't Count on an Extension
Fortunately or unfortunately some previous JavaOne CFPs have been extended beyond their initial date. Please do yourself a favor and don't assume this will happen again. You may be winding up denying yourself a shot at submitting your great talk altogether :-).

Finally, here is that all important link to the CFP. Hope to see and accept your great topic soon :-)?

Wednesday Apr 02, 2014

The Java EE 7 Story Infographic + Poster

Sometimes it's easy to lose sight of just how much work is put into a Java EE release and how many people are involved - even for folks like me that have been involved with the platform for a good number of years. The numbers are staggering and awe inspiring at the same time, particularly for Java EE 7. Java EE 7 had 4 new JSRs, 14 new or updated JSRs, 16 spec leads, 32 companies contributing and 187 expert group members involved (many of them independents like most of you). 19 Java user groups worldwide worked on one or more JSRs through the Adopt-a-JSR program. About 1,100 developers participated in the survey to finalize the contents of Java EE 7. From inception to final delivery EE 7 took 42 months - a long journey (the longest for any Java EE specification). In terms of the total number of changes, EE 7 is easily the most significant release of the platform to date. The goal was to produce a Java EE version that remains the core of modern day web and enterprise applications in a sea of changes in the ecosystem while simultaneously trying to make sure it is something developers are excited about and eager to learn/use.

The infographic below encapsulates the story of Java EE 7 (click here to download and view the actual PDF):

It appears your Web browser is not configured to display PDF files. No worries, just click here to download the PDF file.

We actually have a few copies of the infographic printed as nice high quality 20 X 10 posters to give away to you (don't worry, there's enough for at least one per person that filled out the Java EE 7 survey :-)). It makes for a nice geeky conversation piece at the office (I have one that I am looking at right now in my home office). You can pick one up from me if you come to any of my talks, especially on the venerable NFJS tours. I am very proud to have recently joined the all-star NFJS cast of characters as a way to better engage with the US Java community. In fact my first stop is very local - NFJS NY this Friday and Saturday, with a full menu of Java EE topics. Hopefully I'll see you on the tour at some point?

It's fair to say Java EE 7 was more community driven than any other release of the platform ever. We hope to top that with Java EE 8, starting with the community survey that we just published the results for - with your help and through excellent avenues like the JCP, java.net, the GlassFish code base, Java EE Blue Prints and Adopt-a-JSR not to mention the numerous events that our team attends Worldwide throughout the year.