Re: JSR311: _at_Singleton

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Mon, 09 Jun 2008 15:05:19 -0400

On Jun 9, 2008, at 12:47 PM, Bill Burke wrote:
>>> I noticed jersey has an @Singleton annotation. Can we just add
>>> this to the spec? Its something I want in my implementation as
>>> well.
>> Seems to me that component lifecycle annotations really belong
>> elsewhere and if we add them in this JSR then we'd be getting into
>> the IoC framework space.
> Yeah, you're right. Kinda contradicts my arguments against
> ContextResolver too.
> Can we get some support for singletons in ApplicationConfig then?
> List<Object> getResourceInstances();
> List<Object> getProviderInstances();
> I've already run into the need of having portable singletons.
You don't think that is also getting into the IoC framework space ? If
you are using Spring or WebBeans you'd want those to be in charge of
the lifecycle, not the application directly...


Marc Hadley <marc.hadley at>
CTO Office, Sun Microsystems.