Monday Jan 25, 2016

Migrating from Tomcat to Java EE and TomEE at Dassault Systemes

One of the most important things to do at this stage of the life-cycle of Java EE is highlight successful adoption stories at a regular cadence. We have been doing just that for a long time through our adoption stories blog, this humble blog as well as JavaOne. Indeed JavaOne 2016 was particularly good in this regard. We had a number of solid adoption stories submitted that we could select from. We will highlight all of those stories here in the coming months. A particularly nice adoption story presented at JavaOne 2016 was from Dassault Systemes.

Although the average developer and consumer is probably not aware of Dassault Systemes, it is a company that powers many of the world's most critical industrial processes. It is one of the global leaders in 3D modelling (think CAD/CAM), product life-cycle management systems. Just some companies that rely on Dassault Systemes include the likes of Boeing, Toyota, BMW, Mercedes, Honda, Samsung, Coca Cola, Nokia, Nikon, Panasonic, LG, Procter & Gamble, GE, Johnson & Johnson and Exxon. French based Dassault Systemes is recognized to be one of the most innovative companies in the world. The company offers it's products both on-premise and as SaaS on their own cloud.

The company chose to standardize their very diverse set of products geared towards various industry verticals on Java EE and TomEE. They cited reasons like ensuring consistency throughout a large number of systems, avoiding third-party jar/configuration/class-path hell, providing a fully supported uniform stack, portability and modernizing technology in a managed, sustainable fashion. Their migration experience was quite varied and represents the gamut of what others can expect in adopting Java EE. They migrated a large number of Tomcat based applications using various third-party libraries to Java EE. They also migrated over legacy C/C++ applications as well as legacy J2EE applications. They even ported from one Java EE application server to another to get to a common base with TomEE. TomEE was cited as a particularly easy way to migrating from Tomcat to Java EE. They are looking forward to TomEE moving ahead with Java EE 7 support. The session explains their entire migration story in a concise, clear fashion. You can view the session below (click here if you are having trouble seeing the embedded video).

If you have a similarly great Java EE adoption story to share with the community (particularly migration stories from other technologies), please do feel encouraged to reach out. 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 Jan 21, 2016

AngularBeans: Java EE 7/CDI Integration with AngularJS

In the highly volatile world of JavaScript frameworks, AngularJS has managed to maintain a lead at least for now. The good news for Java EE developers is that Java EE generally and Java EE 7 in particular works extremely well as a back-end for frameworks like AngularJS. To see why this is you need not look much farther than my talk on the topic and the corresponding example code (the code is deliberately self-contained with setup instructions so that you can explore it in detail on your own).

One of the drawbacks of the JavaScript rich client approach is that it often involves some boilerplate code that does not exist in server-side web frameworks due to the remote communication layer involved. To borrow concepts from the old J2EE design patterns, this boilerplate involves the creation and maintenance of DTOs (Data Transfer Objects) and remote proxies, not to mention the plumbing code necessary for the remote communication.  If you look carefully at my code example the boilerplate is not that hard to spot.

One way of avoiding this boilerplate is a tight binding layer with the underlying back-end technology that automatically generates the DTO, remote proxy and remote plumbing parts. In the process the binding layer can bring a lot of interesting back-end features forward to the client as well.

Fortunately for the Java EE ecosystem, my Tunisian friend Bessem Hmidi has formulated just such a solution focusing on CDI as the back-end component model. He has aptly named his project AngularBeans and the project is now on GitHub for everyone to use. I am very happy that we were able to host Bessem at JavaOne 2015 to talk about the project. In his session he explained the basic motivation for AngularBeans, discussed the features he has implemented so far and did quite a bit of live coding in the process! You can view the session below (click here if you can't see the embedded video).

The session really speaks volumes as to the power of the solution and why it is a very valuable part of the CDI/Java EE ecosystem. The project is at a very early stage, so this is a great time to get involved, evaluate the project and perhaps even contribute.

Thursday Jan 14, 2016

Java EE @ Java Day Mexico

Java2Days 2015 was held on November 2-4 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 Patrick Curran, Geertjan Wielenga, Ivan St. Ivanov, Vladimir Pavlov and Andrew Lombardi. Topics included Java SE, Java EE, HTML5/JavaScript, mobile, and the cloud.

I did talks on real world microservices with Java EE and aligning Java EE with the reactive movement. I also ran a lab on JMS 2. More details, including slide decks, session video and code, posted on my personal blog.

Wednesday Jan 13, 2016

Hypermedia/HATEOAS Support in JAX-RS 2/Java EE 7

The concepts of Hypermedia and HATEOAS (shorthand for the mouthful of "Hypermedia as the Engine of Application State") have made the rounds in the REST ecosystem for a little while now. If you Google around a bit you'll find no shortage of arcane academic-sounding text describing it's supposed universal virtues. For the rest of us a simple explanation is that it is an attempt to utilize web page style links in REST based web services. Using the hypermedia concept, you can send the client links for what they may be able to do further after receiving a REST response. A simple example is including links for canceling or getting details for an order in addition to a confirmed order object probably retrieved via a GET request. Although less common, links can also be embedded as data within the response. An example would be embedding a link to retrieve the delivery address in the order data body instead of embedding the actual address body or an address ID. Finding a reasonably down-to-earth, unpretentious explanation of Hypermedia was shockingly difficult. The best I could find is the humble documentation for the PayPal Payment REST API that makes real world use of Hypermedia.

In practical terms Hypermedia helps make clients more flexible by avoiding hard-coding REST URLs. It can also help in self-documenting REST APIs. If you look around on the web it is an open question whether these purported benefits are actually worth the additional implementation complexity. Hypermedia may be best applied in a situation when you are developing a public API where you do not know much about potential users of the API. The PayPal Payment REST API is a good example of such a case.

The good news is that if you have a good use case for Hypermedia Java EE 7 adds support for it via JAX-RS 2. Sam Sepassi recently did an excellent write-up detailing the newly added API. It is far and away the best write-up that exists on the topic. He includes a brief explanation of Hypermedia including example code using JAX-RS 2. He also included some details on experimental work that is being done in the Jersey JAX-RS RI to include support for declarative Hypermedia (the Hypermedia APIs added in JAX-RS 2 are basically programmatic).

Enjoy and feel free to share with anyone that you might think would find this useful.

Monday Jan 11, 2016

Java EE in Practice at Lufthansa Industry Solutions

One of the most important things to do at this stage of the life-cycle of Java EE is highlight successful adoption stories at a regular cadence. We have been doing just that for a long time through our adoption stories blog, this humble blog as well as JavaOne. Indeed JavaOne 2016 was particularly good in this regard. We had a number of solid adoption stories submitted that we could select from. We will highlight all of those stories here in the coming months. A nice JavaOne 2016 session to start with is the one from Lufthansa industry solutions.

Lufthansa industry solutions develops systems both internally at Lufthansa as well as for external customers. They chose to standardize on Java EE to ensure consistency throughout a large number of systems. The session explains what the organization does, it's architectural approach and why they chose Java EE. The session also dives into some interesting details on two different Java EE applications (one still using Java EE 6 and one already on Java EE 7) that Lufthansa industry solutions developed for clients. The session touches upon how Java EE applications can take advantage of most of the practical benefits of microservices without the added complexity. The applications use a mix of WildFly and JBoss EAP along with other JBoss ecosystem projects like Hibernate Envers, Hibernate Search, Drools. The applications also used ICEfaces and PrimeFaces (the older Java EE 6 application used ICEfaces while the newer Java EE 7 application uses PrimeFaces). You can view the session below (click here if you are having trouble seeing the embedded video).

If you have a similarly great Java EE adoption story to share with the community (particularly migration stories from other technologies), please do feel encouraged to reach out. 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 Jan 08, 2016

Meet SnoopEE, a Discovery Service for Java EE

SnoopEE is a very interesting grass roots open source Java EE ecosystem project. Akin to NetFlixOSS Eureka it enables microservices discovery, lookup and registration. SnoopEE is developed by Java EE advocate, JCP expert, speaker and blogger Ivar Grimstad. Ivar presented on SnoopEE at JavaOne 2016. One very nice aspect of Ivar's talk is that it actually discusses the basic motivation for service discovery and SnoopEE instead of simply covering the features of the project. You can see his well done session below (click here if you can't see the embedded video).

The slide deck for his talk can be found here. The project itself is on GitHub. SnoopEE is still pretty nascent and under active development. You should consider giving it a try, using it and contributing back to it.

Tuesday Jan 05, 2016

Java EE @ Java Day Mexico

Java Day Mexico 2015 was held on August 29 in historic Guadalajara. I was truly honored to be invited to speak here and this is a very fitting first trip report of the year. Java Day Mexico is the largest Java developer conference in Mexico and it is led primarily by Mexican JUGs. This was another highly successful year for the growing conference. Speakers included Venkat Subramaniam, Pratik Patel, Bruno Borges and Heather VanCura. Topics included Java SE, Java EE, HTML5, JavaScript, architecture, JVM languages, mobile and the cloud.

I had five talks total, essentially back-to-back. I did talks on Java EE 7, Java EE 8, real world microservices with Java EE, aligning Java EE with JavaScript/HTML5 rich clients and open standards. More details, including slide decks and code, posted on my personal blog.

Monday Jan 04, 2016

Adam Bien Impressed by Java EE 7 Support in WebLogic

As many of you are aware WebLogic 12.2.1 now offers full Java EE 7 commercial support. Recently Java rock star Adam Bien took Java EE 7 support in WebLogic for a spin and was impressed. He commented on fast startup, low memory footprint, fast deployments, excellent NetBeans integration and solid Java EE 7 compliance. You can read Adam's full write-up here.

None of this of course is incidental. WebLogic is a mature product with an extremely large existing deployment base. With those strengths often comes the challenge of usability and WebLogic is no exception. Nonetheless many folks that haven't kept up-to-date with WebLogic evolution don't realize that usability and performance have long been a continued core focus. That is why folks like Adam are often pleasantly surprised when they take an objective fresh look at WebLogic. You can give WebLogic 12.2.1 a try yourself here. There is no need to pay for anything as you can use a free OTN developer license (this is what Adam used as per the instructions on his post). You can also use an official Docker image here.

Solid Java EE support is of course the tip of the iceberg (albeit an extremely important tip of the iceberg) as to what WebLogic offers. WebLogic offers a depth and breadth of proven features geared towards mission-critical, 24x7 operational environments that few other servers come close to. One of the best ways to observe this is taking a quick glance at the latest WebLogic documentation.

Thursday Dec 24, 2015

Season's Greetings and Happy New Year from the GlassFish/Java EE Team

On behalf of the GlassFish and Java EE team at Oracle I wish you and your family Season's Greetings and a very Happy New Year.

This has been another important year for us. We continued our evangelism efforts worldwide, released GlassFish 4.1.1, started the GlassFish 5 branch, released a number of early drafts for critical Java EE 8 JSRs, strengthened the Adopt-a-JSR program and offered full commercial support for Java EE 7 through the best-in-class WebLogic 12.1.2 offering. In a similar vein we saw the number of available Java EE 7 options expand especially with WebSphere Liberty. We were able to warmly welcome Siwpas as a new entrant into the Java EE compatibility family. Most encouragingly we were able to share a number of real world Java EE 7 adoption stories with you and saw strong developer support for the Java EE 7 platform as well as key APIs like JSF and JPA. We are ever thankful for your support and we hope to continue to try our best to serve your interests, perhaps against what many would consider pretty tall odds.

In the coming year it is obvious we will see commercial Java EE 7 support via JBoss EAP very soon. We hope we will also see other strong Java EE 7 options such as TomEE. We hope to continue to move the Java EE 8 specifications and GlassFish 5 forward with support from our community and our JCP compatriots. On the cloud front we will very likely bring Java EE 7 to the commercial Oracle Cloud. If the current momentum of Java EE 7 holds we are sure to be able to share many more great real world adoption stories with you. We will look forward to working harder than ever in engaging you through our development and evangelism efforts certainly including this humble community blog.

As you know I and my colleague David Delabassee are the primary maintainers of this blog. Both David and I will be enjoying some well-earned time-off with our families the next few days. As a result the guns will be mostly quiet at this particular Java bulwark to return recharged and full force in the new year.

Until then, thanks and best wishes once again. We hope to see you next year!

Wednesday Dec 23, 2015

Java EE @ UberConf 2015

UberConf 2015 was held July 21-24 in Denver, Colorado. UberConf has grown to become one of the most significant US developer conferences. Consequently it is an important conference for our team to support. Topics covered included Java SE, JavaScript, JVM languages, architecture, methodology, mobile, cloud and the like. My former colleague Arun Gupta and I covered Java EE.

I had three talks total over two days, essentially back-to-back. I did talks on the basics of Java EE, real world microservices with Java EE and aligning Java EE with the reactive movement. More details, including slide decks, video and code, posted on my personal blog.

Tuesday Dec 22, 2015

JavaOne 2015 - Another Year, Another Step Forward

JavaOne 2015 San Francisco was held October 25-29. I think this was another great year for JavaOne. It is always a privilege to try to do justice to the crucial role of Java EE track lead. I'd like to share my thoughts, observations and experiences at JavaOne 2015 from that perspective. I'll also share all the materials that I presented at JavaOne.

Besides helping organize the conference, I participated in the very cool community keynote celebrating twenty years of Java, faciltated the Sunday GlassFish community events, ran a few hands-on labs, led a workshop and presented a few technical sessions. This was by far my busiest JavaOne conference ever. More details on all of this, including thoughts, analysis, slide decks, videos and code, is posted on my personal blog.

Monday Dec 21, 2015

Java EE 7 in Production at Commerzbank

One of the most important things to do at this stage of the life-cycle of Java EE is highlight successful adoption stories at a regular cadence. We have been doing just that for a long time through our adoption stories blog, this humble blog as well as JavaOne. In the past few months celebrated Java EE advocate and Java Champion Adam Bien has been really helping out in this regard as well through his popular blog. One of the recent cases Adam highlighted is production Java EE 7 usage at Commerzbank.

For those unaware, Commerzbank is one of the largest international financial institutions based in Germany. The bank implements a number of applications based on Java EE 7 and AngularJS. The front end AngularJS application communicates securely with the back-end using REST powered by JAX-RS and Java EE 7. Timo, a senior engineer with Commerzbank, noted the simplicity, ease-of-use and productivity offered by Java EE 7. He also noted very lightweight war deployments and lack of any complex application dependencies with Java EE. The team also utilizes Java SE 8, NetBeans and Jenkins. You can read the full details of the adoption story on Adam's blog.

JavaOne 2015 was particularly good in terms of compelling Java EE adoption story sessions. We will share the details of those stories here, including session videos, in the coming weeks and months.

If you have a similarly great Java EE adoption story to share with the community (particularly migration stories from other technologies), please do feel encouraged to reach out. 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.

Tuesday Dec 15, 2015

Content Negotiation using 'q' Factors with JAX-RS 2/Java EE 7

When we think of HTTP and content negotiation most of us probably immediately think of mime-types. Agreeing upon the mime-type is indeed part of the HTTP conversation between a client and a server. However HTTP has also had an even finer grained content negotiation mechanism called the relative quality factor or 'q' factor for short. 'q' factors are so far not that well supported by browsers and are even more unknown to most developers. Using a q-factor, a client can specify a preference for the mime-type they want if they are able to support multiple mime-types (let's say to state a preference for PNG over JPG). The 'q' factor is essentially a number between 0.0 and 1.0 tacked onto the mime-type. A higher value indicates a more preferred mime-type. Similarly the server can also indicate what mime-type it prefers to send as a response by specifying a 'qs' factor or quality of source factor. The best written explanation of 'q' factors that I could find is here. Note that the article also points out the somewhat obscure nature and poor browser support for 'q' factor based negotiation in the web world so far. It does however point out the fact that Apache httpd has long had strong support for 'q' factors.

'q' factor based negotiation can be very valuable in REST. It can help you write a more robust service API. For example, you could support both JSON and XML for a resource and then state that you prefer JSON over XML if the client supports both. Similarly you can write more powerful clients that can flexibly process multiple content types. These capabilities are especially helpful while writing public APIs with REST or dealing with heterogeneous clients that you cannot completely predict. The same is true on the client side as well especially while dealing with third-party services. The good news for you is that JAX-RS 2 and Java EE 7 has strong support for 'q' factor based content negotiation. Sam Sepassi did a very nice job explaining the feature in a recent article. You should give it a read and consider using it if you have a good use case for the feature.

Monday Dec 07, 2015

Please Welcome Siwpas as Java EE Certified Option!

Siwpas (short for Simple Web Profile Application Server) has been an interesting project for a little while. Very similar to the more widely known TomEE, Siwpas is a Java EE application server based on Tomcat. In addition to Java EE support Siwpas offers production ready features such as clustering and security. You can also get commercial support from a Turkish based company named MechSoft.

Although Siwpas has been around for some time it had not been certified. The folks behind the application server now announced that they have achieved Java EE 6 Web Profile compatibility through the OW2 Foundation. For those unaware, the OW2 Foundation has long been granted a full Java EE TCK license for a long time. This is the license Siwpas is able to use by joining and contributing the server to the OW2 Foundation. 

Siwpas founder Gurkan Erdogdu shares the story of how the server achieved Java EE 6 Web Profile certification on his blog. You can find out more about Siwpas here and download it from the official OW2 forge. As Gurkan mentions the next step for Siwpas is Java EE 7 certification. Please welcome their valiant effort in expanding options for the Java EE community.

Thursday Dec 03, 2015

EJB and CDI - Alignment and Strategy

We often get questions related to EJB and CDI, to the convergence (or divergence!) between those 2 important Java EE technologies.  That particular topic was discussed a few months ago by Linda De Michiel (Java EE Specification Lead and former JPA Specification Lead) during JavaDay Tokyo 2015.

In her session, Linda first set the stage by discussing the history of both EJB and CDI, and how those 2 technologies have evolved over time. She then discussed the advantages and disadvantages, some of the gaps between those 2 technologies. Linda finally concluded by discussing some strategies to improve things going forward. For example, the @Transactional interceptors was introduced in Java EE 7. In Java EE 8, the idea is to continue on the path of extracting additional container services to make those more widely and more easily available in the platform. Java EE 8's CDI Security Interceptors and the new 'flexible MDB' comes to mind.

This is an interesting talk as it discusses the past, the present and the future of fundamental Java EE technologies. It should be mentioned that David Blevins and Jean-Louis Monteiro (TomEE) gave a similar talk during JavaOne : "EJB/CDI Alignment (What does it Mean?)"