users@jsr311.java.net

implementing "OPTIONS *"

From: Reto Bachmann-Gmuer <reto.bachmann_at_trialox.org>
Date: Fri, 29 Jan 2010 13:10:34 +0100

Hello

I was wondering bout what the recommended way to implement OPTIONS *
requests.

What comes to mind:

   - looking at the Http-Method annotations of all registered root
   resources. Problem: Methods only supported by sub resources are not found
   - scanning the classpath for Http-Method annotations types. Problem: Can
   be hard depending on classpath settings (OSGi). Having them in the classpath
   doesn't mean they're actually used somewhere (but having OPTIONS * returning
   to many methods is the lesser problem).


Cheers,
reto