dev@jersey.java.net

Re: [Jersey] [jersey-spring] singleton registration

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 29 Dec 2009 10:57:19 +0100

Hi Pedro,

Thanks for that information. Which wiki entry are you referring to?

Paul.

On Dec 23, 2009, at 6:56 AM, Pedro Teixeira wrote:

> Hi folks,
>
> I'm migrating from a 1.0.1 to the latest :)
>
>
> The strategy offered in the wiki to configure spring does not really
> work for all cases.
>
>
> = Changing from:
> StaticListableBeanFactory factory = new
> StaticListableBeanFactory();
> factory.addBean("bayeux", bayeux);
>
> = to:
> StaticListableBeanFactory factory = new
> StaticListableBeanFactory();
> DefaultListableBeanFactory listableBeanFactory = new
> DefaultListableBeanFactory(factory);
> listableBeanFactory.registerSingleton("bayeux", bayeux);
>
>
>
> worked for me.
>
>
> Otherwise, I get
> "org.springframework.beans.factory.NoSuchBeanDefinitionException" for
> all @Autowired cases.
>
>
>
> cheers,
> Pedro
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>