Thursday Nov 21, 2013

Jersey 2.x Tracing support

"Rest is the sweet sauce of labor." (Plutarch – a long time ago!)

Jersey is JAX-RS 2.0 Reference Implementation and as such it's fully compliant to JSR 339. The Jersey Team goes beyond the specification by adding features and functionalities to their JAX-RS implementation. Overtime, some of those features might be good candidates for standardization.  The Client API is a good example of that. In JAX-RS 1.x, Jersey and some other implementations has their own proprietary Client API. In JAX-RS 2.0, the Client API has been standardized and is now part of the specification. So it is not uncommon to have, in an implementation, features that are (not yet?) part of the specification. Those extra capabilities are also a way for an implementation to differentiate itself from the other implementations.

Tracing is a feature that was available in Jersey 1.x, this feature has now been ported to Jersey 2.x (2.3 and above). The Jersey Tracing capabilities allows to easily diagnose server-side request processing pipelines.  Libor Kramoliš, a member of the Jersey Team, has written a detailed post on how to use the Jersey's Tracing capability.

Tuesday Oct 08, 2013

JavaOne 2013 Trip Report

JavaOne 2013 San Francisco was held September 22-26. This was a particularly important year from a Java EE standpoint with the release of EE 7 and GlassFish 4 - the content reflected this fact. JavaOne 2013 can certainly be considered a success by most measures. It's clear the best and the brightest in the Java ecosystem continue to see participating in JavaOne as a badge of honor and a privilege.

Besides booth duty at the GlassFish 4/Java EE 7 kiosk on Monday/Tuesday, I led the GlassFish Community Event on Sunday, had a BOF titled "What’s New with Bean Validation and Expression Language in Java EE 7" on Monday, led the GlassFish BOF on Tuesday and had a technical session titled "Android and iOS Development with Java EE 7" on Thursday. More details on the sessions and JavaOne, including the slide decks and code, posted on my personal blog.

Thursday Jun 28, 2012

EclipseLink 2.4 Released: RESTful Persistence, Tenant Isolation, NoSQL, and JSON

EclipseLink 2.4 is released as part of Eclipse Juno release train. In addition to providing the Reference Implementation for JPA 2.0, the key features in the release are:

  • RESTful Persistence - Expose Java Persistence units over REST using either JSON or XML
  • Tenant Isolation - Manage entities for multiple tenants in the same application
  • NoSQL - NoSQL support for MongoDB and Oracle NoSQL
  • JSON - Marshaling and unmarshaling of JSON object
Eclipse Link 2.4

Here is the complete list of bugs fixed in this release. The landing page provide the complete list of documentation and examples. Read Doug Clarke's blog for a color commentary as well.

This release is already integrated in the latest GlassFish 4.0 promoted build.

Try the functionality and give us feedback at GlassFish Forum or EclipseLink Forum.

Sunday Feb 05, 2012

POJOMapping in Jersey for type-safe clients

Over on his blog, Jason Lee has a detailed post on the new POJOMapping feature in Jersey/GlassFish which offers strongly-typed client API's and illustrates this with a GlassFish Cluster administration sample.

ALT_DESCR

The post shows how to enable POJOMapping with a Jersey servlet initialization parameter and goes on to show the Cluster domain model. An archive with the entire sample is available there.

Sunday Jan 08, 2012

RESTful JAX-RS Roundup

Note: if you're reading this using a feedreader, please make sure you've updated to the updated TheAquarium feed.

While most parameter handling examples with JAX-RS focus on @PathParam, there are other JAX-RS 1.x annotations that are worth knowing.

Mkyong has a short and simple example for how to use @MatrixParam (and for many more here) while John Yeary covers @CookieParam. The JavaDoc for both annotations can be found here and here.

ALT_DESCR

Meanwhile, François explores Jersey's support for MVC where the Controller is a resource class, the model is returned by a resource method, and the view is a template which operates on the model (this is inspired by the stapler project and is also used by Hudson). Note that this is not part of the JAX-RS standard.

To close this quick roundup, I'd like to point you to a month-old JAX-RS blog entry by Adobe's Christophe Coenraets combining jQuery and JAX-RS/Jersey as probably the one with the best taste to date (IMO, etc...) !

Update: John Yeary has (a lot) more JAX-RS resources for you.

.

Tuesday Dec 13, 2011

Jersey 1.11 is here with MOXy support

Jakub, the Jersey lead has just announced Jersey 1.11 which offers EclipseLink's MOXy support, attaching filters to non-blocking clients as well as some docs cleanup.

Moxy Band

Jersey 1.11 is scheduled to be available as part of the upcoming GlassFish 3.1.2 release. More on other component updates for this release in an upcoming post.

I can't help but wonder if the number of Canadians involved in MOXy has anything to do with it being named after a heavy metal band. Project and product names are always fun stories.

Tuesday Sep 27, 2011

Coherence 3.7.1 is out with RESTfulness, courtesy of Grizzly/Jersey

With its latest 3.7.1 release, Oracle Coherence is now offering REST support using Jersey 1.8 and Grizzly 2.1.1 (as a standalone HTTP server) under the covers. This opens up the Coherence data grid to yet more languages such as PHP or Python.

ALT_DESCR

This documentation page lays out all the steps to build a Coherence REST Application. You'll also find Release Notes enumerating all the enhancements in this version of the product.

Oracle GlassFish Server customers using Active Cache will find also that this version includes a number of bug fixes in Coherence*Web.

Added: Press Release

Friday Sep 02, 2011

Tab Sweep - JCache, REST, CDI samples, JavaOne, ... and James' new gig

Recent Tips and News on Java EE 6 & GlassFish:

Radio Receiver

JCache: Alive and Going to be Part of Java EE 7 (QCon)
Unit Testing for Java EE (Adam)
REST-JEE (minuteproject)
Autumn JavaEE workshops, sessions and events (Adam Bien)
Java SE 7 - New File IO (Dr. Dobb's)
Java EE 6 examples of CDI usage (code.google.com)
JavaOne 2011 : un Hands-On Lab Serli / Oracle (Serli)
Mapping XMLTYPE (Shaun)
GlassFish 3.1.1 and JDK 7 Webinar replay (GlassFish Videos)
OTN Developer Day New York, September 14th 2011 (OTN)
Java EE 7: The Voyage of the Cloud Treader (Werner)
I've moved again (James Gosling)

Thursday May 26, 2011

Jersey 1.7 - OAuth and more

Jersey 1.7 was released a few days ago. You can read about it on Jakub's blog (Jakub is the new project lead on Jersey). This is a JAX-RS 1.1 implementation which, among other things, enhances its existing OAuth support (the topic of a popular hands-on lab last year at JavaOne).

ALT_DESCR

If you're interested in trying out that part, check out the signature API and the latest jersey-oauth.pom dependency which comes with a set of samples in the oauth-tests module. I think you can expect more improvements and documentation in the near future.

Thursday Apr 07, 2011

Jersey 1.6 - Shipping!

With all the GlassFish 3.1 recent activity, there was another important release that might have slipped under your radar: Jersey 1.6 is here.

Jakub, the new lead for the project, discusses what's new in this release including modularization, Grizzly 2.0 integration, updates to functional tests and code coverage using Cobertura.

Yellow Jersey, photo from http://www.flickr.com/photos/joeshlabotnik/350582000

Another key improvement is the OAuth (Wikipedia) client which builds on top of the Jersey client API and offers easy integration with services such as Twitter (illustrated in the Jersey samples).

Jakub's blog post has all the links for documentation, download, mailing list and issue tracker. Note that GlassFish 3.1 ships with Jersey 1.5 and that future plans for the project include the ability to run multiple simultaneous versions of Jersey in GlassFish as well as integration and optimizations for Oracle WebLogic Server.

Sunday Feb 13, 2011

GlassFish deploy using REST. Get it? No, Post it!

The RESTful admin interface for GlassFish was introduced with the release of version 3.0, back in December 2009 but it seems that most people still see it as a monitoring tool only. Jason has just POSTed a blog entry on how to deploy applications to GlassFish using cURL to prove it's more than that.
To explore many more possibilities, just point your browser to http://localhost:4848/management/domain/

Original photo from http://www.flickr.com/photos/neezhom/4323903163/

While this entry details the options for a proper POST request with cURL to deploy or undeploy a WAR file, any HTTP client will do and that is what makes this RESTful admin interesting - there is virtually no software to install on the client admin side. In GlassFish 3.1, this feature has been enhanced both in terms of API (well, URI really) and implementation.

If you add to the mix the asadmin CLI, JMX, and the often-appraised web console, you can really pick your weapon of choice!

Sunday Oct 17, 2010

GlassFish Tips and Links #12: Maven on Helios, Basic Authentication, Jersey 1.4, Bye AMX, JavaSE 6u22...

Recent Tips and News on Java EE 6 & GlassFish:

Informational Sign

Tips

Maven troubles on Eclipse Helios causes problem deploying app to GlassFish
• ... but see Harald's tutorial
Basic Authentication in GlassFish 3 (Maksim Sorokim)
Jersey 1.4 was released on September 11th (Paul)
More on Web Sockets and HTML5 in Glassfish - covers using the SQL API (Santiago)
Update to deploying webservices on Glassfish 3.1 cluster (Bhakti)
Spring vs. Java EE and Why I Don't Care (Eberhard Wolff)

GlassFish 3.1

Admin UI is now 100% based on REST; no more AMX (ludo)
Progress in moving GlassFish to Kenai infrastructure (eduardo)

Links and News

eApps Cloud Release notes v .99.2 - Beta will include Liferay on GlassFish
Habari OpenMQ Client (library for Delphi and Free Pascal to access OpenMQ)

From Oracle

• Countdown to decommissioning SunSolve "later this year"
   Goodbye SunSolve, Helloooo MOS!, SunSolve Retirement Notice - Oct'10 and FAQ
• Sun GlassFish Enterprise Server 2.1.1 p8 now available.
• JavaSE 6u22 is out with security bugs - Release Notes, twitter @rolilad
• Oracle's October Critical Patch Update at eSecurityPlanet.

En Español

Control del nivel de aislamiento transaccional en JPA
EJB 3.1 en Porlets de Liferay (Apuntes de Java)

Event News

Reports
Slides and Trip Report for SVCP 2010:
   [1], [2], [3], [4], [5], [6].
This Week's Events
• Oct 19th, YaJUG, Luxembourg (details)
   Java EE 6 + GlassFish, Alexis MP
• Oct 20th: eBig Java SIG, Oakland/CA (details)
   Java EE 6 = Less Code + More Power, Arun Gupta
New Events
• Dec 6-Dec 8: NYC - Marakana, (details)
   JSF 2.0 Training Course, Kito Mann
• Dec 13-Dec 17: NYC (details)
   Programming with Java and Java EE 6, Yakov Fain, Farata Systems

Tuesday Aug 24, 2010

GlassFish RESTful administration progress in 3.1

ALT DESCR

Complete administration, from web console to rich command line (asadmin) has always been a strong set of features in GlassFish and often a key differentiator versus other application servers.

Jason Lee takes you in his blog entry through the basics and the recent development of a more recent administration feature - the RESTful admin interface.

As the name implies this feature exposes administrative and monitoring resources to HTTP clients with responses served in XML, HTML or JSON formats. Pretty much anything you can do with the web console or asadmin, you can do with this interface - observe pool usage, create data sources, deploy applications, etc.

Jason explains how this is all being enhanced in the current development of version 3.1 with dynamic instrumentation using asm and how you can use the __debug HTTP header for pretty-printing. Keep an eye on Jason's blog for more advanced topics. Grab a recent promoted build and try for yourself!

Wednesday Dec 02, 2009

Jersey Improvements - Tracing and Google AppEngine Support

Jersey is the JAX-RS Reference Implementation but also is fully production quality component of GlassFish v3, and includes many features (Jersey@TA) to expand its usefulness.  Paul just reported on two recent additions:

• The Addition of Tracing - borrowing the concept from Stapler, Jersey now permits tracing mesages via a system property to help understand why requests are matched and dispatched.
• Adjustments to the implementation so Jersey can be Used with Google's AppEngine, despite the limitations in that container.

JAX-RS was one of the first JavaEE 6 specifications approved, with 1.0 approved back in September 2008 (see JCP Vote Table).  The version included in JavaEE 6 is a recent maintenance release, JAX-RS 1.1, and Jersey has benefited from all this burn-in time.  Enjoy!