Java EE 7 Launch Webcast: Jun 12th, Register Now

| May 19, 2013

The Java EE 7 Platform JSR was approved a few days ago and is ready to be released ...ta da!

Want to learn the latest and the greatest improvements in the platform from the best ?

Mark the date for webinars in two different time zones:

Jun 12, 2013, 9am PT

WebSocket Client and Server Endpoint: Annotated and Programmatic (TOTD #212)

| Apr 4, 2013

JSR 356 defines Java API for WebSocket 1.0. It defines a standard-based programming model for creating WebSocket client and server endpoint. Both kind of endpoints can be created programmatically or using annotations. This Tip Of The Day (TOTD) provide short snippets of how to write (more...)

Introducing Kids to Java Programming Using Minecraft

| Mar 22, 2013

Minecraft is a wildly popular game among elementary and middle schoolers. The game allows players to build constructions of textured cubes in a 3D world.

My son has been playing the game for about a year, lets say addicted to it. Last Fall he told me that the game is (more...)

Chunked Step using Batch Applications in Java EE 7: Getting Started with GlassFish 4 (TOTD #211)

TOTD #192 explained the key concepts of JSR 352. This Tip Of The Day provides a working example of a how to write a simple chunk step using JSR 352 Reference Implementation integrated in GlassFish 4.

The source code for this sample application can be downloaded from here and works on GlassFish 4 b78.

As explained in TOTD #192, JSR 352 defines item-oriented processing using chunk step and task-oriented processing using batchlet step. A chunk consists of a reader that reads one item at a time, a processor that processes one item at a time, (more...)

Consuming and Producing JSON using JAX-RS Entity Providers and JSR 353 Streaming API (TOTD# 210)

TOTD #193 explained how JAX-RS Entity Providers can be used to provide mapping between on-the-wire representations and their associated Java types. This blog shows how you can use Java API for JSON Processing (JSR 353), already integrated in GlassFish 4 promoted builds, to produce and consume JSON payload using Entity Providers.

The source code in this blog can be downloaded here and runs on GlassFish b76.

Lets say your domain object is defined as:

public class MyObject {

  private String name;
  private int age;

  //. . .

And your resource endpoint is defined as:

public class (more...)