[jax-rs-spec users] [jsr339-experts] Feature on server side

From: Bill Burke <>
Date: Mon, 20 Aug 2012 12:22:13 -0400

Feature on the server side is a cool idea and glad it is in the spec.

One thing I'd love to be able to do is to have built-in features that
are scanned, registered and then only triggered by config properites.
For one, would it be cool to back the Configurable's properties with the
Servlet Context?



So, if Configurable's properties are backed by the ServletContex, my
cache Feature class can check to see if the context param is set before
it enables the specific feature. Also, the cache Feature has an easy
way of obtaining configuration data. Following me?

Another thing that would be cool is to allow Configurable to be @Context
injectable into an Application class? Then the Application class could
be used to initialize things for Features that can't be done in
text-based configuration. i.e.

public class SecureApplication {

   public CacheApplication(@Context Configurable config) {
       KeyStore keyStore = ...;
       config.setProperty("", keyStore);


Bill Burke
JBoss, a division of Red Hat