Re: JSR311: entity providers: when to inject dependencies on per request?

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 22 Aug 2008 11:55:35 -0400

On Aug 22, 2008, at 11:33 AM, Stephan Koops wrote:
> the current API allows providers the lifecycle per request. Or is
> this open in Application.getClasses() ?

The default lifecycle for provider is singleton though we do allow
that to be overridden, e.g. by an IoC framework.

> When should the dependencies injected? Before the call of
>[Readable|Writeable]() (then all readers|writers
> must be injected into for every call), or only for the provider to
> be use, that means after the call of is[Readable|Writeable]()?
> Or is this out of the spec?
In general injection happens before any methods are called so I think
it would be confusing if we specified otherwise.


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