On Jun 26, 2012, at 7:49 AM, Paulo Pires wrote:
> Hi all,
>
> This is a guidance request from someone who's interested in learning Guice.
>
> I'm developing a Java SE application with some windows (SWT) that interacts
> with the network (Netty.IO) and when some conditions are true writes to a
On Jun 20, 2012, at 10:20 AM, je...@swank.ca wrote:
> I'm going to be investigating this. I'm working on an Android project that
> uses Guice extensively and we're suffering some performance problems. I'll
> keep this list posted with my progress. I expect to have something within a
> few weeks.
On Jun 20, 2012, at 9:42 AM, glenviewjeff wrote:
> I haven't been keeping detailed records, but from what I have been seeing, I
> think much of my performance hits and optimization improvements has come from
Awesome initial list. Thanks.
> uglifying my code by removing annotations from inject
On Jun 20, 2012, at 9:11 AM, glenviewjeff wrote:
> Christian, 95% of the startup code is Guice binding code; and there's zero
> I/O, database/network operations, etc. If you're an Android developer, (or
> even if you're not but are willing to install the Android tools so you can
> use Tracevi
At this point there is no such beast. createInjector() is a builder, and
creates an intact Injector.
Having said that, you could do something like this with child injectors, but I
worry that you would be swapping in a child injector for its parent in a
running system, and there are a hell of
this reply, this is more of a tycho issue than a guice packaging issue.
On Jun 4, 2012, at 1:47 PM, Stuart McCulloch wrote:
> On 4 Jun 2012, at 17:56, Christian Edward Gruber wrote:
>> I have a maven project Foo which depends on guice and guice-multibinders.
>> I'm having no p
Hey all,
So, I'm using guice and guice-multibinders in an open-source osgi project,
using felix and tycho to build with maven. I'm having a problem, and I see one
resolution, but thought I'd ask on this list because I want to make sure my
solution, which would change the way OSGI metadata i
I should throw this on a wiki or something.
Christian.
On May 16, 2012, at 6:10 AM, jordi wrote:
> Bubba, I think that Christian responded to your questions in a very
> "bookmarkable" way ;)
>
> On Sun, May 13, 2012 at 4:51 PM, Christian Edward Gruber
> wrote:
>
at 12:29 PM, Bubba 42 wrote:
> Many thanks guys for the input.
>
> Is there an example (Hello World level of complexity) which
> illustrates the collaborators, configuration, and consumables
> stereotypes?
>
> I'd be happy to put one together if it'd benefit folks --
Please don't inject value classes, generally speaking.
I tend to think of dependencies in three kinds - collaborators, configuration,
and consumables. Consumables are value classes that are consumed by and
transformed by your collaborators, in the context of your configuration.
Generally con
Nice, I'll take a peek at it next week.
Christian.
On Apr 26, 2012, at 9:52 AM, Simone Tripodi wrote:
> Hi all guys,
>
> I needed a simple way to invoke post-injections callbacks and
> destructor methods in an easy way using Guice - I know GuiceyFruit
> does all the work, but since yesterday I
You should be able to do this, so long as you're not playing crazy games with
classloaders. Class.forName() is not advisable, as you don't always get the
right classloader. But in principle this can work.
Christian.
On Apr 13, 2012, at 4:48 AM, Marko Lavikainen wrote:
> Can't you use Class.f
Do we have an existing issue for getElements() outstanding?
Christian.
On Mar 26, 2012, at 10:44 PM, Sam Berlin wrote:
> I don't believe there's currently a way. Injector is missing (and in need
> of) a getElements() method similar to Elements.getElements(Module).
>
> sam
>
> On Mon, Mar 26
Can you replicate this with extremely minimalist ExternalDataSourceModule() and
PushServletModule()s? The devil's in the details here. What is being bound
may have an impact.
One thing worth noting is that, as I recall, when you createChildInjector() you
force bindings sooner than they would
A common way to do this is to use a multibinder to bind services, and have a
service manager which starts up services post-injection. You can't easily
follow the dependency graph without digging into the SPI, but you could use a
MapBinder to declare services and what services they need to be st
Guava is certainly released into the central repo, so it would be quite easy
for Guice to depend on guava on the maven side, and import whenever important
on the ant side.
Christian.
On Oct 13, 2010, at 4:11 AM, Willi Schönborn wrote:
> On 13/10/10 06:27, Dhanji R. Prasanna wrote:
>>
>> OK, I
I'm in. ping me off-line and I'll get things going on our end. Happy to
collaborate too, if people have preliminary POM work that we want to bring in.
Christian.
On Sep 21, 2010, at 11:24 AM, Dhanji R. Prasanna wrote:
> We'd love to do so, but as we are time-constrained we'd love for volunt
You might want to look into Map Binders.
Christian.
On May 25, 2010, at 2:54 PM, KreeK wrote:
I'm new to Guice and wanted to get some advice on how to use it with
our application that uses the command pattern. The app has a
CommandMap which maps Events to Commands.
commandMap.map(FooEvent.EVE
It is, but I and a couple of others have worked up build-worthy poms
(I accidentally ditched mine, so I'll have to re-create), but I did
get it working with a pom for the guice trunk at one point.
Christian.
On May 23, 2010, at 2:43 PM, Dhanji R. Prasanna wrote:
I think our pom is designed
Please don't do this - you're using a single static logger behind an
instance variable, and using Logger quite differently than it's
intended. And what happens if someone doens't force the
constructor... log is not initialized. Or what if there are multiple
injectors in the VM - now you h
Yes, I would make your methods non-static, make the class
instantiatable - if you MUST, make a singleton static factory method,
but in your Guice-ified code, don't use the factory method - just
inject it where you need it, and in its constructor, ask for the
logger. If you use it outside of
Can I beg you not to do this, despite what others may suggest about
how this is possible. It's such a very bad practice that seems to be
prevalent in guice (depend something of wide scope on something of
narrow scope by depending on its provider).
I would recommend, instead, that you not p
I'll take a look at it, but I have to get the guava libraries dealt
with and some other things more directly related to my day-job. But
I'm interested in what you've pulled together and will take a peek.
cheers,
Christian.
On Apr 16, 2010, at 10:02 AM, Jelle Herold wrote:
On 6 apr 2010,
See my other comment.
On Apr 16, 2010, at 10:11 AM, Jelle Herold wrote:
On 26 mrt 2010, at 12:37, James Strachan wrote:
On 24 March 2010 17:33, Bob Lee wrote:
The only change I can think of is JSR-330 support.
Which would be great to release!
We'll probably have a
release in a couple
I would tend to create a wrapper service which I depend on, and let it
choose the internals based on what's available at runtime. One layer
of indirection can save you a lot of hell. :)
Christian.
On Apr 6, 2010, at 6:08 PM, Willi Schönborn wrote:
Hi folks,
i'm stuck at the following sit
On Apr 4, 2010, at 9:31 AM, Max Bowsher wrote:
Christian Edward Gruber wrote:
I wouldn't try to fill it in to use maven-eclipse-plugin - you need
far
less to make m2eclipse work
I've not used m2eclipse, but I don't understand how the above can be
true: all you need for th
I wouldn't try to fill it in to use maven-eclipse-plugin - you need
far less to make m2eclipse work (I had a pom working last year, I can
maybe dig it out). But yeah, I wouldn't try to use ant-run... better
to make a maven build work, then use ant's maven tags to use m2 to
resolve dependen
Or you can get it from the horse's mouth. :)
Good book, BTW, Dhanji.
Christian.
On Dec 21, 2009, at 4:36 PM, Dhanji R. Prasanna wrote:
> Dependency Injection is updated for Guice 2.0 (the servlet API,
> etc.), yes.
>
> Dhanji.
>
> On Tue, Dec 22, 2009 at 7:58 AM, mariuss
> wrote:
> As far
I think Dhanji's book is, but I was finding Robbie's book a little
stale given where/how Guice has gone. It does refer to most of the
new stuff, just won't have sophisticated usages, examples, concerns to
watch out for.
Christian.
On Dec 21, 2009, at 3:58 PM, mariuss wrote:
> As far as I
I've added the example to the documentation at:
http://code.google.com/p/google-guice/wiki/LinkedBindings
Christian.
On Nov 7, 2009, at 6:09 PM, Jon Vaughan wrote:
>
> Aha, nice one. That wasn't mentioned (well, there was no example
> like that) on http://code.google.com/p/google-guice/wiki/
+1, generally speaking. I think people sometimes get into this
because D-I systems are a bit like meta-factories, and with assisted
injection and providers, you can do factory-like things. But it
creates really tempting paths that lead to scoping problems. In
general, I like to keep val
31 matches
Mail list logo