Wednesday Jul 29, 2015

Java EE @ GIDS 2015

Voxxed Days Istanbul 2015 was held on May 9th. This was the first large scale independent Java focused conference ever to be held in Turkey. It attracted some of the best and brightest in the Java ecosystem including Gavin King and Arun Gupta not to mention local Java luminaries like Cagatay Civici (PrimeFaces lead) and Murat Yener (Java Champion). Topics included Java SE, mobile, NoSQL, methodology and of course Java EE. Indeed Java EE had a fairly strong presence at the event. I feel very privileged to be invited to this inaugural event. While in Turkey I am very happy to say I also spoke at two of the largest Java user groups in Turkey - the Ankara JUG as well as the Istanbul JUG.

At Voxxed Days I delivered talks on WebLogic, Java EE 8 and DDD/CargoTracker + Java EE. Others covered topics such as microservices + Java EE, Docker + Java EE, JSF and WildFly. At the Ankara and Istanbul JUGs I delivered demo driven workshops on Java EE 7. More details on the sessions and the trip to Turkey, including slide decks and code, posted on my personal blog.

Monday Jul 27, 2015

Ivar Grimstad's Java EE Sessions at JavaOne 2015

For the Java EE track at JavaOne 2015 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 Ivar Grimstad. Ivar is a Java EE advocate, speaker, blogger and open source hacker. He is a part of the Java EE 8 MVC and Security JSRs. We wanted to talk to him about his two accepted sessions at JavaOne 2015, his expectations for JavaOne and his experiences in the JCP (click here if you can't see the embedded video):

The following are the sessions we talked about:

Besides Ivar'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 Jul 23, 2015

Some JSF news

The JSF Team has just released 2 updates of Mojarra (JSF Reference Implementation) : Mojara 2.2.12 (release notes, download) and the 3rd milestone of Mojarra 2.3.0 (release notes, download).

Mojarra 2.3.0 will be the JSF 2.3 Reference Implementation, which is targeted for inclusion in Java EE 8. So it is clearly 'work in progress' as the JSF 2.3 specification itself (JSR 372) is currently being worked-on.

It should also be mentioned the Arjan Tijms has been recently granted committer rights on Mojarra. There is no need to introduce Arjan as he is well known in the JSF eco-system, e.g. he is one of the 'faces' behind OmniFaces. In this interview, Arajn clarifies the relation between JSF, OmniFaces and PrimeFaces. In addition to JSF, Arjan is also a very active (and vocal) EG member of the 'Java EE Security' JSR (JSR 375). “Proficiat Arjan”; it's great to see community members being so involved!

Wednesday Jul 15, 2015

Java EE @ GIDS 2015

The Great Indian Developer Summit (GIDS) 2015 was held on April 21-24 in Bangalore, with a follow-on GIDS.Mini held on April 25 in Hyderabad. GIDS is very easily the largest and most significant developer event in South Asia. Perhaps reflecting global demographic shifts in software development, GIDS may also now have become one of the largest developer conferences in the world. It was truly a privilege to be able to speak at the event and I am even more fortunate to have had a number of Java EE sessions there. While in India I am very happy to say I spoke at a couple of entirely community driven JUG events at the Madras JUG (Chennai) and the Hyderabad JUG before and after GIDS.

At GIDS and GIDS.Mini I delivered talks on JavaScript/HTML 5 + Java EE, Reactive + Java EE and DDD/CargoTracker + Java EE. The Madras JUG hosted multiple talks on the same day before GIDS. I delivered talks on the JCP, open standards and Java EE, Java EE 8 as well as Microservices + Java EE at the Madras JUG. The Hyderabad JUG hosted the official Java EE 7 Hands-on-Lab as a full day workshop after GIDS.Mini. More details on the sessions and the trip to India, including slide decks and code, posted on my personal blog.

Wednesday Jul 08, 2015

Java EE @ Java Day Tokyo 2015

Java Day Tokyo 2015 was held on April 8th. Organized by Oracle Japan, it is the largest Java developer event in the country. This was another highly successful year for the event with a fully sold out venue packed with youthful, energetic developers. Speakers included Steve Chin, Simon Ritter, Cameron Purdy and Linda DeMichiel. Topics included Java SE, Java EE, IoT and cloud. Java EE always has a strong showing at the event and this year was no exception.

I delivered talks on Domain Driven Design with Java EE using Cargo Tracker and Reactive Java EE in addition to a Java EE 7 workshop. Other Java EE sessions were on Java EE 8, CDI/EJB alignment, Java EE 7, JPA, JSF and real world Java EE adoption in addition to the official Java EE 7 Hands-on-Lab. More details on the sessions and Java Day Tokyo 2015, including slide decks and code, posted on my personal blog.

Tuesday Jul 07, 2015

JPA and Java SE 8 Streams

Retrieving a large, i.e. a very large, dataset using JPA might be tricky as the whole result set has to fit within a java.util.List instance. So a very large data set might potentially hit the memory limits of the sever the application is running on.

For those scenarios with (very) large result set, pagination can be used to work-around that limitation.  See for example this "How To Stream/Serialize JPA Result As JAX-RS Response For Large Data" article.  But for those scenarios, the Java 8 Streams API would also be a good fit! Unfortunately, Streams are not supported in the current release of JPA (JPA 2.1 - JSR 338) as it predates Java SE 8. But this is clearly a potential RFE for the next update of JPA (see this specification RFE here). In addition, some of the JPA implementations have already started to add support for Java 8 Streams (e.g. Hibernate and EclipseLink).

We will have to wait a bit more to see what the scope of 'JPA.next' will be. What do you think? Would you like to see Java SE 8 Streams supported in 'JPA.Next'?

Wednesday Jul 01, 2015

Chicago JUG Adopt-a-JSR/Java EE 8 Session Video

The Chicago JUG has been doing a great job engaging with Adopt-a-JSR and Java EE 8. As part of that effort the JUG hosted a virtual meeting on Google Hangout on May 26. Some of the things that the meeting covered includes:

  • Introduction to the JCP/JSR process
  • Adopt-a-JSR
  • Detailed overview and current status of the different Java EE 8 JSRs
  • The different ways in which JUG members can contribute
  • Live example (picking a few JIRAs and discussing them)

The meeting was led by key Chicago based Java EE author and community advocate Josh Juneau as well as Chicago JUG leader Bob Paulin. The excellent session was recorded and well worth taking a look at (click here if you are having trouble seeing the embedded video below).

If you haven't looked at adopting Java EE 8 JSRs yet, I hope the video helps motivate. The Adopt-a-JSR program is one the key things we are trying hard to do differently for Java EE 8 with the goal making this version of the platform one of the most community driven technologies ever developed. Here are just some of the things you could help do right now:

The full details for Adopt-a-JSR/Java EE 8 is always available here. Remember that if you have any questions on any of this, you are always welcome to drop me a note.

Tuesday Jun 30, 2015

Java 8 Free Online Course: Lambdas and Streams

It is probably fair to say that Java SE 8 is the most important Java release in the last decade… if not more! With the introduction of Lambda expression, Java SE 8 introduced a fundamentally new way of programming. The new Streams API lets process data in a declarative way while leveraging the underlying in more efficient way, etc.

During this summer, Oracle is conducting a Massive Open Online Course (MOOC) on Java 8 Lambdas and Stream. This free online course will start soon (July 14th). During this course, you will have a chance to learn how to :
  • Apply Lambdas to everyday problems
  • Convert anonymous classes to Lambda expressions
  • Apply the Streams API to solve problems of sorting, identifying the most and least, and reducing duplicates
  • Determine when to apply Lambdas (and when not to!)
  • Use Collectors
  • Improve performance with parallel streams
  • Debug Lambda expressions
Even though this is a 'core' Java SE course, it is also very relevant to Java EE developers as more and more Java EE 7 Application Server have been certified to run on top of Java SE 8. In addition, Java EE 8 will mandate Java SE 8 at minimum. So sooner or later... and rather sooner than later, you will use Java SE 8. Given that and if you haven't started yet to look closely at Java SE 8, this free MOOC is really an opportunity you can’t afford to miss. To enrol, just check this page.

Thursday Jun 25, 2015

HTTP/2 and Server Push

HTTP/2, which has been finalized a few weeks ago, is composed of 2 related specifications: RFC 7540 and RFC 7541 (see below). With HTTP/2, the existing HTTP 1.1 semantics are fully preserved as this new version of HTTP aims to be as compatible as possible with current uses of HTTP. The main goal of HTTP/2 is to provide a more efficient use of the network resources and, at the same time, to reduce the overall latency. So the fundamental difference between HTTP/2 and HTTP/1.1 is really at the transport level, i.e. how the bits are exchanged over the network. And that is what HTTP/2's new binary-framed protocol is all about.

HTTP/2 relies on the existing HTTP/1.1 semantics, we keep using the same HTTP verbs (GET, PUT, POST, etc.), the same HTTP status codes and so on. So from a Server-side Java developer perspective nothing should really change. Running an existing application over a HTTP/2 stack should be transparent. We obviously could expect to see improvements at the wire level. That means that most of the HTTP/2 capabilities should not be exposed at the Servlet API level. But there are few exceptions to this rule and Server Push is one the important new HTTP/2 feature that should ideally be made available to the developer.

Server Push is a new HTTP/2 feature that allows a server to proactively 'push' multiple unsolicited resources as a response(s) of a regular client request. And since a server-side application knows what resources are needed to render a particular page, this capability basically let an application to pro-actively push resources needed by a client... before the client even knows that it will need those resources.

The Servlet 4.0 Expert Group now needs to figure out how this Server Push capability should be exposed at the API level. One of the possibilities might be inspired from Greg Wilkins's proposal based on Jetty 9.3's PushBuilder API (see here). Greg is an active Servlet EG member and is the original Jetty developer, he started to develop Jetty 20 years ago using Java 0.9! So happy 20th birthday to Jetty as well!

Useful resources:

Thursday Jun 18, 2015

What's Coming with JSF 2.3?

There seems to be a good deal of excitement in the Java EE community around the new MVC specification. This is certainly great and most understandable. Some (perhaps more established) parts of the Java EE community has in the meanwhile been more quietly contributing to the continuing evolution of JSF 2.3. So what is in JSF 2.3? The real answer is that it depends on what the JSF community needs. There is a small raft of work that's on the table now, but I think the JSF community should be very proactive in helping determining what needs to be done to keep the JSF community strong for years to come.

Just as he did for JSF 2.2, Java EE community advocate Arjan Tijms has started maintaining a regularly updated blog entry listing the things the JSF 2.3 expert group is working on. So far he has detailed CDI injection improvements, the newly added post render view event, improved collections support and a few others. You should definitely check it out as a JSF developer and provide your input. Arjan also has an excellent collection of Java EE 8 blog entries generally on zeef.com.

On a related note, JSF specification lead Ed Burns wrote up a very interesting recent blog entry outlining the continuing momentum behind the strong JSF ecosystem. He highlighted a couple of brand new JSF plugins that we will explore in depth in future entries.

Monday Jun 15, 2015

Your Opinion Needed: Asynchronous Message Listeners (MDB) in JMS 2.1

One of the highest priority items left over from JMS 2/Java EE 7 is revisiting the programming model for declarative message listeners for JMS. MDB has been the only way to do this in Java EE for a long time. MDBs definitely have a few things going for them: their syntax is very simple, they are very type-safe yet they provide quite a bit of power behind the scenes for listening to JMS messages in a very safe, reliable and scalable way.

MDBs do however have a couple of weaknesses. One is that they have a very generic JCA based syntax today that is more verbose than they can be. Creating a more JMS-specific syntax also opens up the possibility of a few usability improvements. The other is that an arbitrary managed bean cannot declaratively consume messages - they must be converted to an MDB via the @MessageDriven annotation. This means that for example a REST or WebSocket endpoint cannot declaratively consume JMS messages. I outlined some of these issues during JMS 2 via this JIRA entry. The JMS 2.1 specification lead Nigel Deakin has recently written up a draft proposal to start tackling some of these possible improvements. The proposal is very detailed and easy to understand for all but the most inexperienced Java EE developers. Nigel is actively looking for your feedback right now. Providing feedback is extremely easy to do and Nigel has done a great job outlining how you can get involved in JMS 2.1.

Nigel has decided to start this work by still focusing on improving MDBs. His plan is to make some early progress and then tackling opening this functionality up to other beans such as CDI. Is this a sound approach or should we be focusing on CDI right now as well? Is simply improving MDB all that is needed? What do you think of the syntax? More recently I've also proposed carrying the new syntax further to create handy abstractions for common message processing patterns. What do you think of this idea? Do you have ideas of your own?

Now is your opportunity to chime in and help design a sound API we can all use. If you are an active JUG member or already part of Adopt-a-JSR you can even participate as a group and provide your input though your JUG.

Friday Jun 12, 2015

Java EE @ DevNexus 2015

DevNexus 2015 was held in historic Atlanta on March 10-12. For those of you not familiar with it, DevNexus is the most significant Java centric conference in the South Eastern US and now perhaps even at a national level. It was started by JBoss Java Champion Burr Sutter and organized by the Atlanta JUG (currently lead by Vincent Mayers, Gunnar Hillert, Pratik Patel, et al). As usual DevNexus attracted a bevy of world class speakers including Stephen Chin, Jim Weaver, Ed Burns, Venkat Subramaniam, Yakov Fain, Kito Mann, Markus Eisele, Raju Gandhi, Freddy Guime, Max Katz, Jason Porter and so on. Topics included Java SE, NoSQL, mobile, cloud, Docker, HTML5/JavaScript and of course Java EE. Indeed I think this year Java EE made a very strong showing at DevNexus.

I ran the Java EE 7 HOL as a whole day workshop as well as delivering sessions on Java EE 8, JMS 2 and Java EE alignment with reactive programming. Ed Burns delivered a very good talk on HTTP 2 and Servlet 4 while Jason Porter delivered a JPA talk. More details on the sessions and DevNexus 2015, including slide decks and code, posted on my personal blog.

Thursday Jun 11, 2015

JSON-P 1.1 (JSR 374) update: JSON Merge Patch

JSON Merge Patch (RFC 7386) is relatvely new standard in the JSON space. It defines a set of modifications that will be used to transform a target resource; those modifcations are themselves defined in a JSON object. JSON Merge Patch is a very simple standard with a few limitations but it seems to be useful enough. So and in addition to JSON Pointer (RFC  6901) and JSON Patch (RFC 6902), the JSR374 Experts Group has recently decided to adding JSON Merge Patch support to the JSON-P 1.1 API might be useful. You can track the initial works around JSON merge Patch here.

As usual, feedback is always welcome. And to easily get started with JSON-P 1.1, you should watch the recording of the Adopt-a-JSR session that was held recently with Kin-man Chung (JSR 374 Spec Lead). It gives all the required technical details but also set some expectations in terms of the type of feedback that the EG is looking for.


Monday Jun 08, 2015

The Ghosts of Java EE 7 in Production: Past, Present and Future

In the past few days I've seen a certain predictable group of folks on the Interwebs feigning concern over the viability of using Java EE 7 in production. I have to be honest in that I think it is fairly obvious these concerns are more -ahem- opportunistic than sincere or well-intentioned. Nevertheless I think this is a great trigger to discuss something valuable to the Java EE community anyway - Java EE 7 production adoption in the near past, present and near future.

Head over to my personal blog to read what I hope is a slightly entertaining toungue-in-cheeck but hopefully useful personal insights on the matter. I've dicussed what makes Java EE 7 important both in terms of challenge and opportunity, summarized what we know of real world Java EE 7 adoption right at this moment as well as what we can share shortly, how you can go about using Java EE 7 now and in the near future as well as a brief shot in the dark as to what wonders the future might bring for us all :-). Enjoy!

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

Thursday Jun 04, 2015

Devoxx Replay: Java EE Security API (JSR 375)

A few weeks ago, Alex Kosowski (JSR 375 Specification Lead) gave a session at Devoxx Paris on the new Java EE Security API (JSR 375). During that session, Alex gave some background and the motivations that led to the creation of JSR 375. Alex then outlined some of the initial plans of the Expert Groups.

This session is particularly useful to understand what the EG is trying to accomplish, it will also provide sufficient background to start following the JSR 375 EG discussions (see here).

Note: The audio level is low at the beginning of the video but everything is fine around the 2m45 mark. Alex's slides can be found here.