[Jersey] Registering a REST Resource after engine is started

From: Alexandre Borgoltz <>
Date: Thu, 7 Apr 2011 09:27:51 +0200


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

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

I thank you in advance,