Get GlassFish V2 Sun Support for GlassFish - Get GlassFish Portfolio
Oct 08
28
... JSON with Jersey, JSF with NB and GMaps, Comet, GF ESB and Fuji M2, Andy, iPhone and Oprah
  Posted by pelegri in NOTD

A compilation of today's news of interest:

Radio Receiver Icon

Jakub has published a new Enterprise Tip on Jersey showing how to Configure JSON for RESTful Web Services in Jersey 1.0. Jersey is the production-quality, reference implementation of JAX-RS, the JCP standard for RESTful Web Services. JAX-RS is part of Java EE 6, but it can also be used separately. Jersey is part of GFv3 Prelude.

On JSF - first the NetBeans team shows how to Start Developing JSF Applications with the new NetBeans releases, including the forthcoming NB 6.5. Then Arun shows how to use JSF and Google Maps using Gmaps4JSF, Facelets and Mojarra on GlassFish v3 Prelude.

Comet and Atmosphere - JFA recently presented on Atmosphere - his new portable Comet framework - at the Silicon Valley JUG. The slides are Now Available.

GlassFish ESB is getting very close to its first Release Candidate (and GA/FCS release) (Milestone 2 Download) but I just noticed I had not spotlighted Mike's excellent Screencast on GlassFish ESB. Check it out and notice it is a multi-parter - very well done.

While we await GF ESB v2, we are already working on the next generation, which is based on Project Fuji. Fuji Milestone 2 released last week, and here are two additional posts: Nikki on Interceptors in Fuji and Derek on the Proxy bundle.

Andy B is adjusting his time involvement at Sun so he can spend more time with Arista Networks, "one of his startup companies" that is focused on the 10 Gigabit Ethernet switching business. The Original NYTimes Article was followed by a Clarification.

And today's toys includes Google Earth on iPhone, and Oprah endorses Kindle. Of the two, I think Oprah's endorsement will have the largest impact - is the time for the electronic reader finally here?

NB. I am a few days behind in reporting news; I'll try to catch up in the next day or two.

Feb 08
28
Better JSON in Jersey, jMaki included
  Posted by pelegri in Web.Next

ALT DESCR

JSON (JSON@TA) is a key component in Ajax and a REST framework like Jersey needs to support it well to be successful. Jakub reports on a new simpler default JSON data format in the latest Jersey; check his Description of Features and then see its use in jMaki Widgets.

Check it out and let Jakub, Paul and Marc know how it works for you.

Jersey's latest release is 0.6ea and is available from the Jersey Downloads Page. The latest stable release is 0.5ea and is also available through the Update Center. Jersey 0.6ea will be pushed to the UC in about 10 days.

Oct 07
7
How to consume Jersey resource representations in jMaki ?
  Posted by arungupta in Web.Next

Informational Sign

A tip on jMaki and Jersey working together:

How to consume JSON and XML representations generated by Jersey in jMaki ?

Sep 07
15
Arun's TOTD Series - Tips on Metro, jMaki and more...
  Posted by pelegri in Web.Next

Headshot of Arun

Arun has started a TOTD (Tip of the Day) Series covering jRuby, jMaki, Metro, GlassFish and more. The entries are usually very detailed and focused on specific tasks.

You can get the whole stream as an RSS Feed. The last 5 entries are:

Using JDBC connection pool/JNDI name from GlassFish in Rails Application,
Generating JSON using JAXB and Jersey
Switch between jRuby and cRuby in NetBeans
Difference betwen Ruby Gems and Plugins
Loading Data from Beans in jMaki Widgets

We will try to give you heads-up of new additions via quick Tips.

Sep 07
4
JSR 311 vs. Jersey vs. SWDP vs. GlassFish vs. NetBeans
  Posted by alexismp in Web.Next

Island of Jersey

If you're new to JAX-RS (JSR 311) and RESTful Web Service with Java, wondering how it impacts you as a developer, you should read this introduction to the various Sun efforts in that space.

If you're tracking the progress of Jersey, the JAX-RS Reference Implementation, you'll probably interested to hear that version 0.2.1 has been released today with a documented list of required JAR dependencies, illustrated in this demo showing how JAXB beans can be serialized as JSON or XML depending on the Accept HTTP header).

At this point, installing in GlassFish is fairly easy with a jersey-on-glassfish.xml ANT script. It'll get even easier once Jersey is made available on the GlassFish Update Center. Any day now I hear ;)

Aug 07
7
JSON Encoding - Now in Jersey too
  Posted by arungupta in GlassFish

Encoder

Paul added support for pluggable type system in Jersey. All the supported types need to implement the EntityProvider interface and are registered in the META-INF/services file javax.ws.rs.ext.EntityProvider. Jakub used that system to add support for JSON encoding. Jersey is the GlassFish project that is implementing JAX-RS

The JSON binding in JAX-RS enables to use application/json as the MIME type and specify JSONArray, JSONObject as method parameters and return type. The JSON binding in JAX-RS enables to write code like the following:

@UriTemplate("/rates")
public class ExchangeRates {
    @ProduceMime("application/json")
    @UriTemplate("CZK")
    public JSONObject getRates() {
        try {
            return new JSONObject()
            .put("USD", 20.04);
        } catch (JSONException ex) {
            throw new WebApplicationException(ex);
        }
    }
}

JAX-WS takes advantage of a similar pluggable encoding layer in their implementation to provide a JSON binding.

Apr 07
28
Improved JSON Support
  Posted by pelegri in GlassFish

More improvements to the JSON support in GlassFish. Kohsuke reports on progress in the client-side programming model, including a new, JavaScript-centric tool in the spirit of wsimport).

The JavaScript client can then just include the proxy script and then asynchronously invoke the WS service as follows:

<script src="path/to/endpoint?js"></script> myService.get( {id:5}, function(r) { alert("ID="+r.id); alert("title="+r.title); } );

Screenshot of generated documentation

The JSON extension exploits the Schema analysis machinery in JAX-WS which means that it can generate nice JavaScript and can also do things like generating very nice looking documentation automatically - as shown (somewhat washed out) at left.

JSON support is in the "and more..." portion of Kohsuke and Jitu's presentation at JavaOne: TS-4948 "Unleashing the Power of JAX-WS RI: Spring, Stateful Web Services, SMTP, and More... :-). At least Kohsuke, and probably also Jitu, will also be present at GlassFish Day - register for free here.

Apr 07
13
Support for JSON in JAX-WS at GlassFish
  Posted by pelegri in GlassFish

Jason bringing Pelias the Golden Fleece

The JAX-WS project in GlassFish is taking advantage of the pluggable encoding layer in their implementation to provide a JSON binding.

This Implementation is at an early stage and is part of the JAX-WS-commons extensions which also includes such committed extensions as: Spring Support, HTTP Session Scope Service, Thread Scope Service and the JAX-WS Maven 2 plugin.

The JSON binding enables to write code like the following:

@BindingType(JSONBindingID.JSON_BINDING) public class MyService { public Book get() { return new Book(); } public static final class Book { public int id = 1; public String title = "Java"; } }

Mar 07
9
Combining Roller, JSON and jMaki
  Posted by pelegri in GlassFish

jMashing up!

It all started with Dave "Roller" Johnson writing about Roller generating JSON. Alexis picked it up in his jMakifying Roller entry and short video. Some limitations found in this quick hack were addressed in this follow-up entry and in the jMaki day presentations. Neat!!

In another example combining JSON and jMaki Jennifer show how to load a table from JSON. Don't miss the comments for the entry, they are also useful.

In many case XML is still a no-brainer, but the increased adoption of JavaScript on the client makes JSON an interesting lingua franca for web apps. And, in cases where JavaScript is also used on the server-side (e.g. Phobos) JSON seems the most natural format for structured data exchange.

Oct 06
20
JSON for Ajax Web services
  Posted by qouyang in Web.Next

Via TheGalaxy, Daniel Rubio's recent article talks about the advantages of JavaScript Object Notation (JSON), and how JSON as an approach has recently gained popularity with Ajax services and Web-based clients. In this entry on TheServerSide, a discussion is open on Daniel's article. "What benefits have you been experiencing while using JSON? Do you agree that its recent boost in popularity has been due to Ajax?"


Languages

Event Calendar

Search

The Aquarium TV

Adoption Stories

GlassFish Podcast

Popular Tags

adoption ajax clustering comet community frontpage glassfish grizzly hudson java javaee javaee6 javaone jax-rs jax-ws jaxb jboss jcp jersey jmaki jruby jsf liferay metro mysql netbeans notd opends openesb openmq opensolaris opensource opensso performance portal rails rest ruby sailfin scripting sip stories sun tools updatecenter v2 v3 webinar webservices weekly

Downloads

Companion Sites

Related Links

Useful Pointers

Offers and Promos

... AT TWITTER

OTHER SHORT NEWS

Recent Entries

News by Mail

Contact Us

Send feedback and leads to theaquarium@sun.com

QR Codes


Navigation