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!

Friday Oct 23, 2009

WADL at W3C

ALT DESCR

WADL, the Web Services Description Language, (home@java.net, 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

ALT DESCR

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

ALT DESCR

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!)

ALT DESCR

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

ALT DESCR

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
@GET
@Produces("text/html")
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

ALT DESCR

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...

ALT DESCR

• 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

ALT DESCR

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

ALT DESCR

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

ALT DESCR

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.