Re: Desktop scoping and lifecycles

2013-09-05 Thread Jordi Gerona
maybe you can try to use Onami Lifecycle Dispose support [1] or Lifecycle Management in Governator [2] hth, jordi [1] http://onami.apache.org/lifecycle/org.apache.onami.lifecycle.standard/dispose.html [2] https://github.com/Netflix/governator/wiki/Lifecycle-Management On Wed, Sep 4, 2013 at 7

Re: Factories

2013-09-03 Thread Jordi Gerona
; } hth, jordi [1] https://code.google.com/p/google-guice/wiki/Multibindings [2] http://google-guice.googlecode.com/svn/trunk/latest-javadoc/com/google/inject/multibindings/MapBinder.html On Thu, Aug 29, 2013 at 9:27 AM, jpcoo...@gmail.com wrote: Hi, I've been reading quite a lot

Re: Managing non-obvious Scopes in complex Systems

2013-01-15 Thread Jordi Gerona
On Sun, Jan 13, 2013 at 7:10 PM, Roger Kapsi rka...@gmail.com wrote: The difficulty is that I can't simply slap a @RequestScoped annotation onto them. Why can't you just annotate the type (eg: Account)? If the instance is not constructed by Guice, it will give enough information about the

Re: Testing AOP and method names

2012-12-28 Thread Jordi Gerona
annotatedWith(YourAnnon.class), // methods new YourLoggingInterceptor()); I think the examples about AOP in the wiki [1] are pretty clear, but let me know if I can help you further! Cheers! jordi [1] http://code.google.com/p/google-guice/wiki/AOP Thanks, Dirk -- You received

Re: Current connection injection for a FTP client

2012-07-06 Thread jordi
I think that you're looking for Assisted Inject: http://code.google.com/p/google-guice/wiki/AssistedInject On Thu, Jul 5, 2012 at 9:14 PM, cheez u.int.3...@gmail.com wrote: I have a FTP client which has multiple servers configured by the user at runtime: class FTPConnection {

Re: Can DI be used for Instantiating Value Objects

2012-05-16 Thread jordi
you can apply a consistent strategy to it all. Christian On May 11, 2012, at 7:05 AM, jordi wrote: In case you really need to inject value classes, Guice does that for you for free. If you @Inject a Person (non-scoped), every time will give a new Person. But I can't figure out why

Re: Can DI be used for Instantiating Value Objects

2012-05-11 Thread jordi
a regular, old-fashioned new. If what you're looking for is to inject a Service in conjunction with some value class, take a look at Assisted Inject [1] hth, jordi [1] http://code.google.com/p/google-guice/wiki/AssistedInject On Thu, May 10, 2012 at 10:45 PM, Bubba 42 bubba424...@gmail.com wrote

Could not expose() suggestion

2012-04-04 Thread jordi
it?. I think it would be pretty much clear. cheers, jordi -- You received this message because you are subscribed to the Google Groups google-guice group. To post to this group, send email to google-guice@googlegroups.com. To unsubscribe from this group, send email to google-guice+unsubscr

Re: binding date using properties

2012-01-31 Thread jordi
use a regular guice Matcher [1], I guess this would do the trick: import static com.google.inject.matcher.Matchers.annotatedWith; // ... protected void configure() { convertToTypes(annotatedWith(Names.named(YOUR_KEY)), typeConverter); } jordi [1] http://google-guice.googlecode.com/svn/trunk

Re: Guice and Hadoop

2011-12-30 Thread jordi
this helps, jordi [1] https://issues.apache.org/jira/browse/HADOOP-3261 [2] http://esammer.blogspot.com/2009/09/map-reduce-and-dependency-injection.html On Wed, Dec 28, 2011 at 6:13 PM, egolan egola...@gmail.com wrote: Hi everyone, Is there some documentation regarding integration of Guice

Re: Guice and Hadoop

2011-12-30 Thread jordi
Spring). So I was wondering how to integrate them both. On Dec 30, 12:41 pm, jordi jo...@donky.org wrote: Hey Eyal There's an old jira with a patch [1] to support Spring Beans, that replaces the ReflectionUtils class used to instantiate everything with a much proper object factory

Re: creating a community of 3rd parties integrations

2011-11-17 Thread jordi
needs. If we can join forces around 3rd party integrations I believe big things will happen! have a nice day, jordi On Thu, Nov 17, 2011 at 10:12 AM, Simone Tripodi simonetrip...@apache.orgwrote: Hi Daniel, the main issue I see indeed is that efforts are defragmented - just take a look

Re: Customising java.util.Logger

2011-11-17 Thread jordi
-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/util/Modules.html#override(java.lang.Iterable? extends com.google.inject.Module) hth, jordi On Thu, Nov 17, 2011 at 1:16 PM, Moandji Ezana mwa...@gmail.com wrote: Hi, In introducing Guice to a project, I discovered that there's a built-in binding

Re: Yet another Guice+Quartz integration

2011-05-05 Thread jordi
great job! i'm looking forward to use it in my code, thanks for sharing that jordi On Wed, May 4, 2011 at 5:38 PM, Simone Tripodi simonetrip...@apache.orgwrote: Hi all guys, after Terracotta announced the new Quartz API release, I started working on GitHub on a new implementation of Guice

Re: Cannot use optimized @Assisted provider outside the scope of the constructor. (This should never happen. If it does, please report it.)

2011-01-27 Thread jordi
I've opened (finally) an issue with a testcase for this: http://code.google.com/p/google-guice/issues/detail?id=594 http://code.google.com/p/google-guice/issues/detail?id=594keep up your amazing job with guice! jordi On Tue, Jan 18, 2011 at 6:41 PM, Sam Berlin sber...@gmail.com wrote: Ya

Re: configure Singleton

2010-12-13 Thread jordi
Maybe @Provides will handle this for you? @Provides @Singleton public MaxBoundSet providesMaxBoundSet() { // instantiate the way you need return maxBoundSet; } http://code.google.com/p/google-guice/wiki/ProvidesMethods hth, jordi On Sun, Dec 12, 2010 at 1:02 AM, Peter tableyourt

Re: Guice 3.0 RC1 Available

2010-12-10 Thread jordi
/packages.htmlI guess that's a mistake since it's back... thanks! jordi On Thu, Dec 9, 2010 at 2:16 PM, Sam Berlin sber...@gmail.com wrote: So long as it's clear that it's an RC and not the full release, I don't see how it could hurt having it in maven central. If you're able to do that, Stuart

Re: New Guice 3.0 Snapshot

2010-11-25 Thread jordi
Where's Struts 2 Extension? It's bundled in the .zip's but I can't find it in the Javadoc API pointed by Guice30 wiki or in the source code via Google Code source browser jordi On Wed, Nov 24, 2010 at 9:22 PM, Simone Tripodi simone.trip...@gmail.comwrote: sorry if I misunderstood, I thought

Guice @ GTUG Barcelona

2010-10-29 Thread jordi
Hey there, if there's any Spaniards in this list maybe you're interested in the tech talk i made in GTUG Barcelona last weekend Here's the link (keynote in spanish): http://www.slideshare.net/giro9/dependency-injection-con-guice-gtug thanks! @jordi9 -- You received this message because you

Re: Knowing the stage in a module

2009-09-01 Thread jordi
you can inject Stage in your classes too: @Inject public Foo(Stage stage) { this.stage = stage } On Tue, Sep 1, 2009 at 1:06 AM, Max Bowsher m...@f2s.com wrote: Pablo Fernandez wrote: Hi, I'd like to know the stage (PRODUCTION, DEVELOPMENT) that my injector is in. I basically want

Re: tracking down a dependency path

2009-07-28 Thread jordi
hey there! i didn't try it but sure this helps you: http://code.google.com/p/google-guice/wiki/Grapher hope this helps jordi On 7/28/09, saltyazar ogu...@gmail.com wrote: hi all, first of all, thank you for the great contribution, keep up the good work! I am looking for a convenient

Re: Issue 396 in google-guice: Struts2 plugin NPE if server bounced

2009-06-29 Thread jordi
(struts.objectFactory, guice-test); params.put(guice.module, com.eventuo.guice.StrutsTestCaseModule); servletContext = new MockServletContext(); dispatcher = new Dispatcher(servletContext, params); dispatcher.init(); hope this helps! jordi On Mon, Jun 29, 2009 at 4:28 PM, Greg Lindholm greg.lindh

Re: G2 Struts 2 plugin exception

2009-06-22 Thread jordi
Thanks for the pacth! i was having this problem but i didn't have the time to debug it On Fri, Jun 19, 2009 at 10:41 PM, Greg Lindholm greg.lindh...@gmail.comwrote: Here is a patch which seems to work. Index: struts2/plugin/src/com/google/inject/struts2/ GuiceObjectFactory.java

Re: @Inject always creating new object

2009-06-19 Thread jordi
: bind(MyObject.class).in(Scopes.SINGLETON); hope this helps! jordi On Fri, Jun 19, 2009 at 6:28 AM, Matt mter...@gmail.com wrote: I'm new to Guice, and I'm using injection within an interceptor, with requestInjection() in my module. The interceptor is being called just fine, so my module

Re: G2 and Struts2 plugin (problems)

2009-05-20 Thread jordi
not bogus... nice to know it before i replace new jars on my Struts2 apps ;P On 5/20/09, Greg Lindholm greg.lindh...@gmail.com wrote: Sorry, you can ignore the startup problem. Eclipse WTP didn't clean out the old jars from the deployment area so it had both the Guice 1.0 and 2.0 jars. Once

Re: Struts 2.1.6 + Guice 1.0

2009-04-28 Thread jordi
download the struts2 plugin version 1.0.1. http://google-guice.googlecode.com/files/guice-struts2-plugin-1.0.1.jar it should fix your problem! jordi On 4/28/09, ampyx ampyx...@gmail.com wrote: Hey guys, I am new to Guice 1.0. I was trying to integrate guice 1.0 with struts2.1.6. I got

Re: How do you bind to generics?

2009-04-14 Thread jordi
TypeLiteralCacheNpc() {}; bind(inpc).to(npc); and similar for the other binding hope this helps! jordi On Tue, Apr 14, 2009 at 10:57 PM, aemami aemam...@gmail.com wrote: Hi, I am trying to accomplish the following: bind(ICacheNpc.class).to(CacheNpc.class); and bind(IMyMapperNpc.class

Re: Guice 2 prerelease snapshot 20090205

2009-02-09 Thread jordi
there's a lot more documentation on google code site: http://code.google.com/p/google-guice/wiki/Changes20 btw, thanks jesse and all of you bringing in all this new documentation! On Mon, Feb 9, 2009 at 11:32 AM, alexander.gruenew...@googlemail.com alexander.gruenew...@googlemail.com wrote:

Re: Google Guice Peformance: CPU and Memory

2008-11-25 Thread jordi
I'm having similar problems using Guice with Struts 2 + Hibernate. I dunno if Guice is part of the problem, when the PermGen error appears always is related to C3P0 pool created by Hibernate and the Logger stuff. jordi On Tue, Nov 25, 2008 at 7:41 PM, Dhanji R. Prasanna [EMAIL PROTECTED]wrote

Re: Google Guice Peformance: CPU and Memory

2008-11-25 Thread jordi
, Dhanji R. Prasanna [EMAIL PROTECTED]wrote: On Tue, Nov 25, 2008 at 11:22 AM, jordi [EMAIL PROTECTED] wrote: ... Looking at the console log i see this message when redeploying: A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed

Re: Guice newbie question: creating N objects on-demand

2008-10-16 Thread jordi
i was about to tell you also about injecting ProviderDispatcherHandler when i saw Bob's solution.. I guess if you inject that provider you can't tell him about the Predictor, at least at construction time.. jordi On Thu, Oct 16, 2008 at 6:24 PM, Andrew Clegg [EMAIL PROTECTED]wrote: Okay