Second that. It's kind of funny to stay in beta for a couple of years, but
come on, there are lots of serious spiky haired people out there who panic
when they hear 'beta' ;-)
Eelco
On Friday, March 6, 2015 at 8:26:05 PM UTC-5, Tim Boudreau wrote:
>
> Hi, folks,
>
> I've been using Guice 4 sinc
Happy happy!
Eelco
On Thursday, March 20, 2014 11:59:37 PM UTC-4, Christian Gruber wrote:
>
> Greetings guice users,
>
> We've released Guice 4.0 Beta 4, and the artifacts are now in maven, API
> diffs and javadocs freshly generated, code.google.com docs updated, and
> you should be able to st
Great! Any chance you could give us a ping when that is done? Cheers,
Eelco
On Wednesday, March 19, 2014 12:31:25 PM UTC-4, Christian Gruber wrote:
>
> Sam and I will coordinate, and we'll make sure it gets out to Maven
> central.
>
> c.
>
> On 19 Mar 2014, at 8:10, Thomas Broyer wrote:
>
> >
>This may be a good compromise to exposing a public
> shutdown method...
I would find that helpful too. It doesn't have to be either/ or either, right?
Eelco
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To post to this group, send email to
Let me ask this another way. The following test case succeeds:
public class ATest {
static class A {
final B b;
A(B b) { this.b = b; }
}
static class B {
}
static class AProvider implements Provider {
final
Hi,
I'd like to register a type listener for warp-persistence's
SessionFactory provider. Which unfortunately is package private, so as
a workaround - armed with the knowledge that it is a provider, I
thought I'd do this:
bindListener(Matchers.only(TypeLiteral.get(Types
Bind the class instead of the instance, so that Guice instantiates the
object, passing in dependencies in the process.
> and GatewayPool:
>
> public class GatewayPool {
> @Inject
> private GatewaysConfiguration configuration;
> ..
> public GatewayPool {
> configuration.doSomethi
> But notice I have to register myResource, would've been nice if it could be
> picked up automaticly..
Yeah, mine do get picked up automatically. I guess the debugger is
your friend. I also vaguely remember that either servlets or jaxrs
resources need to be annotated with @Singleton. Not sure if
> SEVERE: service exception:
> java.lang.NullPointerException
> at com.netdesign.rest.MyResource.getIt(MyResource.java:58)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun
> com.sun.jersey.server.impl.application.WebApplicationImpl
> processRootResources
> SEVERE: The ResourceConfig instance does not contain any root resource
> classes.
Ah yes, I've seen that before. For some funny reason, Jersey refuses
to start up if it doesn't find anything to work with in the pa
> I'm using a tweaked version of contribs/jersey-guice, part of the
> jersey project. See
> https://jersey.dev.java.net/nonav/apidocs/1.1.5/contribs/jersey-guice/index.html
Here is the an example of code that I use to setup JAXRS/ Jersey with
Guice, but you have to read through the fluff a bit sin
I'm using a tweaked version of contribs/jersey-guice, part of the
jersey project. See
https://jersey.dev.java.net/nonav/apidocs/1.1.5/contribs/jersey-guice/index.html
Eelco
On Thu, Mar 4, 2010 at 5:58 AM, nino martinez wael
wrote:
> Hi Guys
>
> First of all thank you for creating guice, it's muc
> injector = Guice.createInjector(new
> TemplateModule.Builder().withSession(new Session()).buildModule(),
> new AbstractModule() {
> �...@override
> public void configure() {
> requestInjection(this);
> }});
This doesn't work because requestInjection(this) request
> Why is it not injected?
Because Guice is not in charge of creating your test class instances.
So you either have to explicitly ask it to inject for you, get a
reference yourself by using the injector, or use something like
AtUnit: http://code.google.com/p/atunit/wiki/SupportedContainers
Eelco
> Just curious, when would you not need a transaction?
I guess I should say that you don't always want to turn off autocommit
(transaction per execution instead of per annotated method). And
thinking about it it, maybe there is no good reason.
Eelco
--
You received this message because you are
> x) I didn't bother with providing support for connection pool, as
> Oracle Driver comes with build-in CP sames goes Postgresql
If you use e.g. c3po's datasource, you'll get pooling built in but
independent of the actual driver.
> o) Made a provider for a Connection (I "hardcoded" connection-per
Yeah, curious about that as well. We're using a snapshot at the
moment. How about supporting iBatis?
http://code.google.com/p/ibaguice/ looks great, but if it is feasible
and all parties agreed, maybe guice-persist could combine the best of
warp-persist and ibaguice?
Eelco
On Sun, Feb 21, 2010 at
On Fri, Feb 12, 2010 at 3:56 PM, Sam Berlin wrote:
> Is it possible to wrap the 'Connection' around some kind of
> 'ManagedConnection' that delegates to the actual Connection and
> restablishes the connection if it fails? That way client code doesn't
> have to concern itself with the internals of
> This is actually applicable to Socket Producer/Consumers, Database
> failovers, etc.., hence the post. My sense is that implementing
> Providers for each heavy weight object is the way to go, using a
> Callable in a separate thread to re-connect in the get() method. The
> problem of re-establish
ilter does for servlet requests. *If* you're not
in a servlet request, using WorkManager directly is one of the ways
you can do it.
Eelco
On Tue, Feb 2, 2010 at 1:55 PM, Eelco Hillenius
wrote:
> Keep in mind though, that you want to call beginWork before calling
> any @Transactional
.add((Expression.eq("idApp",app)))
> .add(Expression.ne("isCon", false))
> .addOrder(Order.desc("priority"));
> return criteria.list();
> List result = criteria.list();
> unitOfWork.endWork();
>
What is your value for current_session_context_class? If it is managed
(which is the value I think is best), then you need to prepare
sessions through using WorkManager (beginWork/ endWork, and this is
Guice managed, so you can have it injected). Or if you're in a servlet
environment, use wideplay'
You'd have to either do that - again and again - or use a Wicket-like
trick where you abstract re-getting of a value when you deserialize
behind a proxy.
Eelco
On Sun, Jan 31, 2010 at 3:01 PM, Dhanji R. Prasanna wrote:
> You're looking for readResolve:
> http://java.sun.com/j2se/1.5.0/docs/api/j
> His article is forgettable, but nobody ever
> forgets an open-source flame war.
>
> Let your community speak for itself, as I'm sure it will. ;-)
Though come on, anything without a bit of arguing every now and then
tends to get boring :-)
Eelco
--
You received this message because you are su
> Nice! Does this mean Maven itself will run Guice (from v3)?
I was wondering the same. That'd be great, because currently writing
Maven plugins requires you to rely on quite a bit of
hard-to-track-down magic.
Eelco
--
You received this message because you are subscribed to the Google Groups
"
You could use a provider and let it construct the appropriate one
using the parameter you get through @Named. You can cache instances
with the provider if you want.
Eelco
2010/1/16 Willi Schönborn :
> On 16/01/2010 18:02, Kartik Kumar wrote:
>
> This may help. http://code.google.com/p/google-gui
> that. So it is very strange for me that Guice's default scope is
> "new".
Imho this is a good default because it is the safest one. Being
explicit about whether something is a singleton forces developers to
think about the consequences. It may also be more efficient for
objects that are cheap to
> I have no problem with annotations in general. Here are my concerns:
> - don't want code to depend on guice; jsr would be better here, for
> the @Inject; but this issue is minor compared to the others
They are annotations, not interfaces.
> - 3rd party code (or any code which I can't or should
Hi,
I'm looking for advice on how to best integrate Spring with Guice.
Basically, I want to be able to use Spring managed modules with Guice
managed ones. Guice Spring does that, but the implementation is a bit
simplistic. Particularly, the (very typical) case where you'd define
the implementing
> Actually, in the end I realised that for my Use Case (Find all implementing
> classes for an interface at startup) that a perfectly good solution exists
> already in Java 6 - java.util.ServiceLoader. It doesnt require any
> additional jars and just does exactly what I want. On reflection I'm not
> If anyone is interested and has the time, it would be great to see a
> cleaned up version of this for general use.
Heh. Well, I didn't want to bring it up after this thread:
http://groups.google.com/group/google-sitebricks/browse_thread/thread/1161c23765621f99/3bcd96cd84b52b86?lnk=gst&q=eelco#3
Unless I missed something obvious, it's such functionality isn't built
in. I implemented it myself two weeks ago. Here's the code that does
that: http://pastebin.com/f6bff61bc. It isn't pretty in anyway, but it
does the job for me. You also need ASM on your classpath (or copied to
your own package
> I implemented a classpath scanner that reads Guice annotations and
> binds eagerly, for the sole purpose of finding such problems either
for the sole purpose of finding such problems *early*
--~--~-~--~~~---~--~~
You received this message because you are subscri
> Therefore I want to start as few modules as possible for some of my unit
> tests. This results in many, many small modules. At the moment I have 18
> production modules (and 5 mock modules) for a project with around 300
> classes.
> Is this normal? How do you solve that problem?
I don't know ab
s, new up the
> object and return.
> See the second example here:
> http://code.google.com/p/google-guice/wiki/ProvidesMethods
>
> Robbie
>
> On Tue, Sep 8, 2009 at 11:01 AM, Eelco Hillenius
> wrote:
>>
>> Hi,
>>
>> I have two different data sources a
Hi,
I have two different data sources and I want them initialized through
properties files. When using Spring I would just instantiate the same
class twice with different parameters, but with Guice it is a little
bit less straightforward - at least initially, and in fact I already
like the end re
36 matches
Mail list logo