Sure. Thanks for the kind words, Jesse deserves a lot of the credit for the good docs in Custom Scopes, and our good docs in general.
Dhanji. On Wed, Sep 1, 2010 at 7:52 PM, Brian R. Jackson <brian+goo...@jaxzin.com<brian%2bgoo...@jaxzin.com> > wrote: > 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>< > brian%2bgoo...@jaxzin.com <brian%252bgoo...@jaxzin.com>> > > > > > wrote: > > > I have a guice app running in a JavaEE container and realize I have > > > the need to annotate my classes/providers with a (non-existant) > > > @ApplicationScoped. Specifically I'm registering ehcache MBeans and > > > need to dispose of them when the application is unloaded from the > > > container, and wanted to use guiceyfruit support of JSR-250 to do > > > that. > > > > > My question, is there a good reason this scope doesn't already exist? > > > Am I missing something silly, like the feature exists in a different > > > form? > > > > Well, it sounds a lot like @Singleton. If you mean is there some broader > > Java EE specific application scope, then no, we do not have an out-of-box > > solution for that =) > > > > Dhanji. > > > 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 > > -- > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To post to this group, send email to google-gu...@googlegroups.com. > To unsubscribe from this group, send email to > google-guice+unsubscr...@googlegroups.com<google-guice%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-guice?hl=en. > > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to google-gu...@googlegroups.com. To unsubscribe from this group, send email to google-guice+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.