Tag Archives: Jersey

Jersey 2.0-m06 has been released

Here in Prague, July and August are the main “vacation” months of the year. With that in mind we decided to plan for a longer Jersey sprint run. So after a time little bit longer than usual I am happy to announce that another Jersey 2.0-m06 milestone has been just released.

As part of the release, several important changes are part of Jersey 2.0-m06 release. Let’s briefly look at them in more detail.

  • Switch to HK2 v2.1.x from v2.0.x. While this minor version update does not look significant at the first glance, it’s actually one of the most significant changes in Jersey 2.0 yet. The new HK2 2.1.x API brings a complete redesign and rewrite of the injection runtime and comes with a full support for JSR 330 Dependency Injection that replaces the old proprietary HK2 injection API. As such, Jersey now naturally supports injection using standard DI API from javax.inject package. Not bad for a minor version update, right?
  • Improved support for JAX-RS 2.0 filters and interceptors. In this release we added support for post-matching name-bound filters and interceptors. With that change we were able to move on and convert more of the existing Jersey 1.x features to the new JAX-RS 2.0 API (message encoders/decoders, authorization filters, etc.).
  • Suport for singleton resources. This is another feature that was available in Jersey 1.x already. This time we are however ditching the proprietary Jersey @Singleton annotation in favor of a standard @javax.inject.Singleton (thanks to the new HK2 implementation).
  • Added modules for MOXy support. This is another major improvement that gives Jersey users ability to use advanced MOXy data binding constructs in beans that can be marshalled using both XML and JSON media types.
  • Other improvements and bug fixes. Among other things we’ve revised and simplified API around Jersey Client instance creation, redesigned modules for JSON support, made improvements to our SSE support API.

If you are interested in more details, the list of all the resolved feature requests, tasks and issues in the Jersey 2.0-m06 sprint can be browsed in our Jersey Jira.

For a complete overview of the updates in the Jersey API, please have a look at the Jersey 2.0-m06 API documentation. Note that we are still in the middle of a development cycle and Jersey 2.0-m06 is an early development preview release so you can still expect significant changes in the API since the parts of the API are moving every now and then. You may want to also bookmark the Jersey 2.0 snapshot API documentation link to if you want to see the latest development version of the API. Also feel free to browse Jersey 2 source code and check out the examples that leverage JAX-RS 2.0 Client API as well as Jersey 2 server-side programmatic API.

In this sprint we also continued work on an updated user guide that also contains an initial draft of a migration guide for your Jersey 1.x code. Again, as with API documentation, you may want to bookmark the Jersey 2.0 snapshot user guide to see the very latest updates to the guide.

The third early draft of JAX-RS 2.0 specification that is implemented by this Jersey milestone release is available at the JCP web site. The latest version of JAX-RS 2.0 API documentation is also available for browsing here. This link and more information about the JAX-RS project can be found on the JAX-RS project web site.

For some time already, Jersey is available on github as a first-class citizen. So if you prefer accessing the code over github to accessing it over java.net, check it out.

Jersey 2.0 provides support for Java SE HTTP Server, Grizzly 2 HTTP server, Servlet 2.5 or higher containers as well as OSGi containers on the server side and HTTPURLConnection-based or Grizzly asynchronous client transport connectors. To leverage JAX-RS/Jersey server-side async features in the servlet container, you need a container that supports Servlet 3.0 at least. Jersey supports asynchronous resource invocations on Grizzly 2 HTTP server too.

All the 2.0-m06 milestone binaries, including the source & apidocs jars, are available for download under the Jersey 2.0 maven root group identifier org.glassfish.jersey from the central maven repository as well as from the java.net maven repository.

To run Jersey 2 you’ll need the core artifacts:

org.glassfish.jersey.core:jersey-common
org.glassfish.jersey.core:jersey-server
org.glassfish.jersey.core:jersey-client

Additionally, you’ll need a Jersey container implementation, e.g. Jersey Grizzly2 HTTP container:

org.glassfish.jersey.containers:jersey-container-grizzly2-http

Chances are you are using maven on your project. If you do, there is a very easy and convenient way to start playing with Jersey 2.0 by generating the skeleton application from one of the Jersey 2.0 maven archetypes that we provide. For instance, to create a Jersey 2.0 application using the Grizzly 2 HTTP server container, use

mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes -DarchetypeArtifactId=jersey-quickstart-grizzly2 -DarchetypeVersion=2.0-m06

If you want to create a Servlet container deployable Jersey 2.0 web application instead, use

mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes -DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.0-m06

Have fun looking around, running examples, testing new additions to the set of features and playing with Jersey 2. To provide feedback send us an email to our users mailing list

users@jersey.java.net (archived here)

or log discovered bugs & new feature requests in Jersey Jira issue tracker.

 

Jersey 2.0-m05 has been released

Yesterday, the Jersey team has released Jersey 2.0-m05. The theme of the scrum sprint was to integrate Jersey 2.0 into the development trunk of GlassFish and switch core Jersey code to the latest JAX-RS API which contains significant changes in message filtering API. I am happy to report that we succeeded in delivering both main goals.

The new Jersey 2.0 code has replaced the old Jersey 1.x in GlassFish development branch, thanks to Jakub (currently the integrated Jersey version is 2.0-m04-2 and we are working on integrating the recently released 2.0-m05 momentarily). Since the Jersey 2.0 is based on a completely new codebase and internal APIs, the switch of Jersey versions in GlassFish was not an easy task at all.

The other goal to switch to the latest JAX-RS API 2.0-m09 which contains significant API changes compared to the formerly used 2.0-m05 milestone version was similarly demanding, with great support from all Jersey team members, including our manager (yes, our manager CAN code! :-)), we made it and the new core infrastructure design, robustness and stability was further improved.

If you are interested in more details, the list of all the resolved feature requests, tasks and issues in the Jersey 2.0-m05 sprint can be browsed in our Jersey Jira.

For a complete overview of the updates in the Jersey API, please have a look at the Jersey 2.0-m05 API documentation. Note that we are still in the middle of a development cycle and Jersey 2.0-m05 is an early development preview release so you can still expect significant changes in the API since the parts of the API are moving every now and then. You may want to also bookmark the Jersey 2.0 snapshot API documentation link to if you want to see the latest development version of the API. Also feel free to browse Jersey 2 source code and check out the examples that leverage JAX-RS 2.0 Client API as well as Jersey 2 server-side programmatic API.

In this sprint we also continued work on an updated user guide that also contains an initial draft of a migration guide for your Jersey 1.x code. Again, as with API documentation, you may want to bookmark the Jersey 2.0 snapshot user guide to see the very latest updates to the guide.

The third early draft of JAX-RS 2.0 specification is available at the JCP web site. The latest version of JAX-RS 2.0 API documentation is also available for browsing here. This link and more information about the JAX-RS project can be found on the JAX-RS project web site.

Another important news from the last sprint is that Jersey is now available on github as a first-class citizen. So if you prefer accessing the code over github to accessing it over java.net, check it out. As I said, Jersey is now finally a first-class github citizen, which means that we have also setup the necessary automatic build and verification infrastructure to be able to accept any github pull request from the community. (A funny thing – the first fork of the Jersey repository on github came from a RedHat guy :-P)

Jersey 2.0 provides support for Java SE HTTP Server, Grizzly 2 HTTP server, Servlet 2.5 or higher containers as well as OSGi containers on the server side and HTTPURLConnection-based or Grizzly asynchronous client transport connectors. To leverage JAX-RS/Jersey server-side async features in the servlet container, you need a container that supports Servlet 3.0 at least. Jersey supports asynchronous resource invocations on Grizzly 2 HTTP server too.

All the 2.0-m05 milestone binaries, including the source & apidocs jars, are available for download under the Jersey 2.0 maven root group identifier org.glassfish.jersey from the central maven repository as well as from the java.net maven repository.

To run Jersey 2 you’ll need the core artifacts:

org.glassfish.jersey.core:jersey-common
org.glassfish.jersey.core:jersey-server
org.glassfish.jersey.core:jersey-client

Additionally, you’ll need a Jersey container implementation, e.g. Jersey Grizzly2 HTTP container:

org.glassfish.jersey.containers:jersey-container-grizzly2-http

Chances are you are using maven on your project. If you do, there is a very easy and convenient way to start playing with Jersey 2.0 by generating the skeleton application from one of the Jersey 2.0 maven archetypes that we provide. For instance, to create a Jersey 2.0 application using the Grizzly 2 HTTP server container, use

mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes -DarchetypeArtifactId=jersey-quickstart-grizzly2 -DarchetypeVersion=2.0-m05

If you want to create a Servlet container deployable Jersey 2.0 web application instead, use

mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes -DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.0-m05

Have fun looking around, running examples, testing new additions to the set of features and playing with Jersey 2. To provide feedback send us an email to our users mailing list

users@jersey.java.net (archived here)

or log discovered bugs & new feature requests in Jersey Jira issue tracker.

 

Jersey 2.0-m04 has been released

As some of you have already noticed, we have released Jersey 2.0-m04 a couple of days ago.

The list of all the resolved feature requests, tasks and issues in the Jersey 2.0-m04 sprint can be browsed in our Jersey Jira. In summary, the new milestone adds

  • Revamped programmatic resource modeling API (see the Resource class javadoc for some initial examples or look at the samples and tests for more)
  • Support for JAX-RS 2.0 Interceptors
  • Programmatic server-side API for sending chunked responses
  • Client and server API for SSE (Server Sent Events) processing
  • Introduced Grizzly asynchronous client transport (in addition to the default one that is based on the HttpURLConnection from Java SE).
  • Improved support for running Jersey in an OSGi containers
  • Ported several other Jersey 1.x features
    • Extension – media type mapping filter
    • HTTPS and Basic authentication support on the client-side
    • Cross-site request forgery protection filters
    • Multipart message processing support
  • Bunch of bug fixes and performance improvements

For a complete overview of the new Jersey API, please have a look at the Jersey 2.0-m04 API documentation. Note that this is an early development preview release and the parts of the API are moving frequently so you can still expect significant changes in the API. The most significant change in this release is the refactored programmatic API where we made sure we support the full set of features available via JAX-RS annotations and we even went further that that. You may want to also bookmark the Jersey 2.0 snapshot API documentation link to if you want to see the latest development version of the API. Also feel free to browse Jersey 2 source code and check out the examples that leverage JAX-RS 2.0 Client API as well as Jersey 2 server-side programmatic API.

In this sprint we also started work on an updated user guide that also contains an initial draft of a migration guide for your Jersey 1.x code. Again, as with API documentation, you may want to bookmark the Jersey 2.0 snapshot user guide to see the very latest updates to the guide.

The second early draft of JAX-RS 2.0 specification is available at the JCP web site. The latest version of JAX-RS 2.0 API documentation is also available for browsing here. This link and more information about the JAX-RS project can be found on the JAX-RS project web site.

As mentioned in the feature summary above, appart from support for Java SE HTTP Server, Grizzly 2 HTTP server and Servlet containers on the server side and HTTPURLConnection-based client transport connectors, the current milestone release adds improved support for OSGi containers and new Grizzly asynchronous client transport connector. All the 2.0-m04 milestone binaries, including the source & apidocs jars, are available for download under the Jersey 2.0 maven root group identifier org.glassfish.jersey from the central maven repository as well as from the java.net maven repository.

To run Jersey 2 you’ll need the core artifacts:

org.glassfish.jersey.core:jersey-common
org.glassfish.jersey.core:jersey-server
org.glassfish.jersey.core:jersey-client

Additionally, you’ll need a Jersey container implementation, e.g. Jersey Grizzly2 HTTP container:

org.glassfish.jersey.containers:jersey-container-grizzly2-http

Have fun looking around, running examples, testing new additions to the set of features and playing with Jersey 2. To provide feedback send us an email to our users mailing list

users@jersey.java.net (archived here)

or log discovered bugs & new feature requests in Jersey Jira issue tracker.