Get GlassFish V2 Sun Support for GlassFish - Get GlassFish Portfolio
« Overview of Sun's... | Main | Blog Claiming with... »
Oct 06
20
Using Custom Annotations in JAX-WS 2.1 to support HTTP Session State
  Posted by pelegri in General

Duke for GlassFish V2

Annotations are a first-class language feature in Java (tutorial, jsr-175). A standard specification like JAX-WS introduces standard annotations but custom annotations can be equally useful. Kohsuke uses a custom annotation to take advantage of a SPI (InstanceResolver) in the JAX-WS RI in GlassFish. The result is that adding a simple annotation (@HttpSessionScope, in the com.sun.xml.ws.developer.servlet package) on a class tells the JAX-WS RI to create one instance of the class per each HTTP session.

Like any other non-standard mechanism, adding the annotation creates a dependency on a specific platform, but the dependency is explicitly declared (usually via an import statement), and the result is really clean an compact. Check Kohsuke's blog for details.

Comments:

Post a Comment:

Comments are closed for this entry.

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 metro mysql netbeans notd opends openesb openmq opensolaris opensource opensso osgi 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