Tuesday Jun 09, 2015

JSR 359: SIP Servlet 2.0

The reach of the Java EE Platform is not necessarily limited to 'traditional' Enterprise Applications. A good illustration of that is the SIP Servlet technology, which brings together the SIP programming model and the Java EE platform. SIP (Session Initiation Protocol) is a network signaling protocol, often used in the Telecommunication space, for creating and terminating sessions (e.g. VOIP sessions) with different participant(s).

A SIP Servlet is to SIP what a (traditional) Servlet is to HTTP, a server-side component managed by a container. A component developed using a Java API that interacts with clients by responding to incoming requests and returning corresponding responses. The SIP Servlet API (javax.servlet.sip) builds on the generic servlet API (javax.servlet) in much the same way as the HTTP Servlet API (javax.servlet.http) does. Given that, it is relatively easy to learn how to write SIP-based applications. A Converged Application is a (Telco oriented) application that spans multiple protocols (e.g. SIP, HTTP) and interfaces, such as Web, telephony, and other Java EE interfaces. A SIP container enables the development of applications that use SIP, HTTP Servlet API, and other Java EE APIs and components like JPA, JAX-RS, and messaging.

And like any major Java APIs, the SIP Servlet API is defined through the JCP.  The SIP Servlet specification has recently been updated, see JSR 359 here. To learn more about this, you might want to read the SIP Servlet Tutorial.

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

Friday Jun 05, 2015

Java EE 8 Roadmap Update

Java EE 8 was formally launched in September 2014 with the JCP’s unanimous approval of JSR 366 and our announcements at JavaOne.  At JavaOne 2014 we presented a summary of our areas of investigation for Java EE 8 during the Strategy Keynote, followed by numerous in-depth presentations on our intended work by the specification leads.  The goal that we set for ourselves then was to complete this work by JavaOne San Francisco 2016.

Although we all like to do (and hear) big things at JavaOne, the various latencies involved in launching expert groups as well as the other demands on the time of our spec leads has resulted in the date being pushed out a bit. We are strongly committed to transparency in our work on the Java EE Platform.  We are therefore publicly announcing that we are now changing our target time frame for the completion of this work to the first half of 2017.  We will be updating the target dates for the JSRs under the Java EE umbrella to reflect this change.

As a result of this shift, there is now more time and opportunity for YOU to get involved.  For example, the MVC  1.0 JSR has published their Early Draft Review, and the Java EE Security JSR will soon follow. We continue to encourage developers to track JSRs and provide feedback by viewing the individual JSR mailing lists, wikis, and download and try out early Java EE 8 reference implementation builds.  We've already seen a lot of interest not only in Java EE 8 features, but also in participation.  Many JUGs have been involved in adopting Java EE 8 and related JSRs, including the CJUGMorocco JUG, and a host of others.  Companies and individuals can get involved as well. For example, Serli, with a host of expertise in Java development, have contributed Application Versioning to GlassFish in the past, and are now signing up to contribute to the MVC reference implementation.

Start here and help define the future of Java EE! 

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.

Wednesday Jun 03, 2015

Hitachi Cosminexus Now Java EE 7 Compatible!

With great pleasure I can report that the Hitachi Cosminexus Application Server v10.0 has recently been Java EE 7 certified! Cosminexus joins the ranks of GlassFish 4, WildFly 8 and TmaxSoft JEUS 8. Cosminexus has long been a significant player in the Japanese market backed by our good JCP partners at Hitachi. All of the Java EE certified offerings are always listed on the official Java EE compatibility page.

As many of you know Java EE 7 compatibility is one of the most significant goals of the upcoming WebLogic 12.2.1 release. We also know that the IBM WebSphere Liberty Profile team has been aggressively pursuing full Java EE 7 certification through monthly beta releases and seem close to being done. The Apache TomEE team is also working on bringing forward Java EE 7 features. Judging by past history of release cycles for JBoss AS and JBoss EAP it's not unreasonable to think JBoss EAP will likely be Java EE 7 certified within this year (for those unaware WildFly is the upstream project for JBoss EAP much like JBoss AS once was).

So the question now is who will be next to cross the Java EE 7 compatibility finish line - only to start working on their Java EE 8 implementation :-).

Tuesday Jun 02, 2015

Stored Procedure Support in JPA 2.1/Java EE 7

If you want to start a contentious debate at work, you should try initiating a discussion on the pros and cons of database stored procedures. If you want the discussion to be particularly colorful make sure to include a few DBAs or database developers instead of simply Java application developers :-). One of the least contentious benefits of stored procedures is that they can provide a performance boost for cases that involve multiple complex queries and heavy data manipulation by reducing the number of network round trips to the database. Some of the main weak points for stored procedures include lack of portability, weaker tooling for development/testing/debugging, and increased database load. The last one is a particularly salient point in my view - databases are the most difficult part of the data center to scale horizontally and they are already heavily IO bound. Frivolously adding stored procedures to the mix can work to make the database CPU bound to boot.

Where JPA and more generally ORM tools stand on this debate is not a great mystery - prior to JPA 2.1 the specification did not add direct support for stored procedures. That being said it should be noted that major JPA implementations have long supported stored procedures and adding support for them has been a frequent enough request for the JPA specification. The good news is that JPA 2.1 and Java EE 7 adds standardized support for accessing stored procedures. Pau Kiat Wee does a nice job of demonstrating the new feature in a very brief code centric blog post. Note that his example is Java SE based so it's actually even easier in a Java EE 7 environment. The newly added stored procedure support is very similar to the way JPA handles native queries. One of the best explanations of the feature comes from specification lead Linda DeMichiel. Check out minute 4-7 in the short video below (if you are having trouble accessing the embedded video it is available here).

Another very good source for more examples of the new feature is the EcliseLink 2.5 JPA 2.1 notes. Enjoy and don't forget to share if these are useful resources.

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

Monday Jun 01, 2015

Java EE @ Voxxed Days Algiers

The inaugural Voxxed Days Algiers was held on May 23 in Algiers, Algeria. Besides the Devoxx and Voxxed brand, the event can be credited by and large to the grassroots efforts of the Algeria JUG as well as the neighboring Morocco JUG. I have to thank Morocco JUG leader Badr El Houari for cordially inviting me to the event and Algeria JUG leader Abderrazak Bouadma for making the trip a unique unforgettable experience. The event was a humble but profound first step in the right direction for Algerian developers. The event definitely had a strong Java EE showing.

I participated in the opening keynote and delivered three sessions on Java EE 8, using NoSQL in Java EE applications and testing Java EE applications with Arquillian. More details on the sessions and Voxxed Days Algiers, including slide decks and code, posted on my personal blog.

Friday May 29, 2015

Meet the JavaOne Java EE Track Committee: Markus Eisele

This is the first in a series of interviews for you to meet some of the committee members for the JavaOne 2015 Java EE track. The committee plays the most important part in determining the content for JavaOne. These good folks really deserve recognition as most of them devote many hours of their time helping move JavaOne forward, often as volunteers. If JavaOne matters to you, these are folks you should know about.

This first interview is with Markus Eisele. If you are having trouble seeing the embedded video below it is available here.

Markus is now a Developer Advocate at Red Hat and focuses on JBoss Middleware. He has been a long time community advocate for Java EE. He is a popular blogger, author, prolific speaker, JCP expert, Oracle recognized Java Champion and former Oracle ACE Director. He founded a successful German conference himself and helps organize a number of conferences worldwide. He has contributed as a JavaOne content committee member for a number of years. In the interview he shares his expectations for the Java EE track this year.

On this note, I would like to make sure you know that the JavaOne content catalog is now already live with a few preliminary fairly obvious selections we were able to make. None of the sessions accepted at this stage are from Oracle speakers on our track. The folks that we selected early for acceptance include David Blevins, Jonathan Gillmore, Mohammed Taman, Rafael Benevides and Antoine Sabot-Durand. They will be talking about Java EE Connectors (JCA), Java EE 7 real world adoption, CDI and DeltaSpike. I would encourage you to check out all the early selections in the catalog. I also want to remind you that you can still save money by registering early for JavaOne.

I hope to see you at JavaOne. Do stay tuned for more interviews with committee members as well as some key speakers on our track.  

Thursday May 28, 2015

AngularJS + CDI = AngularBeans

Even in the highly volatile world of JavaScript frameworks, AngularJS is still very clearly leading the pack. 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 back-end features forward to the client as well.

Fortunately for the Java EE ecosystem, my good 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 first release is now on GitHub for everyone to use. His simple hello world example speaks volumes as to the power of this solution. Beyond simply removing boilerplate AngularBeans does far more (look at the GitHub page for full details):

  • Bean Validation on the client side
  • Built-in internationalization support from server-side property files
  • SockJS support
  • Server-side event binding

He has a more comprehensive example that demonstrates all the capabilities of AngularBeans. The project is at a very early stage, so this is a great time to get involved! In particular Bessem is looking to improve the project documentation.

On a slightly separate note, Bessem is the JUG leader of the ESPRIT JUG in Tunisia. He is one of the key Java EE advocates in North Africa, along with the likes of Egypt JUG leader Mohamed Taman. Bessem and I both very recently spoke at the inaugural Voxxed Days Algiers, Algeria (expect the trip report from that great event soon!).

Wednesday May 27, 2015

JavaOne Java EE Track: Saying Thanks and a Look at the Real Decision Makers

The JavaOne 2015 CFP is now closed. I want to thank all of those that submitted their thoughtful topics and all those who considered submitting. In the Java EE track we now have all the raw material we need to construct a strong selection. In the next few weeks we will be working hard with the review committee to carefully sort through all the submissions we have at hand.

I also want to take this opportunity to introduce you to the real decision makers in the track - the content selection committee members. The folks in the committee by far play the most important role in help shaping the track. This year on the track we are fortunate to have David Blevins, Cay Horstmann, Johan Vos, David Heffelfinger, Ryan Cuprak, Scott Sosna, Markus Eisele, Kevin Sutter, Linda DeMichiel, David Delabassee, Bruno Borges, and Harold Carr. You should get to know these folks if JavaOne is something you care about. I've posted their profiles on my personal blog. In the next few weeks, I plan to publish interviews with some of these folks through this humble blog.

Keep in mind that JavaOne is now already open for registration. I hope to see you all at JavaOne. In the meanwhile as always if you have any questions never hesitate to reach out.

Tuesday May 26, 2015

Java EE @ Devoxx UK

Devoxx UK is fast approaching! The conference will take place in London at the usual venue (Business Design Center) in June. Devoxx UK is covering a broad range of topics and obviously Java EE will be well covered.  Various Specification Leads and EG members will be present in London so it will be a good opportunity to catch-up. Here is a short overview of some of the Java EE related activities. For the full Devoxx UK agenda and additional practical details, see here.

Adopt-A-JSR Summit

The Adopt-A-JSR Summit will take place on Wednesday. This event, co-organized by the community and the JCP, will bring together Specification Leads, Java User Group, JCP leaders, OpenJDK leaders, Evangelists and conferences attendees in order to discuss how the community can be involved in shaping the future Java platform.


During the conference, several sessions will be devoted to Java EE:

And last but not least, we will have the 'traditional' Java EE BoF and a Hackergarten.

Will I see you in London?

Tuesday May 19, 2015

Virtual Adopt-a-JSR/Java EE 8 Overview on Tuesday!

As some of you know, 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 will host a virtual meeting on Google Hangout Tuesday, May 26 at 6:00 PM Central Standard Time (Chicago). Although the meeting is focused on the Chicago JUG because it is on Google Hangout, anyone is welcome to listen in! The session should also be recorded so you can view it later - stay tuned here. These are just some of the things that the meeting will cover:

  • Introduction to the JCP/JSR process
  • Adopt-a-JSR
  • Status of the different Java EE 8 JSRs
  • The different ways in which JUG members can contribute
  • Live example (pick a JIRA, discuss and craft a reply, suggest a patch, try to recreate, raise a new JIRA)

The meeting will be led by none other than key Chicago based Java EE author and community advocate Josh Juneau. Folks that will attend in support include Chicago JUG leaders Freddy Guime and Bob Paulin as well as Heather VanCura of the JCP. Other folks from our team may also join in (I will sadly not be able to attend as I will be on a trans-Atlantic flight at the time :-(). Josh presented the Java EE 8 status update portion of the talk at the Chicago Coder conference very recently. His slide deck is now on SlideShare. I also spoke at the Chicago Coder Conference and will share the trip report in the next coming weeks.

In the meanwhile, you can find the details for the meeting on the Chicago JUG meetup page and the link to the actual Google Hangout is here.

Monday May 18, 2015

GlassFish Images on Docker Hub

Great news to our fellows bleeding edge Java EE developers and GlassFish users. We are now pushing two images of the application server to Docker Hub to make it even easier to try new and upcoming releases. The GlassFish organization is under registry.hub.docker.com/u/glassfish/, and here are the two images we have:

GlassFish Nightly Builds

This image is based on the latest builds of GlassFish, and updated when a new build is produced. To try this one, run:

# docker run -ti -p 4848:4848 -p 8080:8080 glassfish/nightly

This will give you the asadmin console. Start the domain with start-domain:

asadmin> start-domain

And access the console at http://localhost:4848. The default admin username and password are: user=admin / password=glassfish.

GlassFish Ozark - MVC RI

This image comes with GlassFish 4.1 modified with the required changes to run the new specification MVC 1.0, part of the upcoming Java EE 8 platform. To run this image, do:

# docker run -ti -p 8080:8080 glassfish/ozark

This will start GlassFish and deploy the Ozark Samples application. To access it, go to http://localhost:8080.

Have fun with GlassFish on Docker containers! 

Thursday May 07, 2015

Using @Context in JAX-RS

The @Context annotation gives, to a JAX-RS implementation, the ability to inject contextual information (e.g. Configuration, Security Context, etc. ) in a JAX-RS end-point. This capability is available since the early day of the specification, since JAX-RS 1.0. There are many scenarios where this feature is useful (e.g. access one of the HTTP header parameter of the consuming client).

To get more information, you can check the JAX-RS Specification (@Context is described in Chapter 9 & 10) or alternatively, you can read this 'Using @Context in JAX-RS' piece written by Abhishek Gupta (see initial instalment here).

Tuesday May 05, 2015

Java EE 7 Maintenance Review Draft

The Java EE 7 Platform Specification (JSR 342) is currently going through a maintenance release process. If you check the proposed changes, you will see that this update is really about clarifying the specification itself; none of the proposed changes will impact the Java EE 7 RI nor the TCK. So clearly, only the specification itself will be slightly impacted.

It seems that a consensus has now been reached amongst the Java EE 7 Experts Group over the proposed changes and if everything goes well, the update will soon be submitted to the JCP to formally initiate the Maintenance Review process.