Blogs by Community: Glassfish
Glassfish

This page is for introducing Grizzly-Thrift server/client modules and sharing various benchmarking results.
Object serialization/deserialization of Java comes expensive. For improving this lack, we sometimes used to use other frameworks for RPC such as Protobuf and Thrift which support various programming languages, RPC and own data structures.
Especilally, Thrift has already provided various...

This is the second blog entry on series of blogs about JAX-RS 2.0 Early Draft. Today I'd like to discuss the Generic Interface for building and submitting requests in the Client API. See last week's blog for an introduction to the Client API.

If you want to try out the absolute latest Mojarra 2.2-SNAPSHOT, you can run it on GlassFish 3.1 or GlassFish 3.1.1. To install it, grab the 2.2.0-SNAPSHOT version of Mojarra from this repository.

Recently there has been lot of requests in GlassFish community asking for programmatic interface to run asadmin commands from within a servlet. This is very easy when the servlet is deployed on Embedded GlassFish.
Prior to Servlet 3.0, a servlet may need to wait for a long operation to complete and can cause thread starvation in web container. In Servlet 3.0, asynchronous processing is introduced to handle this situation.
There is a lot of information about asynchronous processing in Servlet 3.0. In this blog, we will take a look at two aspects of startAsync.
When will javax.servlet.AsyncListener#...

Here is a quick tip on how to use the felix shell with Glassfish 3.x
Cross-site request forgery (CSRF)
is a malicious attack exploiting the trust of a site from a user's browser.
As an example, an user may be tricked to invoke a url to do a bank transaction
by either clicking on the url or accessing the url through <img>.
In GlassFish 3.1.1, there is a
CSRF prevention filter,
org.apache.catalina.filters.CsrfPreventionFilter,
which is based on Tomcat 7.
The...
In GlassFish, when no error page is specified for a given web application, a default error page will be displayed. In some use cases, it is desirable to turn off the default error page.
In this blog, we will summarize different ways to achieve this.
In a Virtual Server
One can turn off the default error page in a given virtual server by specifying a property with name errorReportValve and value...
Using MySQL database with GlassFish is nothing new. However I just wanted to share a small note on how I used MySQL DB from GlassFish which is embedded in my test. Life is much easier when I am able to run the test without having pre-installation of GlassFish/MySQL.

Glassfish V3.1 release and what is new in Security

I describe the hudson jobs for Mojarra and the automated tests run by those jobs.
GlassFish supports the preseving of HTTP session data across the redeployment of web application.
Prior to GlassFish 3.1, one can achieve this through the command line as follows:
asadmin redeploy --properties keepSessions=true --name ${APP_NAME} ${A_WAR}
In GlassFish 3.1, web sessions, Stateful Session EJB instances and persistently created EJB timers can be retained between...
Java User Groups
The second edition of Java Magazine (November/December) will go out in few days. In the Part 2 of the my article, you will see in detail how to use JSON to handle the response returned to the HTML5 client.
The first Part 1 of my article published in the first edition of Java Magazine (available here ) has shown how you can create and deploy quickly a Java EE application that uses RESTful Web services with NetBeans.
Java Enterprise

In the first blog entry of this series, we showed how to configure a message body reader (MBR) on an instance of Client. This blog entry will focus specifically on the topic of configuration in the JAX-RS 2.0 Client API.

A particular annoyance of JSF was the lack of proper file uploading, at least from my perspective. Read on for an easy solution!

Next week I will be presenting a free webinar about Java EE 6 and Glassfish 3.1.
The title can be translated to English as: "Java EE 6 and Glassfish 3.1: Simplicity + Ligthness = Productivity". The reason the title is in Portuguese is because this will be a webinar targeted at Brazilian Java EE and Glassfish users - as far as I know it will be the first webinar in Portuguese on these...
Java Web Services and XML

The Early Draft for JAX-RS 2.0 (JSR 339) has been submitted for publication. I plan to use this blog to highlight the features in the new spec, and in this entry I'll start with the most requested feature: the Client API. This API can be broadly divided into 4 areas: the fluent API, the generic interface, configuration and asynchronous support. In this blog entry we'll explore the fluent API.
JCP
It's been a few months already that the expert group of JSR 339 started discussion about the details of JAX-RS 2.0. The target defined by spec lead Oracle are clear: Java EE 7 shall have a RESTful API that augments current JAX-RS 1.1 API by (among others) a Client API, HATEOAS support and asynchronous invocations. So what's the current status?

JSON JSR(pre JCP filed draft)
As announced earlier, Oracle wants to include a Java API for JSON in the Java EE platform. I have circulated the Java API for JSON JSR draft internally in Oracle. If you have any feedback, let me know. I will also reach out to few people(who worked on Java implementations for JSON) to support this JSR. The planned scope for this API is:
Produce and consume JSON...






