Friday Aug 30, 2013

JPA vs. Hibernate?

Whether to use standard vs. non-standard APIs is always a constructive ongoing tug-of-war (well, most of the time anyway). It seems that the tug-of-war is particularly fierce when it comes to anything open source. That's quite unfortunate as open source and open standards should be ideological brothers-in-arms - but then we all know feuds tend to be the worst amongst blood relatives :-). One facet of this debate that seems pervasive and persistent is whether to use Hibernate's legacy non-standard APIs or standard JPA.

Key Hibernate developer Emmanuel Bernard of Red Hat offers his insights on the matter on an audio interview with TSS (TheServerSide) chief editor Cameron McKenzie (spoiler: it's not an either/or proposition :-)). If the past few years is any indicator, this won't settle the war of words, but at least it might be a good bit of input for those interested....


Thursday Aug 29, 2013

WebSocket Command Line Client for Testing

As many of you know, being able to do some simple integration/developer testing is invaluable in developing Web Services - WebSocket is no exception. You can use rich GUI based interfaces like soapUI to do this for SOAP and REST (there's also the compact but excellent rest-client UI dedicated to REST). Because it's so new, there aren't many good clients to test WebSocket endpoints with quite yet. Fortunately, Tyrus 1.1 comes with a pretty handy command line client that you can use for testing (it of course has other uses too such as monitoring). Pavel Bucek briefly describes the client here.

There's also a GUI driven simple WebSocket client extension for Chrome. It's similar to the popular Postman REST client extension for Chrome.

Do you know of any other/better options for WebSocket testing? Better yet, you could write a Java based WebSocket client UI yourself and share it with the community :-).

Tuesday Aug 27, 2013

A Code-Driven Overview of JBatch

Java EE and server-side Java to date has largely been about on-line user-driven applications. However as Java's predominance in the data center continues to grow, it seems batch processing is yet another field of computing gradually shifting to Java as well. Things like mission critical off-line bulk oriented batch processes, ETL jobs, one-off nightly job scripts and the like that tended to be written in COBOL/RPG, various PL/SQL like scripts, Perl, Python, shell scripts and so on are now more often than not winding up on the Java developer's desk. In recognition of this fact, JBatch (aka Java Batch, JSR 352, Batch Applications for the Java Platform) was added to Java EE 7.

In a recent OTN article Oracle's JBatch expert group representative Mahesh Kannan wrote a pretty cool code-driven overview of the API. He discusses the core concepts/motivation, the Job Specification Language, the reader-processor-writer pattern, job operator, job repository, chunking, packaging, deployment, integration with Java EE, JBatch support in the GlassFish 4 Admin Console/CLI and the like. It's really a great introduction if you want to get started with JBatch. There's also the 15-minute JBatch presentation by specification lead Chris Vignola of IBM on the GlassFish videos YouTube channel and the slide deck for my own lightning talk:

You can also check out the official specification yourself or try things out with the Java EE 7 SDK.

Monday Aug 26, 2013

TmaxSoft JEUS 8 Now Java EE 7 Compatible!

The JEUS 8 application server from South Korean enterprise software development company TmaxSoft is now officially Java EE 7 certified! This means you now have two Java EE 7 compatible application servers - GlassFish 4 and JEUS 8 (GlassFish 4 is also certified against the Web Profile in addition to the Full Profile). The Java EE 7 application server choices will likely be expanded further by the end of the year with the likes of WildFly (formerly JBoss AS) 8.

You can check out the details and download JEUS 8 from the TmaxSoft site. Note that this is a developer preview and an official release is planned for 2014.

Friday Aug 23, 2013

Java EE@JavaDay Taipei 2013

JavaDay Taipei 2013 was held at the Taipei International Convention Center on August 2nd. Organized by Oracle University, it is one of the largest Java developer events in Taiwan. This was another successful year for JavaDay Taipei with a fully sold out venue. In addition to Oracle speakers like me, Steve Chin and Naveen Asrani, the event also featured a bevy of local speakers including Taipei Java community leaders. Topics included Java SE, Java EE, JavaFX and mobile.

I delivered a keynote on Java EE 7 (our flagship talk) as well as a talk on WebSocket/JSR 356. More details on the sessions and JavaDays Taipei, including the slide decks and code, posted on my personal blog.

Thursday Aug 22, 2013

You are Invited to the GlassFish & Friends Party!

If you are active in the GlassFish community, you probably already know about the GlassFish & Friends Party that takes place on the Sunday of JavaOne San Francisco at the much coveted Thirsty Bear. The event has become somewhat of an iconic tradition these past few years...

If you are a friend of GlassFish or interested in becoming one this is the party to attend and for good reasons:

  • It's quite possibly the best place to network with some of the brightest minds in the GlassFish, Java EE or Java ecosystems in a very laid back setting. In the past folks like James Gosling, Kirk Pepperdine, Bert Ertman, Heather VanCura, Cay Horstmann, Ed Burns, Ben Evans, Frank Greco, Martijn Verburg and Bill Shannon have attended the party. This year, folks like Paul Sandoz, Arun Gupta, Ludovic Champenois, David Heffelfinger, Markus Eisele, David Delabassee, Bruno Borges and Mike Lehmann have already signed up (I'll of course be there to greet you as well). You can certainly count on most key members of the GlassFish team including architects, specification leads and product managers to be there.
  • It's a great place to find out first hand what is going on with Java EE and GlassFish at Oracle. This is an especially important year with the release of Java EE 7 and GlassFish 4.
  • You can meet people using GlassFish and Java EE in the real world and ask them about their experiences.
  • Help shape Java EE and GlassFish by talking in person to some of the most key influencers and decision makers.
  • It's free - anyone in the San Francisco Bay area can attend (all you need to do is sign up via EventBrite).
  • You can grab some free GlassFish swag while you are at it like a GlassFish t-shirt or laptop sticker.

Besides the party, if you happen to be lucky enough to be coming to JavaOne itself, another event that you really shouldn't miss is the GlassFish Community event on Sunday morning (9:15 AM - 11:15 AM). If you are interested, make sure to add it to your calendar through the JavaOne Schedule Builder. I'll be posting more details about that event in the next few days. For now, there is the session details on the JavaOne Content Catalog. You should also check out the very cool Java EE 7 and GlassFish promotion page for JavaOne on Lastly and perhaps most importantly, there is the handy list of key Java EE and GlassFish sessions at JavaOne.

The party starts at 8 PM (on Sunday, September 22nd) at the Thirsty Bear (661 Howard Street). Space is limited, so if you think this is worth your while, you would be well advised to sign up as soon as you can. Hope to see you there!

Wednesday Aug 21, 2013

Take NetBeans 7.3 Satisfaction Survey!

With a focus on POJO development, annotations, intelligent defaults, portability and productivity, you can pretty much do Java EE development using a plain text editor these days if you prefer. In fact, as a consultant I've seen a handful of remarkable folks do exactly that. For the rest of us though, IDEs like NetBeans are incredibly helpful from basic code completion, inline warnings and code navigation to powerful wizards, refactoring tools and code generation. NetBeans 7.3+ in particular has been great in early support for Java EE 7, amongst many other improvements like the outstanding support for HTML 5, JavaScript and CSS development.

If you are a Java EE, GlassFish or NetBeans developer, you now have a great opportunity to provide your feedback on the 7.3+ releases. The good folks in the NetBeans team have put together a very brief survey on the recent work they've done as well as on what they should work on next. Please consider taking a bit of time to take the survey and help improve NetBeans.

Tuesday Aug 20, 2013

An Overview of EL 3

Although not mentioned often, EL 3 is one of the APIs that has gone through significant changes in Java EE 7. In fact, although EL has long been a very important part of APIs like JSTL, JSP, JSF, Facelets and CDI, with Java EE 7 EL got it's own JSR. Just some of the crucial changes in EL 3 include a standalone API, support for lambda expressions, static field and method access, improved collection processing and so on. Dan Woods did a pretty decent write-up of EL 3 on InfoQ. There's also the 15-minute EL 3 presentation by specification lead Kin-man Chung on the GlassFish videos YouTube channel:

You can also check out the official specification itself or try things out with the Java EE 7 SDK.

Tuesday Aug 13, 2013

Using Java EE Concurrency Utilities Executor Service

Java EE Concurrency Utilities (more formally Concurrency Utilities for the Java EE Platform) fills an important and long standing gap for Java EE 7. The API empowers you to use util.concurrent style low-level/advanced concurrency features inside a Java EE runtime in a vendor-neutral, secure, predictable and reliable fashion. In this brief blog post, German author, JCP expert group member and key Java EE advocate Adam Bien demonstrates using one of the most useful Concurrency Utility features - the managed executor service. There's also the 20-minute Concurrency Utilities presentation by specification lead Anthony Lai on the GlassFish videos YouTube channel and the slide deck from my own lightning talk:

You can also check out the very well written Java EE Concurrency Utilities section of the official Java EE 7 tutorial or try things out with the newly released Java EE 7 SDK.

Monday Aug 12, 2013

Using EL in Constraint Violation Messages with Bean Validation 1.1

Although it's a point release Bean Validation 1.1 brings a number of important features to Java EE 7. While the most significant of these features is clearly method validation, another very useful feature is the ability to customize constraint violation messages using EL. Gunnar Morling does a great job of explaining the feature in a recent blog post. There's also the 15-minute Bean Validation 1.1 presentation by specification lead Emmanuel Bernard on the GlassFish videos YouTube channel:

You can also check out the very well written official specification or try things out with the newly released Java EE 7 SDK.

Friday Aug 09, 2013

Comprehensive Free Java EE 6 Video Tutorial!

Reading blogs, articles and books is still the way most of us learn new technologies. However, nothing really beats someone showing you how to use a new technology step-by-step first hand, which is why video tutorials always shine.

Java EE enthusiasts should rejoice that a lone Mumbai based developer, Ashitraj More, took the time and effort to do exactly this for Java EE 6! Ashitraj created an entire comprehensive free online tutorial broken up into a series of very digestible videos covering database design, JPA, EJB 3, JSF, JMS, JAX-RS and CDI. The tutorial starts from the very basics and teaches Java EE, API by API/feature by feature, through a series of progressive code examples that build on the one before it. The tutorial uses GlassFish, NetBeans and MySQL.

Here is what one developer had to say about the tutorial: "Excellent tutorial on Java EE 6. The author(Ashitraj More) leaves nothing to imagination, lots of diagrams for clear explanation. Waiting for his tutorial on Java EE 7..."

Ashitraj plans on beefing up his already excellent JPA coverage and updating the tutorial to cover Java EE 7. If you are a Java EE beginner, you seriously owe it to yourself to check out the tutorial. If you are already a Java EE fan, you can use the tutorial to effectively advocate Java EE. Ashitraj really deserves commendation for his creativity, passion, knowledge and hard work, so please do share a few kind words with him for his invaluable contribution to the community!

The tutorial is completely free, but you can choose to make a small donation to help support the effort.

Thursday Aug 08, 2013

An Overview of JSON-P

JSON is quickly becoming the de facto data interchange format on the web, especially with powerful JavaScript clients, Ajax, REST and HTML 5 WebSockets. This is why JSON-P (or more formally the Java API for JSON Processing) is such a key part of the Java EE 7 release. It is intended to provide a standard, vendor-neutral, ubiquitous solution for parsing, generating and querying JSON. In a brief OTN article, JSON-P specification lead Jitendra Kotamraju (or Jitu as he prefers to be called) overviews JSON-P. He discusses the basics of JSON, JSON-P, the DOM-like Object Model API and the StAX-like Streaming API. There's also the 20-minute JSON-P presentation on the GlassFish videos YouTube channel and my own slide deck below:

You can also check out the very well written JSON-P section of the official Java EE 7 Tutorial or try things out with the newly released Java EE 7 SDK.