users@jersey.java.net

Registration of resource/provider classes via Spring

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 07 Nov 2008 11:53:42 +0100

Hi Martin,

I am wondering if we could improve the registration mechanism of
Jersey with Spring currently we do the following:

1) In the xml config we require that the spring bean is named as the
fully qualified class name.

2) For autowire, Jersey scans and Spring scans, it requires some
duplication of package declaration.

Do you know if there is any way to get the set of classes or bean
class information Spring knows about at initialization? If so those
classes could be analyzed by Jersey and registration of those classes
could occur. In such cases Jersey scanning could be disabled unless
one explicitly declares it and wants to mix Spring and non-Spring beans.

I guess the problem is a little more complicated since there is not
always a one to one correspondence between the class and the instance
but i think that is a fair assumption to make for resource and
provider classes.

Paul.