[weld-dev] Stateless scope in Weld?

Adam Warski adam at warski.org
Sat Jan 15 10:37:18 EST 2011


> I agree with both of you and have attempted to defend this position in the past. I thought using a dependent-scoped bean with Instance<T>#get() would be sufficient, but I didn't think about the passivation requirement. We need a truly stateless scope in CDI. I define it as a non-storing context. The reference is resolved each time the proxy dereferenced (method call).

Hmm this may be something different - maybe as Pete writes @Unwraps. For a stateless scope the reference could be resolved once (at injection time or lazily on first method invocation), much like the dependent scope. The difference being the behavior during passivation.

-- 
Adam Warski
http://www.warski.org
http://www.softwaremill.eu







More information about the weld-dev mailing list