By alexismp on Oct 21, 2011
Recent Tips and News on Java EE 6 & GlassFish:
One of the very well attended set of sessions and highly anticipated Java EE 7 technology is JAX-RS 2.0 (JSR 339), a specification that now has an early draft awaiting publication.
Co-spec lead Santiago Pericas-Geertsen has started a series of blogs on important features, starting with the Client API.
As expected, this defines a
Client class and a builder pattern for better readability. Make sure you read Santiago's piece to understand what Message Body Writers (or MBWs) are and how configurable this API is meant to be.
Recent Tips and News on Java EE 6 & GlassFish:
• Mobile App for JavaOne (JavaOne blog)
We now have a new release of the JAX-RS 1.1 reference implementation - Jersey 1.8 is just out!
Thisbug-fix release follows the EclipseLink 2.3 release from last week (as part of the Eclipse Indigo train release) and other components such as Woodstox 4.1.1 and Weld 1.1.1 which have already been released and integrated.
To get started with Jersey 1.8, begin here and don't forget to visit the Jersey Wiki pages. You can also grab a nightly build of GlassFish 3.1.1 or wait for the next promoted build (#10) due out in a few days.
As it currently stands for GlassFish 3.1.1, we have integration of the final bits for Metro 2.1.1 (currently at 2.1.1b7), Mojarra 2.1.3 (currently at 2.1.3b1), and MQ 4.5.1 (currently at 4.5.1b3) still ahead of us.
Jersey 1.7 was released a few days ago. You can read about it on Jakub's blog (Jakub is the new project lead on Jersey). This is a JAX-RS 1.1 implementation which, among other things, enhances its existing OAuth support (the topic of a popular hands-on lab last year at JavaOne).
If you're interested in trying out that part, check out the signature API and the latest
jersey-oauth.pom dependency which comes with a set of samples in the
oauth-tests module. I think you can expect more improvements and documentation in the near future.
Jakub, the new lead for the project, discusses what's new in this release including modularization, Grizzly 2.0 integration, updates to functional tests and code coverage using Cobertura.
Another key improvement is the OAuth (Wikipedia) client which builds on top of the Jersey client API and offers easy integration with services such as Twitter (illustrated in the Jersey samples).
Jakub's blog post has all the links for documentation, download, mailing list and issue tracker. Note that GlassFish 3.1 ships with Jersey 1.5 and that future plans for the project include the ability to run multiple simultaneous versions of Jersey in GlassFish as well as integration and optimizations for Oracle WebLogic Server.
With a good number of JavaEE 7 JSRs officially started after a successful EC vote, it's time to finalize expert groups and actually get to work! To do that, every JSR with Oracle as a spec lead (including the umbrella Java EE 7) will be driven in the open on java.net.
Being a project on java.net will have the USERS mailing lists serve as "reflectors" of the expert group lists and also allow list members to post among themselves. The issue tracker (now Jira-based), the wiki and the download area are also all available for each project to use as they see fit.
Here is the list of projects created so far :
• http://jax-rs-spec.java.net (JAX-RS 2.0)
• http://jpa-spec.java.net (JPA 2.1)
• http://jms-spec.java.net (JMS 2.0)
• http://javaee-spec.java.net (Java EE 7)
• http://jsf-spec.java.net (JSF 2.2)
• http://el-spec.java.net (EL 3.0)
• http://servlet-spec.java.net (Servlet 3.1)
As you can see the pattern is pretty easy to follow and should let you find your way to the other spec/projects not yet created such as EJB. To either view the archives or join the users list, you first need to become a java.net member if you are not one already. To become a project member simply click on "Bookmark This Project".
Over on "Earthly Powers", Martin Matula lays out the high-level plans for Jersey.next starting with the 1.6 release due real soon now. The team working on Jersey includes Jakub, Pavel, Jon, Roberto, Marek and Martin himself as development manager for the overall Jersey effort.
Speaking of upcoming Jersey 1.x releases, recent news include Jersey integration with the newly released Grizzly 2.0 as well as better integration with both GlassFish and WebLogic application servers with the ability to offer multiple Jersey versions running simultaneously within one container (one of my personal favorite). Jakub has details for other new cool stuff coming up.
There's been a flurry of JAX-RS and Jersey posts recently on the blogosphere. First, Andy Gibson walks you through the steps to create a RESTful resource available via GET's and POST's with some JPA in the mix and full code included.
Then, Gin-Lung Cheng offers another post decomposing the steps into : define the URLs, define the data representation, configure Jersey, create the JAX-RS resource classes and test them.
Celinio's post covers JAX-RS in Apache CXF, while Craig Ringer discusses how to use Jersey 1.5 extensions to handle file uploads. This involves using the jersey-multipart module and is discussed in the context of JSF 2.0.
Update: WebLogic's very own Steve Button also has a piece on Using JAX-RS with WebLogic Server 10.3.4 (using NetBeans). Check it out!
While we're on the JAX-RS and Jersey topic, Marek Potociar will be the new lead for Jersey and a co-spec lead on JAX-RS 2.0, effectively replacing Paul Sandoz who has decided to pursue another exciting opportunity. Thanks for everything Paul, you've really made a difference! Welcome Marek!
The formal work on Java EE 7 has started with the filing of two new JSRs :
This is a follow up to the "It's time to start talking about Java EE 7" entry from last month where themes for Java EE 7, JAX-RS 2.0 and JPA 2.1 were introduced with links to draft documents and conference presentations. Arun also has more details.
Both spec leads Linda DeMichiel (JPA) and Paul Sandoz (a co spec lead on JAX-RS with Roberto Chinnici) have been sharing their thoughts with the community in the past few months at conferences, on mailing lists and blogs. You can now read the JSR proposals and even join the expert group if you feel you have the time and expertise (link to application form is on the respective JSR page).
For a broader view of what Java EE 7 is trying to achieve and its timeline, I'd recommend listening to this recent discussion with Roberto Chinnici.
Recent Tips and News on Java EE 6 & GlassFish:
An Eclipse / GlassFish / Java EE 6 Tutorial
Converged Applications and SailFin
JavaEE 6 and Spring 3.0
Java EE 6 & GlassFish @ JAX London & London JUG Trip Report
New Books Covering GlassFish
Install and Run Apache Roller 4.01 on GlassFish and OpenSolaris
Dave Koelmeyer has posted Detailed Instructions on how to install Apache Roller 4.01 on GlassFish v2.1 using MySQL 5.1 for storage. He uses OpenSolaris snv_134, the subject of a tea-leaf-reading thread.
Slides and Code Samples on Jersey and JAX-RS
The Slides and code from Paul Sandoz's presentation at Presentation at AlpesJug on Jersey, JAX-RS and Atmosphere are now now available. The actual presentation was in French, but the slides are in English, and the code is... code.
Invoke OSGi Service from JAX-WS Endpoint
Arun has published yet another TOTD (Tip Of The Day), with complete instructions and code. This one is TOTD #130: Invoking a OSGi service from a JAX-WS Endpoint. Arun's approach is to document the demos he gives at his presentations through the TOTDs. Quite a bit of work, but it makes the content useful to a world-wide audience.
WAS V7 - Inching Towards JavaEE 6
IBM has recently been using a "Feature Pack" approach in upgrading its WebSphere AppServer; it seems to work pretty well for them and they released two packs for WAS V7: Feature Pack for OSGi and JPA 2.0 and Feature Pack for SCA. IBM is, of course, one of the Java Licensees; WAS v7 is one of the JavaEE 5 Compatible App Servers, the feature pack aproach helps it move towards the JavaEE 6 list.
VirtualBox at Oracle
One of the challenges during Hands-On-Labs is setting up: the attendees usually bring their own laptops but each of them is different and requires slighlty different setup. Asking for prep work before attending is not always successful. A solution now being used in some DB HOLs at Oracle is to Use VirtualBox. Which is the same approach that both Arun and Alexis had advocated for a new series of GlassFish HOLs being planned.
Masoud has a detailed post - actually a book chapter - that you should read to Learn the GlassFish v3 Command Line Administration Interface (CLI)
This year's JavaOne is the first under Oracle and will coincide with Oracle OpenWorld. Some things will be different, but others are mostly the same - including how the content is being selected - see Sharat Chander's interview by Tori Wieldt for some answers; others will evolve as we get closer to the event.
Java EE 6 adoption and overall momentum is still going strong. In the past few days there's been a InfoQ piece on how compelling EJB 3.1 are, a blog post by the Caucho folks around the Java EE 6 Web Profile which they intend to support soon in their Resin product, while Mert has a detailed step-by-step "Getting Started with Java EE 6" document featuring a demo application focusing on JSF (using PrimeFaces), CDI, among other things.
Meanwhile on the JAX-RS/Jersey side of the house, Dustin has been busy writing blog posts with the latest one about "Jersey/JAX-RS Method Designators" illustrating the importance of clean error handling. Going beyond the specification, there's also been a lot of community discussion about potential hypermedia and HATEOAS (Hypermedia as the Engine of Application State) support with exploratory work by Santiago. This page is a good place to start reading about this.
On the GlassFish side, one of the new features in v3 has been to extend the ability to create a platform service to the Windows OS. Byron has this additional blog entry on "Making GlassFish v3 Platform Services Survive Logoff". While on the GlassFish v2.x side of things, Byron also discusses offline configuration at a cluster level.