Monday Mar 31, 2014

Java EE 8 Survey Final Results

As many of you know, we have been reaching out to the community through the Java EE 8 survey to solidly kick start the next revision of the platform. While the first and second parts of the survey asked for input about specific items to consider, the third and last part of the survey asked the community to prioritize among a distilled subset of the most popular features. We closed the last part of the survey last Monday and now are very proud to share the final results with you. The survey effort has been very successful with close to 4500 total responses.

The following pie-chart shows how the community prioritized things (the percentages indicate the points a feature received and features are ordered by popularity):

Java EE specification lead Linda DeMichiel posted the detailed results of the final part of the survey on her personal blog. If you haven't done so already, you should also make sure to check out the detailed results from parts one and two.

We are all very thankful to the community for taking the time to take the survey. Hopefully many of you will stay engaged as we move forward with Java EE 8. One of the best ways to stay engaged is joining one of the expert groups listed on the project for the Java EE specification. Remember that for many specifications you can also simply join the user alias for a specification, enter a JIRA or vote on an issue even if you are not part of the expert group itself.

Finally, we'll post updates on this blog as we move forward with Java EE 8, so do stay tuned. 

Friday Mar 28, 2014

Migrating JDBC Resources from GlassFish to WebLogic

Customers and users always want to make sure their
Java EE applications run nicely in any application server. But it is not uncommon that sometimes resources must be migrated by hand, or luckly and preferably automated with scripts.

So in order to help our customers and users in getting ready for future migrations from GlassFish to WebLogic, I am following up with my series of articles about Migrating from GlassFish to WebLogic

This time I covered the migration of a resource every Java EE developer knows very well: JDBC resources, or simply, DataSources. But before that, make sure you read the first article in case you haven't: Migrating a Java EE App from GlassFish to WebLogic

Continue reading "Migrating JDBC Resources from GlassFish to WebLogic" ...

Thursday Mar 27, 2014

Lyon JUG & Alpes JUG Trip Report

Last week, I was in France to talk about "Java on the Server" at the Lyon JUG and the day after, I was in in Grenoble at the Alpes JUG to cover the same topic. 

The first half of the evening was devoted to Java EE 7. Java EE 7 is not even a year old, so it is still an important and relevant topic as a lot of people are not yet up-to-speed on Java EE 7.
The second half of the evening was spent on Project Avatar and its underlying layers (Nashorn and Avatar.js). It's alway a bit surprising to see, in a Java audience, how popular Node.js is. At both places, roughly +10% of the audience was using Node!  

Those 2 Java User Groups are some of the french JUGs that have been a bit neglected lately by Oracle and this for various reasons so my visit there was important (and long overdue)!

If your JUG would like us to come to talk about Java EE and related topics, fell free to contact us (e.g. by mail or through the comments of this blog). We are a small team so we won't be able to go and talk to all JUGs but we are distributed and we'll do our best. And if needed, we can also do sessions remotely. 

The slides of both sessions can be found on my personnal blog.

Wednesday Mar 26, 2014

Introduction to GlassFish Management and Monitoring

Robust management and monitoring is a key value proposition for modern Java EE application servers that most developers seem to be unaware of. Fortunately this is changing rapidly as more and more developers get exposed to operations concerns via the DevOps movement.

GlassFish has never been a slouch when it comes to management and monitoring (although an application server like WebLogic truly excels in this area). GlassFish has long provided many ways for management and monitoring including the admin console GUI, the asadmin command-line tool, a REST admin interface and JMX. If you don't know about these features as a GlassFish user, you owe it to yourself to learn a bit more about it.

A golden opportunity for this was recently organized by our friends at the London GlassFish User Group. On March 6th they organized an excellent virtual event with celebrated Java EE advocate, author, JCP expert and Java Champion Adam Bien on GlassFish management and monitoring. Fortunately for all of us, the event was recorded and you can check out the video below:

Much of the material covered in the talk is also covered in a recent OTN article that Adam wrote - it might be easier to use as a reference.

Tuesday Mar 25, 2014

Java API for JSON Processing (JSR 353)

Computer programs are the most complex things that humans make.” (Douglas Crockford)

JSON (JavaScript Object Notation) is a widely used, lightweight, simple data-interchange format. JSON is not so new but there is, since a few months, a formal ECMA standardising JSON: "ECMA 404 - The JSON Data Interchange Format". ECMA 404 is probably the sweetest and easiest specification to read and grasp! The document is 14 pages long but if you remove all the decorations, the specification itself is not even 7 pages long!

Java API for JSON Processing (JSR 353) is one of the 4 new APIs added to Java EE 7 alongs with the Batch API (JSR 352), the WeSocket API (JSR 356) and the Concurrency Utilities for Java EE API (JSR 236). JSR 353 provides an API to parse, transform, and query JSON data using the object model or the streaming mode.

Java has a long history of various JSON APIs but the value of JSON-P (JSR 353) is the fact that it has been standardised. That means that we can expect this API to work seamlessly on any Java EE 7 implementations, i.e. GlassFish 4, JEUS 8 and WildFly 8 today. And this is juts the beginning, we can also expect the adoption of JSON-P API to rapidly grow. For example, the upcoming WebLogic 12.1.3 will add support for various Java EE 7 APIs including JSON-P, see here.

It should be mentioned that binding is not yet covered by this specification but JSON-B is high on the wish-list for Java EE 8.

To know more about JSON-P, you can read the JSON-P chapter of the Java EE 7 Tutorial or watch the 'JSR 353: JSON Processing API in Action' session from last JavaOne.

Monday Mar 24, 2014

Tyrus 1.5 released! Just in time for Java 8


A new version Tyrus 1.5 (reference implementation of JSR 356 WebSockets API), was released. With it you get of course bug fixes and improvements, but most importantly a runtime fix on Java 8! And a few more things: 

 Going back to the JDK 8 issue, the good thing is that Tyrus 1.5 fixed the support of inherited annotated methods. If you are curious about this, go check Pavel Bucek's weblog post about the new Tyrus 1.5 release. Oh and if you want to know what's up with the math function above, since you are a WebSocket developer you may want to know what is the probability of two people will talk at the same time.


Friday Mar 21, 2014

Code PaLOUsa 2014 Trip Report

Code PaLOUsa 2014 took place 24-26 February in Louisville, Kentucky. Code PaLOUsa is a fairly unassuming conference with great quality farther away from the beaten paths. Topics covered included Java, .NET, JavaScript, mobile, methodology and Big Data/NoSQL. On my way to Kentucky, I was able to stop by at the Montgomery County (Maryland) JUG for a Java EE 7 session.

At Code PaLOUsa I delivered a talk on aligning Java EE with NoSQL as well as a talk on the Cargo Tracker Java EE/Domain-Driven Design Blue Prints project (this talk was recorded by InfoQ). More details, including slide decks and code, posted on my personal blog.

Thursday Mar 20, 2014

JCache is Final! I Repeat: JCache is Final!

"The only reason for time is so that everything doesn't happen at once."
(Albert Einstein)

If you have not been following the evolution of the JCache specification, aka JSR 107 - "Java Temporary Caching API" or if you simply forgot, it is fair to say that the work on this JSR took 'a bit longer than expected'!

Just as a reminder, JSR 107 was started in 2001 and to put things in perspective, J2SE 1.4 was released in 2002! So there has been clearly 'a few hiccups here and there'... Anyway, the good news is that JCache is now final! I repeat: JCache is final! Let's salute the tenacity and the perseverance of the different EG members who drove this specification to its finalization!

The "Java Caching: The State of the Union" video from last JavaOne is a good resource to better understand JCache and the history behind this specification. At a hundred and fifty some pages, the official specification itself is also fairly readable.

While JCache is certainly more than a bit overdue and narrowly missed Java EE 7, interest and support for it has been high in the community and industry for a long time. It had a strong showing in the results of the Java EE 7 survey - over 80% wanted it added to the platform. It has a similarly strong showing in the results of the first part of the Java EE 8 survey.

You should feel free to download and evaluate JCache. It should be possible to use it as a drop-in addition to a Java EE 6 or Java EE 7 application. Although JCache does not specifically address Java EE integration most common use cases should be supported, including a pretty cool set of caching annotations that work with CDI. One possibility is to better define Java EE integration in the Data Grids JSR (JSR 347), most notably JTA/transaction support. Now that JCache is done, the Data Grids JSR is likely to be spun up, so you should stay tuned...

PS: Would you believe me if I said that this post was drafted some time ago? ;-)

Tuesday Mar 18, 2014

A CDI 2 Wish List

CDI has been a keystone API for the platform since Java EE 6. While CDI 1.1 was a relatively minor point release, there has been a lot of work in Java EE 7 better aligning various specifications like JSF, Bean Validation, EJB, JTA and JMS with CDI. Indeed some of the most popular items in the Java EE 8 survey has been and continues to be alignment with CDI. With so much going on around the API, it is easy to overlook the fact that CDI itself needs to continue to innovate, mature and align with trends in the dependency injection ecosystem at large. While there have been a decent number of wish lists for Java EE overall and various other Java EE APIs, there has been far less discussion on the way forward for CDI. Until now - CDI 2 specification lead Antoine Sabot-Durand himself recently blogged about his wish list to help jump start the discussion.

The list is quite good and well worth a read. Some of the items that might interest you include Java SE support, XML configuration, better asynchronous support, CDI version of EJB @Startup and much, much more. Do you have ideas for CDI 2? Now is the time to get more involved. The many ways to get involved with the CDI specification are outlied here.

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 Mar 14, 2014

Jfokus 2014 Trip Report

Jfokus 2014 took place 3-5 February in Stockholm, Sweden. Jfokus slates itself as the largest developer conference in Sweden and it certainly is quite significant in terms of both content quality and attendance. The event attracted a bevy of World class speakers including quite a few of my fellow Oracle colleagues - Mark Reinhold, Georges Saab, Stephen Chin, Simon Ritter, Mark Heckler, Angela Caicedo, Geertjan Wielenga (NetBeans), Heather VanCura (JCP), Cecilia Borg (OpenJDK), Joel Borggrén-Franck (JDK) and Marcus Hirt (JDK). Notable other folks speaking included Venkat Subramaniam, David Blevins, Pratik Patel, Trisha Gee, Martijn Verburg and Anton Arhipov. Topics covered included Java SE, Java EE, embedded Java, JavaScript, cloud, mobile, DevOps, agile and Big Data/NoSQL.

I delivered a half-day Java EE 7 workshop using Cargo Tracker and a talk on aligning Java EE with the JavaScript/HTML 5 ecosystem. I also participated in a BoF on the JCP, OpenJDK, Adopt-a-JSR and Java EE 8 as well as a shootout on static vs. dynamic languages. More details, including slide decks and code, posted on my personal blog.

Thursday Mar 13, 2014

Participate in the Future of Java

"The best way to predict the future is to invent it." (Alan Kay)

Sometime, some people tends to overlook a critical element of the Java ecosystem, i.e. the Java Community Process. The JCP is the mechanism for developing standard technical specifications for Java technology. The JCP is clearly one of the key pillar of the whole Java ecosystem.

Heather VanCura who manages the JCP Program Office has recently done a presentation at the Israel JUG. Heather's slide deck (see here) is really a useful ressource as it answers a lot of JCP related questions, it's almost a "FAQ on slides".

In her slides, Heather addresses questions such as :

  • What is the Executive Committee? How it operates?
  • The different levels of participation
  • The different roles within the JCP
  • The different deliverables of an Expert Group
  • What has the JCP done to be as open as possible?
  • How the JCP is evolving ("")?
  • ...

And more importantly, it also explain why you should get involved in the JCP. Being involved in the JCP, at any level, allows anyone to define the future of Java!

Wednesday Mar 12, 2014

JPA 2.1 Entity Graphs

Entity Graphs are a very important but somewhat underrated enhancement in JPA 2.1/Java EE 7. The feature significantly improves the ability to load/fetch JPA data beyond the very coarse grained mechanism of traditional ORM lazy and eager loading. Applied correctly, entity graphs could significantly improve application performance in still a fairly elegant way. Hantsy Bai does an excellent job explaining the basics of JPA 2.1 entity graphs in a recent blog post. He demonstrates how to define an entity graph using annotations or programatically, using the entity graph in a simple query and the basic value proposition for entity graphs. Linda DeMichiel dedicated a good amount of time explaining entity graphs during her JavaOne 2013 talk on JPA 2.1 (video below).

The official Java EE 7 tutorial also has a pretty decent section on entity graphs. It is definitely worth your time to understand the feature well and apply it in your JPA applications.

Tuesday Mar 11, 2014

Java 8 Launch

JSR 337 who defines the content of Java SE 8 is now Final! That means that Java 8 is about to be released.

Over the coming months, a lot of events will take place across the globe to celebrate this important release.  Here's a recap of the initial Java 8 events that are taking place over the next 2 weeks.

NightHacking Java 8 Tour (March 11th - Apr 19th)

The NightHacking Java 8 Tour is the inaugural leg of the Java 8 Tour event where the Java SE evangelism team will be crossing the globe to speak at conferences and Java User Groups to spread the word about the new Java 8 release. See more info here.

Java 8 Day at EclipseCon (March 18th - San Francisco)

The Eclipse Foundation and Oracle are hosting a Java 8 Day at EclipseCon 2014. This will be a great opportunity for attendees to learn about the new Java 8 features and share in the excitement of the Java 8 launch. See more info here

Java 8 Launch Webcast (March 25th)

On March 25th (10am PST), Oracle will host a live webcast that will feature various speakers, panel discussions, several videos introducing the Java SE 8 features, a live chat, etc. Make sure to attend by registering here.

Be a part of it as we create the future with Java 8!

Monday Mar 10, 2014

Java EE 8 Survey Last Call!

As many of you are aware, we have been running the Java EE 8 survey as a way to solidly kick start the next round of standardization for the platform. We would now like to wrap up the survey and move on to the next logical steps. To that end, we will be closing the third and final part of the survey in the next two weeks (specifically on Monday the 24th, midnight Pacific time). If you still have not filled out the survey, please do now:

While part one and two focused on specific features, this last part is all about assigning priorities to the most important features. In some ways, this is the most important part of the survey so we highly encourage you to help us by providing input as early as possible and help correctly shape the future of Java EE. If possible, please also help us out by getting the word out.

We look forward to hearing from you!