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.

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

    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.

    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.

    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.

    Monday Mar 16, 2015

    Migrating a JSF Application from Spring to Java EE 7/CDI

    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 migrating a JSF based web application from Spring to Java EE 7 and CDI shared by Mario-Leander Reimer of QAware.

    Mario's division is a small German based project consulting practice. He was tasked by a major German auto manufacturer to undertake this migration effort (it won't take most Germans much effort to figure out who this auto manufacturer might be since Mario shares that they are based in Munich). The reasons cited for the migration include streamlining/simplifying company-wide application architecture, reducing framework explosion/dependencies, standardization and reducing cost. In just about a month Mario was able to successfully migrate over the application that made extensive long-term use of Spring to CDI and Java EE 7! Mario also made use of great CDI ecosystem tools such as DeltaSpike and Arquillian (both projects have been Duke's Choice award winners, DeltaSpike being the more recent recipient). He also used PrimeFaces with JSF.

    During his talk Mario highlighted his journey in learning CDI/Java EE 7 (he was previously a heavy Spring user), the parts of CDI and Java EE he really came to appreciate as well as the challenges he faced and successfully overcame. His talk highlights the ever careful balance struck between feature bloat and simplicity in a Java EE standard like CDI as well as the power of the CDI portable extensions API when you really need to break out of what CDI provides out-of-the-box. You can see Mario's 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, please do drop us a note (particularly migration stories from other technologies). 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.

    Friday Mar 13, 2015

    Java EE 7 Hands-on-Lab Updated for You to Use!

    The official Java EE 7 Hands-on-Lab is an excellent learning resource. It was initiated by my former colleague Arun Gupta (now at Red Hat). The lab starts with some skeleton code (that's mostly Java EE 5 and Java EE 6) and through a series of well-written step-by-step instructions adds a select set of Java EE 7 features to create a fairly cohesive sample web application. The instructions do a reasonable job of explaining the context and motivation for the features being added. Although it touches upon a tiny subset of what was added in Java EE 7, in my experience the lab takes about six to eight hours to complete. In the end attendees get a real sense of how developing with Java EE and Java EE 7 actually feels like and learn a few Java EE 7 features.

    I just finished successfully delivering the lab once again at DevNexus 2015 (trip report coming soon). In preparation for DevNexus and beyond I made a few updates/changes:

    • I tried to make the lab entirely self-directed and self-paced for attendees by removing as many possible stumbling blocks (however minor) as possible. My goal was to make the lab as easy to go through and as standalone as possible.
    • I updated the lab to use GlassFish 4.1 and NetBeans 8.0.2. This resulted in a small number of minor code changes.
    • I polished up the code to make it as realistic as possible within the scope of a simple lab.

    The first bullet point above is what I would really like to bring your attention to. Every time I have run this lab I've tried to execute it such that it requires bare minimum or no involvement from me and in fact I believe I've succeeded in doing just that. The reason this really matters is that I think this lab material has much greater potential than just something else our team does at conferences. I believe that the lab is now in a state such that anyone can go through the lab entirely on their own, by just using the public HOL page linked. More importantly I think it is possible with very little effort for someone to lead the lab in their user group or company. I highly encourage you to do so if you have an interest in supporting the Java EE community. If needed, our team could provide any help that you may need (such as being present virtually or working with you one-on-one to get you prepared). I've supplied all the resources that you should need on the public HOL page.

    Do drop me a note if you have any feedback on this, if there's anything that I can improve with the lab or if you need any help.

    Thursday Mar 05, 2015

    JavaOne Replay: 'JSF 2.2'

    Kito D. Mann is a well-known and active member in the JSF sphere. He is the editor-in-chief of JSF Central and co-host of the Enterprise Java Newscast. A few years ago, he has written the 'JavaServer Faces in Action' book for Manning. And now in addition to his day job as an enterprise application architecture consultant, Kito is also a member of several JCP Expert Groups (including JSF), a recognized conference speaker, etc. Needless to say that Kito lives and breathes JavaServer Faces!

    During last JavaOne, Kito hosted several sessions including 2 sessions on JSF 2.2:  'JSF 2.2 In Action' and 'JSF 2.2 Deep Dive'. Both sessions cover the new features of JSF 2.2 (e.g. Faces Flow, Multi Templating, HTML 5 support, XSRF, etc.) but in a different format. The first session ('JSF 2.2 In Action') is a regular session, i.e. 60min, while the second session ('JSF 2.2 Deep Dive') is longer, almost 2.5 hours! This gave Kito more time to go deeper and in more details on JSF 2.2. So if you know JavaServer Faces but want to dig more about what JSF 2.2 brings, you should definitely watch one of those sessions, they’re both very informative and well illustrated with code and demos.



    Wednesday Feb 25, 2015

    Unsynchronized Persistence Contexts in JPA 2.1/Java EE 7

    One of the more obscure features introduced in JPA 2.1 and Java EE 7 is the unsynchronized persistence context. It's not too surprising that the community does not seem to discuss it much - it's really geared towards somewhat an edge case.

    Prior to JPA 2.1, the entity manager is always synchronized with the database when a JTA transaction commits. This poses a challenge if you have a multi-step workflow (let's say in a stateful session bean/CDI conversation/JSF flow) where you want some data to be flushed to the database on transaction commit at a given stage of the workflow but not all - but you do eventually want to synchronize all changes at some other point in the workflow. Non-standard solutions like Seam and the Hibernate flush mode have been the answer in the past to get around this problem. This is now solved in JPA 2.1 via the unsynchronized persistence context. In an unsynchronized persistence context changes are not automatically flushed to the database on transaction commit. Rather, you explicitly join the transaction when you want changes synchronized.

    Hantsy Bai does a decent job explaining this through code examples. By far the best explanation of the feature comes from specification lead Linda DeMichiel. Check out minute 11-14 in the short video below (if you are having trouble accessing the embedded video it is available here).

    What do you think of the feature? Do you think it is useful or obscure? The JPA spec is the best place to get further details if this intrigues you.

    Monday Feb 23, 2015

    Rakuten: Java EE Adoption in One of the World’s Largest Online Financial Systems

    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 highlight some of those sessions from JavaOne 2014 in the next few months and the best place to start is the Java EE adoption story from Rakuten.

    Rakuten is one of the largest online financial systems in the world. It is the number one e-commerce platform in Japan generating over 51 billion dollars of yearly revenue and growing on a global scale. It is easily one of the most technically adept companies in Japan and perhaps the world. They had a legacy system build around J2EE and a hodgepodge of various non-standard frameworks such as Spring, Apache Axis and iBatis. They chose to adopt Java EE over these technologies including alternatives such as .NET. They cited vendor neutrality, choice, simplicity, community, ease-of-learning, ease-of-use and productivity as great reasons for selecting Java EE for their next generation platform. They fully leverage Java EE including key APIs such as JSF, CDI, EJB, JPA, JTA and JMS. Along with Java EE they also chose WebLogic as well as Oracle DB/Exadata. They cited performance, scalability, reliability, productivity and support for choosing WebLogic, Oracle DB and Exadata. They also use best-of-breed tools such as NetBeans, Maven, Jenkins and the Atlassian suite of solutions. They achieved the astounding technical feat of completely overhauling their 24/7, extremely high volume online transactional system in just six months including training!

    You can see Hirofumi Iwasaki and Arshal Ameen's awesome JavaOne 2014 presentation below (if you are having trouble seeing the embedded video it is available here).

    The slide deck from the talk is posted below (if you are having trouble seeing the embedded slideshow it is available here).

    Hirofumi Iwasaki and Arshal Ameen have been great advocates of Java EE, especially in Japan. We hope to continue to see great things from them and Rakuten. Rakuten is looking forward to learning and applying Java EE 7 in the real world as soon as possible.

    If you have a great Java EE adoption story to share, please do drop us a note (particularly migration stories from other technologies). 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.

    Friday Feb 20, 2015

    Java EE @ CodeMash 2015

    CodeMash 2015 took place 6-9 January in Sandusky, Ohio at the exotic Kalahari Waterpark Resort. With another sold-out year, CodeMash is quickly becoming one of the larger developer conferences state-side. It has it's roots in .NET, but is making a concerted effort to better attract a Java audience. Topics covered included .NET, methodology, JavaScript/HTML, mobile, cloud, DevOps, Hadoop, NoSQL, Docker, Java SE and Java EE.

    I delived sessions on aligning Java EE 7 with the JavaScript/HTML5 rich client landscape, reactive programming support in Java EE and what's coming in Java EE 8. More details on the sessions and CodeMash, including the slide decks and code, posted on my personal blog.

    Monday Feb 16, 2015

    Manfred Riem Discusses JSF and Java EE MVC on JSF Central Podcast

    Manfred Riem was a guest on the most recent JSF Central Podcast. For those unaware Manfred is the co-specification lead for both JSF 2.3 and Java EE MVC 1.0. Manfred talked about Mojarra, JSF 2.2, JSF 2.3 as well as MVC 1.0. The podcast is available here and you can read the transcript here.

    The podcast is led by Kito Mann - well respected enterprise consultant, author, blogger and JSF community member. Kito has been a long time supporter of JSF with a long track record of contributing as a JCP standards group expert.

    The newscast is in fact part of the JSF Central portal and covers topics of interest for the JSF ecosystem. Past contributors to the podcast have included folks like Ed Burns, Cagatay Civici, Neil Griffin, Lincoln Baxter and Shay Shmeltzer. All of the podcasts are archived here.

    Besides the podcast, the JSF central portal itself is a very valuable resource for the JSF community you should explore. It does a very nice job listing JSF articles, books, projects, products and other resources.

    Wednesday Feb 11, 2015

    Java EE @ Java2Days 2014

    Java2Days 2014 was held on November 17-19 in Sofia, Bulgaria. It is far and away the largest Java conference in the Balkans region and now perhaps one of the most important conferences in Europe as a whole. This was another great year for this rapidly growing, vibrant event. It attracted a host of international and local speakers including Arun Gupta, Geertjan Wielenga, Roberto Cortez, Ivan St. Ivanov, Andy Gumbrecht and Andrew Lombardi. Topics included Java SE, Java EE, HTML5/JavaScript, mobile, OSGi, IoT and the cloud. I am extremely grateful that the organizers invited me again this year and very glad that I was able to accept.

    Java EE had a strong showing this year:

    • What's Coming in Java EE 8 - me
    • Nuts and Bolts of WebSocket - Arun
    • Java EE 7 Hands-on Lab - Arun, Ivan and me
    • Apache Tomcat to Apache TomEE in 1-n Steps - Andy Gumbrecht
    • Java EE 7 Batch Processing in the Real World - Roberto and Ivan
    • Coding for Desktop and Mobile with HTML5 and Java EE 7 - Geertjan
    • JavaScript/HTML5 Rich Clients Using Java EE 7 - me, Ivan
    • Forge and Arquillian Hands-on Lab - Ivan, me
    • Why Open Standards and Java/EE Matter (to You) - me

    More details on the sessions and Java2Days, including the slide decks, video and code, posted on my personal blog.

    Tuesday Feb 10, 2015

    Java EE 7 Maintenance Release

    The Java EE 7 specification (JSR 342) was finalised end of May 2013 and since then, various minors errors have been reported. Those will soon be addressed as the Java EE 7 specification will go through a maintenance release (see Linda's announcement here).

    You can check the proposed changes here and a draft of the specification with the proposed changes incorporated here.

    Those proposed corrections should only impact the specification document itself and not the Reference Implementation nor the TCK. So once this MR will be done and voted, the version of the specification should be Java EE 7 Rev A.

    Friday Feb 06, 2015

    Java EE @ JDK.IO 2014

    JDK.IO 2014 was held in Denmark on January 19-20 at the IT University of Copenhagen. It is the yearly conference of 'JavaGruppen', the Danish JUG. The conference sessions covered a variety of Java topics ranging from core Java, Java EE, and JavaFX. Speakers included my colleague David Delabassee, Simon Ritter, Adam Bien, Heinz M. Kabutz, Bert Ertman, Ryan Cuprak, Simon Maple and Markus Eisele.

    David covered the Java EE portion of the keynote. He also presented a talk on Java EE 8. His slides from SlideShare are embedded below:

    My friend, fellow co-author of EJB 3 in Action, Connecticut JUG leader and JavaOne Rock Star Ryan Cuprak presented a couple of very cool sessions. The first one, titled Hybrid Mobile Development with Apache Cordova and Java EE 7 demonstrates how Java EE can be used as a very effective mobile development back-end using APIs like JAX-RS, WebSocket and JSON-P. The talk was delivered at JavaOne 2014 as a tutorial and includes an excellent end-to-end demo. Video from the JavaOne talk is embedded below:

    Ryan also presented another popular talk from JavaOne 2014 - 50 EJB 3 Best Practices in 50 Minutes. At JavaOne he had co-presented the talk with my other co-author Michael Remijan. The video from that talk is embedded below:

    Ryan wrote up a very nice trip report of JDK.IO on his personal blog that you should check out. Other Java EE related talks included one by Markus Eisele on Java EE 7 and Apache Camel.