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


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

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


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!

Friday Oct 23, 2009



WADL, the Web Services Description Language, (, WADL@TA) is now a W3C Member Submission. WADL is a clean way to describe RESTful Web Services and is supported by Jersey (and thus by GlassFish v3) and other tools like Zembly (announcement, wiki).

Congratulations, Marc!

Wednesday Aug 19, 2009

Updated GlassFish v3 REST interface

Browser-based REST management of GlassFish

This is yet another update on the work going on in GlassFish v3 to provide a REST interface for management and monitoring. This time, Rajeshwar announces the availability of HTML rendering. This makes for a nice and simple interface for navigating through the rich set of monitoring data as well as for reading and modifying the GlassFish configuration, including deploying applications. Previous entries introduce the feature and cover the role played by Jersey.

If you want to try it for yourself, make sure you use a recent GlassFish v3 build (see Rajeshwar's entry or wait for promoted build 60) enable monitoring (set the appropriate sub-system level to LOW or HIGH). Also of interest is Ludo's recent and short presentation from Jazoon which introduces the REST interface feature and shows how to use a JavaFX client to use it (includes a demo too).

For the Mac OS users out there, this does not work in Safari because Safari prefers XML over HTML. So use Firefox instead. Of course you still have the option of using either cURL or wget which I'd argue makes GlassFish quite cloud-friendly (no ssh required).

Friday Aug 07, 2009

Using REST Interface to Configure GFv3


Rajeshwar has written a short description on how to use the GlassFish v3 REST Interface to Configure GlassFish; this complements his previous entry REST and Monitoring and, like that one, it also has examples using a Jersey-based client - included in the post.

Related entries are tagged REST+GlassFish+v3.

PS. Picture at left shows the anterior eyes of a Jumping Spider.

Friday Jul 17, 2009

Monitoring GlassFish v3 using its REST Interface


GlassFish v3 has a REST/HTTP interface that is implemented using Jersey. The interface is used by the GUI admin console but can also be used by other clients; for example, the data can be exported as JSON, XML or HTML and the REST + JSON combination makes JavaScript clients very easy to write.

Check out Rajeshwar's recent writeup to learn how to Use the REST interface Monitoring.

Wednesday Jul 15, 2009

Jersey 1.1.1 EA - Now Available (getting closer to GFv3!)


Paul has announced the availability of Jersey 1.1.1 EA, based on the draft for JAX-RS 1.1 (see JAX-RS 1.0 spec and Changelog). To learn more about Jersey you can see the Getting Started Document and the Jersey User's Guide, check out Paul and Marc's Webinar, or browse through previous entries.

Jersey is also collaborating with JFA's Atmosphere framework, and, since Paul is a fan of Scala, also supports Lift. Overall, very good movement towards GFv3. More details at Paul's announcement.

Saturday May 23, 2009

atmosphere-core now building on top of Jersey


Since we announced the Atmosphere project (and it's Comet Portable Runtime), Jean-Francois has been making steady progress. In his latest blog post he discusses how the new atmosphere-core now builds on top of Jersey.

Jean-Francois details the combined use of JAX-RS and Atmosphere annotations and offers complete source code to his chat demo. If you're in a hurry, here's a small code snippet :

@Suspend // the returned String will be written and then response suspended
public String cometGet() { ... }

It's always nice to see collaboration between different open source projects (Grizzly has long been a recommended way to deploy Jersey resources), even if these two projects happen to be under the GlassFish umbrella. Both Jean-Francois and Paul Sandoz (Jersey lead) will be discussing future developments at the JavaOne Atmosphere BOF on Tuesday @ 8h30pm.

Friday Apr 17, 2009

Using Spring with Jersey


Paul has published a very detailed Enterprise Tip showing how to use Jersey, the JAX-RS implementation used in GlassFish, together with Spring, the framework for building and running enterprise Java applications. The integration relies on Integration Features that are currently available in the stable versions of Jersey.

Paul's note explains in full detail how to take a basic Web Application written with Jersey so it leverages Spring. Check it out!.

Sunday Apr 12, 2009

REST, Twitter, BlackBerries and More - Catching Up with Mobility Platform 1.1

The GlassFish Mobility Platform 1.1 was announced ([1], [2]) at the same time as the GlassFish Portolio, although it is not formally part of the Portfolio. That week I hosted a couple of Webinars; you can check the archive pages for the Short and Long webinars.

The core of the functionality in GF MP 1.1 remains the SyncML engine and the adaptors but this release adds support for JAX-RS-based connectors (via Jersey) and JerseyMe, a JAX-RS client library for CLDC. Other additions include BlackBerry support and a new SalesForce sample that uses the JAX-RS connectors.

The team has been aggregating news on these features using the new Mobility Blog; doing a quick pass to catch up...


• Rebecca explains how to use the new JAX-RS Connector in a SalesForce example: [1], [2] and [3].
• Two short screencasts by Santiago showing how to Develop and Deploy JAX-RS Connectors.
• Hans explains how to Provision BlackBerry clients.
• A couple of screencasts by Ryan: SalesForce Example and Case Management System.
• Rajiv Konkimalla shows how to Synchronize Twitter Data.
• Joe Wang explains how to Develop a Client Application using LWUIT and a BlackBerry.

Saturday Apr 04, 2009

EJB 3.1 and Jersey - A Great Partnership


One of the challenges in spec development is how to best leverage other specs that are being developed simultaneously, within the real-life constraints of schedules, resources, time-zones, etc. This is another situation where transparency and open-source is helping significantly - plus the usual hard work of the EGs.

A case in point is EJB 3.1 and JAX-RS 1.1 where the EGs have been working to allow the use of POJO sesion beans as resource (root) or provider classes in Jersey, deployed as a plain WAR. This allows very natural Java programming, things like this root class

@Stateless @Path("ssb") public class StatelessSessionRootResource { @Context private UriInfo ui; @GET public String get() { return "GET: " + ui.getRequestUri().toASCIIString(); } }

Check out full details in Paul's Glassfish v3, EJB 3.1 and Jersey and in Ken's JAX-RS and EJB.

EJB3.1 and JAX-RS are two of the new JavaEE6 features you will be able to try GFv3 in EA by JavaOne - see you there! And the photo? Another great partnership, this one in Mixed Doubles in Badminton: Kim Dong-moon and Ra Kyung-min :-)

Wednesday Mar 18, 2009

Hello Cloud! The Announcement and the Example


Today, at CommunityOne East, Sun unveiled more details of its Cloud initiative: A world of many clouds, both public and private, that are open and compatible.

The initiative enables the definition and deployment of Virtual Data Centers, leveraging q-Layer, xVM and VirtualBox and components like OpenSolaris, MySQL, GlassFish and Web Stack.

For more details, check Cloud@Sun, the Launch Event and this Overview. I also enjoyed reading/watching about the SuperNat center and TheRegister ran an Overview White Paper.

Also check the personal perspectives from Craig and Tim, who were directly involved in defining the RESTful API for manipulating the cloud. The APIS are under Creative Commons license (see Opening APIs) and are available at Kenai, see API home and Hello Cloud project.

Saturday Mar 14, 2009

Towards REST and SOAP in Java EE 6 - JAX-RS 1.1 and JAX-WS 2.2


Progress on both sets of Web Services specifications for JavaEE 6...

On the RESTful side, Marc reports on a new specification draft. As usual, the JSR311 Website has full details including the Editors Draft and a Changelog. Marc points out there is still work pending in the integration with Servlet 3.0, EJB 3.1 and JSR 299.

On the SOAP side, Rama announces a new implementation of the latest JAX-WS 2.2 Draft.

Saturday Feb 28, 2009

New Jersey Release - 1.0.2 Now Available


A quick update on Jersey (the REST implementation in GlassFish) to complement yesterday's note on Metro, the SOAP stack.

Jersey 1.0.2 was released on Feb 12th. The release is still based on JAX-RS 1.0, has many bug fixes and new functionality including improved JSON support, resource-specific filters, Apache Abdera support, implicit produces and servlet as a filter. Check Paul's writeup for more details, and the team is already working on Jersey 1.0.3 - see Roadmap.

On a related topic, check Jakub's article on Consuming RESTful Web Services With the Jersey Client API. Finally, JAX-RS is also being used in the GlassFish Mobility Platform; spotlight still to be posted.