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
it this way SitemapListService wil be also injected
mapbinder.addBinding(SitemapService.class.getName()).to(SitemapService.
class)
// and so on
}
Now in your client code you can inject the map of services:
@Inject
Foo(Map services>) {
this.services = services;
}
hth,
jordi
[1] ht
On Sun, Jan 13, 2013 at 7:10 PM, Roger Kapsi 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 intended
use.
--
annotation for that and apply it only on the methods
you want logging. Then configure your interceptor like:
bindInterceptor(
any(), // classes
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
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 wrote:
> I have a FTP client which has multiple servers configured by the user at
> runtime:
>
> class FTPConnection
> {
> FTPConnection(ServerInfo s
isn't to say you "can't" do it, and several frameworks built on
> top of guice or other DI systems do just that, but it's tricky and very
> likely to get subtle implicit behaviour that's hard for other developers to
> reason about. Common cases are for things
r to just use 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 wrote:
"Did you forget to explicitly bind 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 fro
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.googleco
e and this is
> > why I went into Guice (my preferable choice over Spring).
> >
> > So I was wondering how to integrate them both.
> >
> > On Dec 30, 12:41 pm, jordi wrote:
> >> Hey Eyal
> >>
> >> There's an old jira with a patch [1] to suppo
ent Hadoop API
hope 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 wrote:
> Hi everyone,
> Is there some documentation regarding integration o
gle-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/util/Modules.html#override(java.lang.Iterable)>
hth,
jordi
On Thu, Nov 17, 2011 at 1:16 PM, Moandji Ezana wrote:
> Hi,
>
> In introducing Guice to a project, I discovered that there's a built-in
> binding to j.u.Logg
ven by the community 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
wrote:
> Hi Daniel,
> the main "issue" I see indeed is that efforts are defragmented - just
if MapBinder doesn't make the trick, maybe
AssistedInject<http://code.google.com/p/google-guice/wiki/AssistedInject>can
help you too
jordi
On Fri, May 20, 2011 at 7:19 AM, Martin Cavanagh <
martin.andrew.cavan...@googlemail.com> wrote:
> Hi Colin.
>
> That sounds ver
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 wrote:
> Hi all guys,
> after Terracotta announced the new Quartz API release, I started
> working on GitHub on a new implementation of Guice+Quar
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=594>keep up your
amazing job with guice!
jordi
On Tue, Jan 18, 2011 at 6:41 PM, Sam Berlin wrote:
> Ya.
tory to get the instance:
factory.create(gappsConfig);
Do you want me to open an issue?
hth, guice is truly amazing
jordi
--
Here's the full stacktrace:
com.google.inject.CreationException: Guice creation errors:
1) Error in custom provider, java.lang.IllegalStateException: Cannot use
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 wrote:
> Hi,
&g
0-rc1/javadoc/packages.html>I
guess that's a mistake since it's back...
thanks!
jordi
On Thu, Dec 9, 2010 at 2:16 PM, Sam Berlin 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
jordi
On Thu, Nov 25, 2010 at 2:35 PM, Sam Berlin wrote:
> The struts2 extension included in guice2 was broken, and the workaround
> included on trunk had its own issues.
> sam
>
>
> On Thu, Nov 25, 2010 at 6:44 AM, Stuart McCulloch wrote:
>
>> On Nov 25, 2010, at 10:44,
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 wrote:
> sorry if I misunderstood, I thought y
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 a
It already happens if you're using struts 2, every time you need to choose
@Inject betwen guice or xwork. anyways, nobody had complained before ;)
On Tue, Sep 8, 2009 at 11:00 PM, Robbie Vanbrabant <
robbie.vanbrab...@gmail.com> wrote:
> Maybe the next Guice release could have two guice.jar's, on
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 wrote:
> Pablo Fernandez wrote:
> > Hi,
> >
> > I'd like to know the stage (PRODUCTION, DEVELOPMENT) that my injector
> > is in.
> >
> > I basically want
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 wrote:
>
> hi all,
>
> first of all, thank you for the great contribution, keep up the good
> work!
>
> I am looki
ice test module
params.put("struts.objectFactory", "guice-test");
params.put("guice.module", "com.eventuo.guice.StrutsTestCaseModule");
servletContext = new MockServletContext();
dispatcher = new Dispatcher(servletContext, params);
dispatcher.init();
hope th
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 wrote:
>
> Here is a patch which seems to work.
>
> Index: struts2/plugin/src/com/google/inject/struts2/
> GuiceObjectFactory.java
>
bject:
bind(MyObject.class).in(Scopes.SINGLETON);
hope this helps!
jordi
On Fri, Jun 19, 2009 at 6:28 AM, Matt 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 fi
dhanji,
i'm having similar issues with struts 2.1.6 and guice 2.0
it would be awesome if you patch the struts2 plugin! ;D
On Thu, May 21, 2009 at 5:05 PM, Greg Lindholm wrote:
>
>
> On May 21, 9:33 am, "Dhanji R. Prasanna" wrote:
> > you can go new GuiceFilter().destroy() though that's kinda k
not bogus... nice to know it before i replace new jars on my Struts2 apps ;P
On 5/20/09, Greg Lindholm 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 I cleaned out the
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 wrote:
>
> Hey guys,
>
> I am new to Guice 1.0. I was trying to integrate guice 1.0 with
> struts2.1.6.
Literal>() {};
bind(inpc).to(npc);
and similar for the other binding
hope this helps!
jordi
On Tue, Apr 14, 2009 at 10:57 PM, aemami wrote:
>
> Hi, I am trying to accomplish the following:
>
> bind(ICache.class).to(Cache.class);
>
> and
>
> bind(IMyMapper.class).to(N
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:
, Nov 25, 2008 at 8:27 PM, 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
assloader. I doubt Hibernate or c3p0
> is to blame specifically--this can be caused by just about anything
> (most typically, a logging instance from commons-logging.jar in a
> parent CL).
>
> Dhanji.
>
> On Tue, Nov 25, 2008 at 10:49 AM, jordi <[EMAIL PROTECTED]> wr
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 PROTECTE
get the latest struts2-guice-plugin, that version is buggy
http://google-guice.googlecode.com/files/guice-struts2-plugin-1.0.1.jar
On Tue, Oct 21, 2008 at 8:03 AM, Adam Ruggles <[EMAIL PROTECTED]> wrote:
>
> Has anyone had any problems using the latest guice 2.0 snapshot with
> struts2?
>
> I ad
i was about to tell you also about injecting Provider
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:
>
>
ere. To simplify, every Action
call it's Service, who has a DAO to access database and retrieve that
type. That question arise from the easiness of making Singletons, so should
i do it? or better each request has it's own instantiated Service?
thanks
jordi
--~--~-~--~~---
hey,
maybe a Provider could be a solution and get what you need at
runtime. otherwise you can inject that Provider, or one Provider for each
Store you have,. like Provider, Provider
anyways, using Guice API is not bad at all! is there for something good
jordi
On Mon, Sep 29, 2008 at 11:33 AM
40 matches
Mail list logo