Tuesday Apr 21, 2015

Managing a Java EE Application Server with Chef

Chef is a popular open source infrastructure automation framework that has been popularized with the whole DevOps movement. In a nutshell, Chef has the notion of Recipe and Cookbook. A Recipe is written using a Ruby based DSL to describe how to install and configure software(s) on a host. And as the name suggest, a Cookbook is a collection of related Recipes.

Needless to say that managing Java EE Application Servers with Chef is a common use-case. You just need to use the appropriate Cookbook for your container : GlassFish, WebLogic, WildFly, TomEE, etc.

Monday Apr 20, 2015

A Directory for CDI Plugins

One of the key goals of CDI was to significantly improve Java EE platform extensibility at the core component level. Generic dependency injection alone goes a long way in making it fairly easy to integrate third-party components and libraries. CDI goes much farther by offering an entire portable extension API geared specifically towards writing CDI plugins. The most obvious manifestation of a resulting CDI ecosystem is plug-in collection projects like Seam 3 and it's successor DeltaSpike. However, there is actually a lot more to the CDI ecosystem, most notably tools (think IDEs) and larger projects that offer CDI pluggability.

So far there has not been a concerted effort to create a directory of sorts for the CDI ecosystem. While such a directory will (hopefully) never be completely all-encompassing it is helpful to have one place you could go to in order to find out all the plugins available for CDI. Most recently the CDI specification site added an ecosystem section to try and address this need. The page is looking pretty good already including listings like DeltaSpike, VRaptor, Vaadin, Camel, Forge and Arquillian - you should check it out. I can already see a few missing though like MyBatis/CDI, Agorava, Struts 2/CDI, Wicket/CDI, ZK/CDI and a few more (I'll reach out to the CDI folks to see why these might be missing). If you similarly see any CDI plugins that should be listed, you should try and reach out (the top of the CDI ecosystem page says how you can do so).

Friday Apr 17, 2015

Java EE 7/Bean Validation Adoption at Harvard University

One of the most important things to do at this stage of the life-cycle of Java EE is highlight successful adoption stories. We have been doing just that for a long time through our adoption stories blog as well as JavaOne. JavaOne 2014 was particularly good in this regard and JavaOne 2015 looks to be even better. Indeed we hope the folks with great adoption stories that submitted last year but did not get accepted will resubmit next year. We will continue to highlight some of those sessions from JavaOne 2014 in the next few months. In this vein I'd like to highlight a very interesting real world story of practical usage of Bean Validation 1.1 in a Java EE 7 application at Harvard University.

Harvard University Institute for Quantitative Social Science's Dataverse application has been one of the earliest Java EE adoption use cases on GlassFish. They started with Java EE 5 and are now using Java EE 7 in the real world for a fairly complex application. The Dataverse application is an open platform for publishing, citing, analyzing, and preserving research data across universities. Although it started with Social Sciences, the application is now branching out to other fields such as Medicine and Astrophysics. The application makes full use of the Java EE stack including JSF and Bean Validation.

In their JavaOne 2014 talk project lead Gustavo Durand and senior developer Stephen Kraffmiller shared how they were sucessfully utilizing Bean validation in their Java EE 7 application. They shared some pretty advanced use cases and great practical insight. You can see their awesome JavaOne 2014 presentation below (if you are having trouble seeing the embedded video it is available here).

If you have a similarly great Java EE adoption story to share (particularly migration stories from other technologies), please do feel encouraged to share it through a JavaOne 2015 submission. The CFP deadline is April 29th, so you should hurry. In the spirit of Java EE centric vendor neutrality, what Java EE implementation or tool set you choose does not matter at all and neither does which part of the globe you are in.

Thursday Apr 16, 2015

JSON-P 1.1 (JSR 374) update: JSON Pointer & JSON Patch

'Java API for JSON Processing 1.0' also known as JSON-P (JSR 353) is the standard JSON Processing API that was added in Java EE 7.  JSON-P will be updated and that update (JSON-P 1.1 - JSR 374) should be included in Java EE 8. One of the goals of that revision is to add support for 2 JSON standards namely JSON Patch and JSON Pointer.

By nature JSON is simple and most of the standards in that space are simple as well. JSON Pointer and JSON Patch are 2 IETF RFCs that are closely related. JSON Pointer defines string syntax for identifying a specific value within a JSON document while JSON Patch defines a set (one or more) of operations to apply to a target JSON document. JSON Patch is leveraging JSON Pointer to specify where operation(s) need to be performed in the target JSON document. And a JSON Patch is in itself a JSON document. The most common pattern will be to apply a JSON Patch to transform a JSON document but it will also be possible to obtain a JSON Patch by comparing 2 JSON documents, the returned JSON Patch will then be a 'diff' between the 2 JSON documents.

It is the early day of JSR 374 but the EG is certainly making progress. At this stage, it is already possible to test, amongst other new features, JSON Pointer and JSON Patch as the early build of the JSR 374 RI already support those. Those tests would be a good place to look to understand how the API works. Note that at time of writing, the 'diff' method isn't yet implemented in the early JSR 374 RI build.

Getting feedback early on is really important for the various EGs!  Make sure to look and test the various APIs that will, at some point, be part of Java EE 8.

If you want to know more about the JSON-P 1.1, watch this JavaOne session where Kinman Chung (JSR 374 Specification Lead) explains the plans for JSON-P 1.1. In addition, the Java API for JSON Processing project page, the JSR 374 Users mailing list and Issue Tracker are useful resources to check.

Wednesday Apr 15, 2015

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 2015 CFP closes on April 29 - 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 two weeks so other folks already have a head start to maximize their chances of getting accepted. 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.

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 (specially migration from other technologies)
  • Best practices and design patterns for using Java EE technologies
  • Emerging trends in the ecosystem such as HTTP2, HTML5 and microservices
  • Insightful research, development and analysis work in server-side Java

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 :-)?

Tuesday Apr 14, 2015

Java EE Security API (JSR 375) Update

"If you don't vote you can't complain. Get involved." (David Blevins)

From the current set of Java EE 8 JSRs, 'Java EE Security API' (JSR 375) is the latest one as it was only approved in December last year. It was started later than the other JSRs. Nevertheless, the EG is now very active (+200 messages just for last month!). 

Obviously, this effort need a strong focus as 'Security' can mean a lot of things. And depending on whom you ask, you will high likely have different views. So to EG is currently busy filtering and consolidating ideas. In addition, one thing that is clear is that having a common ground for discussions is really needed. So the EG is also working on defining a security API terminology; i.e. a common vocabulary to enable concise and accurate communication amongst the EG and the community (see here). This may sounds obvious but it's not; e.g. what's the difference between a user store and a user realm?

During JavaLand, some EG members have presented a few ideas that will be tackled in this JSR. Alex Kosowski (JSR375 Specification Lead) also presented, during Devoxx France, the plans for JSR 375. Alex's session recording will be made available in the coming weeks. In the meantime, you can check the slides.

Since there are potentially a lot of things that could be addressed in this JSR, the EG needs to make sure they address the right features, in the right order and in the right form. So the goal of those different sessions is really to expose the EG current plans and ideas but more importantly to get your feedback!

To know more, you should check this playground has it contains prototype ideas for possible inclusions in this JSR; lurk in the JSR 375 users mailing list and voice any relevant feedback!

Monday Apr 13, 2015

A Preview of Java EE @ GIDS 2015

The Great Indian Developer Summit (GIDS) 2015 will be held on April 21-24 in Bangalore, with a follow-on GIDS.Mini to be 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 is truly a privilege to be able to speak at the event and I am even more fortunate to have a number of Java EE sessions there. While in India I am very happy to say I will also be speaking at a couple of entirely community driven JUG events at the Madras JUG (Chennai) and the Hyderabad Java user group before and after GIDS.

Below are a preview of my talks at GIDS:

  • Using JavaScript/HTML5 Rich Clients with Java EE 7: This is my thus far extremely popular and well-received talk on using Java EE 7 as an effective back-end for JavaScript/HTML5 rich clients. If this is a development model that interests you, the talk should give you some valuable tools to get started. Although I use AngularJS for my examples, the basic participles from a Java EE 7 perspective apply to any JavaScript/HTML5 or native/hybrid mobile client. The slides for the talk are on SlideShare while the demo code is on GitHub. Besides Bangalore, I will be repeating this talk in Hyderabad for GIDS.Mini.
  • Reactive Java EE - Let Me Count the Ways!: This is one of my newest and thus far also extremely popular and well-received talks. It explores how Java EE 7 APIs like JMS, MDB, EJB @Asynchronous, JAX-RS/Servlet/WebSocket async, CDI events and Java EE concurrency utilities along with Java SE 8 features such as lambdas and Completable Futures work to align the platform with the reactive movement. The slides for the talk are here.
  • Applied Domain-Driven Design Blue Prints for Java EE: This talk essentially introduces the Cargo Tracker project. In the talk I cover the very basics of DDD, discuss how DDD constructs apply to Java EE and show how the mapping can be done using Cargo Tracker. The slides for the talk are here.

  • I am very honored that the Madras JUG and Hyderabad JUG invited me to speak to their members while in India for GIDS and very proud that I was able to accept. The GIDS organizers were very gracious in extending their goodwill to support the community. Both the JUGS in Madras and Hyderabad have arranged all day events in slightly different formats, which is awesome.

    The Madras JUG will host multiple talks on the same day. I will be delivering the opening keynote as well as a technical session. For the keynote I will be delivering my thus far very well-received talk titled Why Open Standards and Java/EE Matter. In the talk I will discuss the basic value proposition of open standards like Java and Java EE in maintaining a healthy, competitive, multi-vendor ecosystem. The slides for the talk are here. For the technical talk, I'll be delivering the latest update on Java EE 8. Besides covering the current state of Java EE 8 I also cover how you can get involved in the process including through highly inclusive programs like Adopt-a-JSR. The slides for the Java EE 8 talk are also on SlideShare. The Madras JUG event will be held before GIDS and the details for the event are here.

    The Hyderabad JUG is hosting the Java EE 7 Hands-on-Lab as a full day workshop. This is essentially our flagship lab/workshop at the moment covering Java EE 7. It has always proven popular so far and it is a great way to get some hands-on experience with Java EE 7. The Hyderabad JUG event will take place after GIDS.Mini and the details are here.

    Hope to see you in India soon during at least one of these events? As always never hesitate to reach out to me if there is something I can help with or if you have a question. I'll bring along some Java/Java EE goodies you are welcome to :-).

    Thursday Apr 02, 2015

    MVC 1.0 (JSR 371) Early Draft Review period has started!

    MVC 1.0 (JSR 371) formally known as the 'Model-View-Controller Specification' has just entered the Early Draft Review period. This is significant because it is the first Java EE 8 specification to enter this phase. Kudos to the JSR 371 Expert Group! JSR 371 is ‘just’ a piece of the Java EE 8 story but this step shows that, slowly but surely, Java EE 8 is starting to take shape.

    You are strongly encouraged to review the early draft of the specification, test it using Ozark, the open source JSR 371 Reference Implementation and obviously provide comments and feedback!

    The MVC specification is really easy to grasp for anybody familiar with JAX-RS, the samples bundled with Ozark will also help to understand the specification. You can also check Ozark's sources and the presentation I gave a few days ago at JavaLand. 

    To test the first Ozark milestone build, you need a recent GlassFish build (post 4.1 build, see here for details). Another and simple solution to test JSR 371 and Ozark is to use this script to create a Docker image with GF, Ozark and the JSR 371 samples pre-deployed.

    The Early Draft Review period will end of April 30th. For specification related feedback, you can use the JSR 371 users mailing list or the JSR 371 issue tracker. For Ozark related feedback, please use the Ozark users mailing list or the Ozark issue tracker.

    So what do you think of JSR 371? Also, should we use this Docker based approach to help you test other upcoming Java EE 8 specifications?

    Wednesday Apr 01, 2015

    Java EE @ ConFoo Canada 2015

    ConFoo 2015 took place 16-20 February in Montreal, Canada. To my knowledge it is the largest developer conference north of the border. The conference has roots in PHP, but has been making an effort to better attract a Java audience hence it was important for me to support the conference. If you are a Canadian Java developer, I would consider adding ConFoo to your radar as a more convenient (and possibly cheaper) event to go to in order to stay up-to-date. Thanks to a number of community speakers such as Ryan Cuprak, Hanneli Tavante and Rodrigo Candido da Silva the Java EE presence was very strong this year. There were Java EE centric talks on JAX-RS, OAuth, cloud, Java EE 7 and Java EE 8.

    I personally delivered two sessions on JMS 2 and testing Java EE applications with Arquillian in addition to a couple of lighting talks on Java EE 8/Adopt-a-JSR as well as Domain-Driven Design (DDD)/Cargo Tracker. More details on the sessions and ConFoo, including slide decks, videos and code, posted on my personal blog.

    Tuesday Mar 31, 2015

    Java EE @ Devoxx France

    Devoxx France will take place next week in Paris. And this year, the most popular French Java conference is moving to a newer (and larger) venue: Palais des Congrés!

    The overall conference agenda is impressive but Java EE obviously well covered (see the overview below). Personally, I will co-host with Roberto Cortez a session and a Hands-on lab on the Batch API (JSR 352).  I also have another regular conference session where I will talk about Java EE 8. Last but not least, I will also participate in the Java EE BoF with Antoine Sabot-Durand, Antonio Goncalves and Emmanuel Bernard.

    Finally, I will also host a (late!) BoF around one of my hobby: Home Automation and Java. Despite this, this BoF is clearly not about Java EE. The idea is to gather interested people and have informal discussions around anything related to Home Automation and Java (KNX, Z-Wave, Nest, etc.). 

    Monday Mar 30, 2015

    Free JPA 2.1 Cheat Sheet by Thorben Janssen

    Cheat sheets can be very handy while quickly referring to a technology one uses on a daily basis, although they can be tough to read (and write!) if the technology is very extensive like JPA. Fortunately, the changes in JPA 2.1 are definitely small enough to fit on a cheat sheet. Note, just because the amount of changes are small definitely does not mean they are not important. In fact, most of the changes in JPA 2.1 have generated a good deal of interest in the community and are already proving to be well received. Very fortunately for us, Thorben Janssen has gone through the effort of putting together a 100% free cheat sheet on the changes in JPA 2.1. You can download it from his related excellent blog entry aptly titled JPA 2.1 - 12 Features Every Developer Should Know.

    If you look around Thorben's blog you'll find that he is trying his best to craft it to be a valuable resource to the community, including a weekly Java newsletter. If you find the JPA 2.1 cheat sheet to be useful, please do spread the word and consider dropping a brief note of appreciation for Thorben's hard work.

    Friday Mar 27, 2015

    JavaOne CFP is Open - Your Invitation to Submit to the Java EE Track

    It's that special time of the year again - the JavaOne 2015 call for papers is now officially open!

    JavaOne will be held October 25 - October 29 in San Francisco. You can read about the details and submit here (at the time of writing the site has some minor inconsistencies that is being fixed as we speak - generally you can trust the accuracy of the information in this post when in doubt). This year I have the privilege to lead the Java EE track again along with veteran track lead Lance Andersen. My colleagues Bruno Borges and David Delabassee will also be playing key roles in the Java EE track.

    Please do consider this a personal invitation from me to submit your best ideas to one of the most prestigious gatherings of the minds for server-side Java. If you have any questions, never hesitate to get in touch. If your submission was not accepted the previous years please consider this encouragement to try to improve it and submit again.

    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 and design patterns for using Java EE technologies
    • Emerging trends closely relevant to the Java EE ecosystem such as HTTP 2, microservices, reactive and the like
    • Insightful research, development and analysis work in server-side Java

    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 :-).

    The CFP is closed April 29, so please do start thinking about what you want to submit very soon (note that's a very short time frame - just about a month from now). That being said do take your time - quality always matters!

    Thursday Mar 26, 2015

    New book: "Web Development with Java and JSF"

    During JavaLand, I had the pleasure to meet Michael Müller. Michael is well known in the German Java sphere as he wrote numerous articles for various IT medias. In addition, Michael is an avid JSF user and a JSF EG member.

    Michael is currently writing a book titled "Web Development with Java and JSF". Since Michael is a passionate JSF user, JSF is obviously an important topic in his book. But this is not another book about JSF only. Michael's goal is to cover Web Application development at large. That means that different but related topics are also discussed through his book. There are for examples sections on JPA, Bean Validation, Responsive Design, ... Michael also plan to touch on subject such as Web Application testing with Selenium, etc.

    Michael has decided to use “a more fair” publishing approach where the book has 2 prices: a minimum and a suggested price. Based on that, the potential buyer is free to decide how much he wants to pay. This approach gives the buyer the ability to decide how much s/he think the book is really worth but this also gives the author more financial rewards as there is no intermediary between the publisher and the author.

    A great deal of the book has already been written (+240 pages) but Michael is planning to add extra content.  You can read a sample here. "Web Development with Java and JSF" is available in the usual eBook formats (PDF, Mobi, ePub) and once you've bought it, you are entitled to get the updated versions for free.

    Wednesday Mar 25, 2015

    Forge Powered Java EE Rapid Application Development Comes to NetBeans!

    Forge has been a great tool for Rapid Application Development (RAD) with Java EE (for sake of nostalgia it is basically the descendant of the awesome seam-gen tool of the Java EE 5 era). As powerful as Forge is, one of it's drawbacks had been that it is very heavily command-line driven with many commands and sub-commands to learn. As a result it can be initially unnatural for the Average Joe, very IDE centric Java developer to pick up.

    A novel solution to this paradigm mismatch that the Forge team adopted is to integrate Forge into IDEs like Eclipse. I am very happy to report that such integration has finally arrived in NetBeans, perhaps making it truly accessible to the core Java EE community. Indeed the Forge NetBeans integration works out very nicely - you access Forge commands through NetBeans quick search, the otherwise CLI driven commands are rendered dynamically as regular NetBeans wizards and the commands take effect seamlessly within NetBeans including generating code and running the project. In this case, a video really is worth a thousand words (if you are having trouble viewing the embedded video below it is available here). In addition to demonstrating Forge in NetBeans the video is really a great reflection of the kind of productivity you can achieve with Java EE today.

    The Forge NetBeans plugin can be installed directly from within NetBeans by using the Plugin Portal Update Center (Tools -> Plugins). You can also download it manually from the NetBeans Plugin Portal.

    If you are new to Forge, the Forge site has excellent documentation for getting started including a great self-paced, self-directed hands-on lab. Enjoy - Forge really can make web development fun again and NetBeans + Forge is a truly powerful combination that's hard to beat :-).

    Tuesday Mar 24, 2015

    JMS 2.0 Revision A

    The JMS 2.0 errata has passed the JCP executive committee ballot approval! This simple maintenance release was necessary to correct a few errors in the original JMS 2.0 specification. And now that ‘JMS 2.0 Revision A’ is done and approved, the focus is shifting towards the next version of the JMS specification, i.e. JMS 2.1.

    Resources :