Re: new Rocoto (Guice variable expander) release

2012-01-17 Thread Simone Tripodi
Cool idea Tim, here we go: http://groups.google.com/group/rocoto I already invited you! Thanks, all the best, -Simo http://people.apache.org/~simonetripodi/ http://simonetripodi.livejournal.com/ http://twitter.com/simonetripodi http://www.99soft.org/ On Tue, Jan 17, 2012 at 6:29 PM, Tim Peierls

Re: inject fiels of interface?

2012-01-17 Thread Willi Schönborn
I'm not sure if you are aware of this but "implementedDevice" is not an instance field, its static. So there will be only one, shared by all classes accessing that variable. On 13.01.2012 11:05, wahaha wrote: interface IDeviceDelegate { Map implementedDevice; } class PrinterDelegate im

Creating my first module

2012-01-17 Thread egolan
Hi, I am working on a project, which is kind of batch one. We are using dependency injection as the architecture, and it proved very well. Everything (well, 90%) could be tested. Up until now, everything (objects graph) was hooked and created manually. Now I want to take it for the next level, and

Re: new Rocoto (Guice variable expander) release

2012-01-17 Thread Tim Peierls
On Tue, Jan 17, 2012 at 10:02 AM, Simone Tripodi wrote: > > Feature request: Right now the default value is not subject to further > > resolution, but it could be, e.g., ${foo|${bar|default}} could resolve to > > "default" if both foo and bar are undefined. > > That is something we can peak about.

Re: new Rocoto (Guice variable expander) release

2012-01-17 Thread Simone Tripodi
Hi Tim!! > Typo: The javadocs for bindEnviromentVariables() and bindSystemProperties() > were switched. thanks, I have to check :) > (And a lot of javadocs are missing.) yup, I've been too lazy :P > Feature request: Right now the default value is not subject to further > resolution, but it cou

How do you get a map of similar bindings exposed from different Private Modules

2012-01-17 Thread Warren
I have an ItemService annotated with Names.named("dataSource1") and another one annotated with Names.named("dataSource2") exposed from two different Private Modules like this: ... new PrivateModule() { @Override protected void configure() { bind(ItemService.class).annot

How to configure it to work on desktop?

2012-01-17 Thread Paul
Hi, I am making a desktop app and trying to use Guice to bind DB repository, like I would in web app. From what I see, it should work, but how to configure it? I have GuiceModule, that looks like that: public class GuiceModule extends AbstractModule { @Override protected void configure()

Re: creating a community of 3rd parties integrations

2012-01-17 Thread nino martinez wael
Im interested in this aswell.. i can bring my quartz and ehcache integration... On Dec 3, 2011 12:13 AM, "Simone Tripodi" wrote: > Hi all again > sorry for resurrecting zombies, but this last message just to let you > know the direction that CDI people has taken[1] - it is similar to my > proposa

inject fiels of interface?

2012-01-17 Thread wahaha
interface IDeviceDelegate { Map implementedDevice; } class PrinterDelegate imple IDeviceDelegate { ... } class CarderReaderDelegate imple IDeviceDelegate { ... } like this above,there is a map element in interface IDeviceDelegate,how to inject it into the implement classes? my solution is

Re: "It was already configured on one or more child injectors or private modules bound at"

2012-01-17 Thread Warren Bell
Ok, I think I know what I was doing wrong. I never added the child injector to my app. I thought the child injector was contained in the parent injector, but after looking at some of the Guice tests I realized you could create more than one Injector instance, a parent and children and children of c

"It was already configured on one or more child injectors or private modules bound at"

2012-01-17 Thread Warren
I have seen many posts on this, but I still do not know or understand how to fix it. I am getting the following error: Problem getting itemsGuice configuration errors: 1) Unable to create binding for ...ItemService. It was already configured on one or more child injectors or private modules bound

Re: Adding, replacing, removing modules on the fly

2012-01-17 Thread Mathieu Clavel
I'm not sure I understand all that you want to do. You can create the map in a provider by injecting each different annotated ItemService in the provider constructor, and adding them to the map that you will return with the get() method. Something like : public class MyMapProvider implements