[Jersey] Re: Registering a REST Resource after engine is started

From: Alexandre Borgoltz <>
Date: Thu, 7 Apr 2011 09:46:30 +0200

Apologies - my mistake for double posting.
I hadn't received the answers to the first posting (??) and thought it had

2011/4/7 Alexandre Borgoltz <>
> Hi,
> The default registration mecanism for resources is to scan the classpath
> (WEB-INF/lib, WEB-INF/classes).
> As I need to register my resources programmatically explicitely, I wrote my
> own and it did the trick.
> BUT afaik the scan/resource configuration only occurs once, on jersey
> startup.
> I am writing a port of jersey to OSGi and for that purpose I need to
> register resources programmatically *after *jersey is launched - some kind
> of .addSingleton(Object resource) or .addClass(Class<?> clazz) API [and
> the corresponding .remove*()] I could call whenever I need to.
> Does that already exists somewhere? Or is it a feature request I have to
> post somewhere (jersey?jsr311?)? I am willing to contribute to coding the
> changes.
> I thank you in advance,
> --
> Alexandre