users@jersey.java.net

Re: [Jersey] Simplifying Jersey life-cycle and IoC integration

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 27 Oct 2008 14:52:24 +0100

On Oct 27, 2008, at 2:49 PM, Martin Grotzke wrote:
>> Ah, that was different to what i expected. We need a programatic way
>> to get access to the scope of a spring bean independently of whether
>> the bean is Spring auto-wiring or not. I will have a closer look at
>> the Spring API.
> The SpringResourceProvider was built to support spring beans using the
> annotation-style, using autodiscovery etc. That's why I chose this
> approach.
>

OK.


> However, you should be able to retrieve the scope of some spring bean
> from the bean-definition:
>
> springContext
> .getBeanFactory().getBeanDefinition( beanName ).getScope()
>

Thanks, that helps!

Paul.