Re: Initializing expensive resources in parallel?

2009-11-23 Thread Dhanji R. Prasanna
On Tue, Nov 24, 2009 at 2:28 PM, Tim Peierls wrote: > On Nov 20, 11:24 am, William Pietri wrote: > > Do you have an opinion on Jesse's proposed solution, the one involving > > Guava? I don't yet know enough about Guice's internals to know whether > > your discovery means that his approach would

Re: Initializing expensive resources in parallel?

2009-11-23 Thread Tim Peierls
On Nov 20, 11:24 am, William Pietri wrote: > Do you have an opinion on Jesse's proposed solution, the one involving > Guava? I don't yet know enough about Guice's internals to know whether > your discovery means that his approach would also founder on the same > rocks you uncovered. I'm just tryi

Re: Custom Injections for Superclass Fields

2009-11-23 Thread Chris Ward
On Nov 23, 11:51 am, "je...@swank.ca" wrote: > You should loop over the superclasses in the TypeListener.hear() > method: Ah, I kind of considered that, but wasn't sure of the code. Works great. Thanks for the help, Chris -- You received this message because you are subscribed to the Google G

Re: Guice Internal Computation Exception

2009-11-23 Thread Pablo Fernandez
Hey, I'm sorry I got that completely wrong. I downloaded javax.inject from a maven repo adding this to the pom.xml: javax.inject javax.inject 1 On Nov 23, 6:58 pm, Pablo Fernandez wrote: > That patch seems to be JDK 1.6  or greater only... > > I'm running it with Java 1.5 and I get this stack

Re: Guice Internal Computation Exception

2009-11-23 Thread Pablo Fernandez
That patch seems to be JDK 1.6 or greater only... I'm running it with Java 1.5 and I get this stacktrace: java.lang.NoClassDefFoundError: javax/inject/Provider at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:703)

Re: Guice Internal Computation Exception

2009-11-23 Thread Stuart McCulloch
On Nov 24, 2009, at 3:34 AM, Pablo Fernandez wrote: > Hi, > > I'm getting this strange exception with the last release of Guice, > while running the maven goal "jetty:run". This thing did not happen > minutes ago when the objects of my Multibinders did not need to be > dependency injected. > >

Guice Internal Computation Exception

2009-11-23 Thread Pablo Fernandez
Hi, I'm getting this strange exception with the last release of Guice, while running the maven goal "jetty:run". This thing did not happen minutes ago when the objects of my Multibinders did not need to be dependency injected. Any idea why? com.google.inject.internal.ComputationException: com.go

Re: Custom Injections for Superclass Fields

2009-11-23 Thread je...@swank.ca
On Nov 20, 1:45 pm, Chris Ward wrote: > Can anyone give me a pointer on how to make this work or suggest a > better design practice? You should loop over the superclasses in the TypeListener.hear() method: public void hear(TypeLiteral typeLiteral, TypeEncounter typeEncounter) { Class raw =

Gilead + Guice + Gwt-Dispatch

2009-11-23 Thread Marcos Alcantara
Hi, Have anyone in this group been able to configure these 3 pieces altogether?? Could you please post some configuration examples? Thanks!! Marcos Alcantara -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to

Re: Initializing expensive resources in parallel?

2009-11-23 Thread Dhanji R. Prasanna
If you like you can try the experimental lifecycle module which takes an executor and calls a bunch of services in parallel. See this test for an example: http://code.google.com/p/google-guice/source/browse/trunk/lifecycle/test/com/google/inject/lifecycle/ParallelizedBroadcastTest.java Dhanji. On

Re: Initializing expensive resources in parallel?

2009-11-23 Thread William Pietri
Tim Peierls wrote: > Actually, it's worse than that: Even with a latch, the Guice internals > are so aggressively single-threaded that this approach doesn't work at > all -- the trivial demonstration only works because of the uninjected > custom provider. What a shame. > > Sorry if I got any hopes

Custom Injections for Superclass Fields

2009-11-23 Thread Chris Ward
I am new to Guice and attempting to implement a logging example based on this tutorial: http://code.google.com/docreader/#p=google-guice&s=google-guice&t=CustomInjections I would like to create an abstract base class with some utility methods that include logging and then have subclasses reuse tha

Re: Inject generic typer

2009-11-23 Thread Asier
Asier escribió: > public interface IBuilder> { > public T build() throws Exception; > } Typo! The builder interface it's like this public interface IBuilder { public T build() throws Exception; } Thanks -- You received this message because you are subscri

Inject generic typer

2009-11-23 Thread Asier
Hi all How can I declare something like this in a module so it can be injected? I have some mapbinders in different modules, and don't like to have lots of semi-empty interfaces spreaded, so I've created a generic interface: public interface IFactory> { public T create(String type