On Sep 1, 1:04 am, "Dhanji R. Prasanna" <
dha...@gmail.com> wrote:
> On Wed, Sep 1, 2010 at 1:11 AM, Brian R. Jackson
> <
brian+goo...@jaxzin.com<
brian%2Bgoo...@jaxzin.com>
Thanks Dhanji,
After posting this yesterday I came to the realization that @Singleton
is exactly equivalent to what I'm asking about. I forgot that each
application has their own Injector and that @Singletons aren't shared
at the JVM level, only at the Injector level.
By the way, it was incredibly simple to write the custom scope, which
I had done until I realized it effectively duplicated @Singleton and
Scopes.SINGLETON. Great job with the excellent documentation of
custom scopes. I threw out my implementation when I realized it
didn't add any value over Scopes.SINGLETON, which stored objects in
ServletContext.setAttribute() instead of the private volatile field in
the anonymous Provider that Scopes.SINGLETON uses.
Thanks again,
Brian