Objects whose sole dependency is TypeLiteral

2015-05-14 Thread kelvsyc
Suppose that you have a TypeLiteral analogue in some other library, which can be easily constructed from TypeLiteral via exporting TypeLiteral's getType() to the analogue's TypeLiteral.of() counterpart (or custom subclassing shenanigans). Examples of this may include org.apache.commons.lang3.r

Re: Is there a way to close/destruct object in guice 4?

2015-05-14 Thread Vyacheslav Rusakov
If you just want spring-like @PostConstruct and @PreDestroy methods support then there are many libs that implements it like https://github.com/mycila/guice, https://github.com/Netflix/governator etc. I even wrote my own https://github.com/xvik/guice-ext-annotations. But, such things are agains

Re: Is there a way to close/destruct object in guice 4?

2015-05-14 Thread Stuart McCulloch
On Thursday, 14 May 2015 at 10:50, klc wrote: > So my questions are: > 1. Is there a way to find out if a guice has been created? > > > Previously in Guice 3 you could use a TypeListener to track when objects were directly instantiated by Guice (this doesn’t cover objects constructed inside

Re: Is there a way to close/destruct object in guice 4?

2015-05-14 Thread klc
So my questions are: 1. Is there a way to find out if a guice has been created? 2. Is there a way to let guice to run deconstruct when server is closing? (ie ServletContextListener.contextDestroyed) klc On Thursday, May 14, 2015 at 5:34:02 PM UTC+8, klc wrote: > > Sorry > > What i have now is a

Re: Is there a way to close/destruct object in guice 4?

2015-05-14 Thread klc
Sorry What i have now is a provider of let say a queue (Singleton scope). If the queue has been created, i will get from the injector and close it. (or is there a way to do this automatically?) This is on guice-servlet. klc On Thursday, May 14, 2015 at 5:31:20 PM UTC+8, scl wrote: > > Yes, but

Re: Is there a way to close/destruct object in guice 4?

2015-05-14 Thread Stephan Classen
Yes, but you have to be more specific if you want some concrete help Am 14. Mai 2015 11:25:52 MESZ, schrieb klc : >Hi Is there a way to destruct object in guice 4? > >I see guice fruit but i think it support guice 2. The object i'm >closing >are db, queue and etc. > >-- >You received this messag

Is there a way to close/destruct object in guice 4?

2015-05-14 Thread klc
Hi Is there a way to destruct object in guice 4? I see guice fruit but i think it support guice 2. The object i'm closing are db, queue and etc. -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving