Questions tagged [guice-3]

Google Guice 3.0 Release

Guice 3 is version of Google Guice. Link to guice tag.

New Features are supported in Guice release 3.

  • JSR 330 Support
  • New Persist Extension
  • ToConstructor Bindings

and many such more features are introduced.

Reference

103 questions
0
votes
1 answer

Guice injection leaking into other tests

I use Guice to instantiate a VocabularyAPI object for one of my unit tests unitTest1(). However, for another test (unitTest2()), I simply use mockito's @Mock annotation to mock an instance of the same class - VocabularyAPI. I noticed that when I…
Darth.Vader
  • 5,079
  • 7
  • 50
  • 90
0
votes
1 answer

Guice injection on nested classes of CLI App

I am writing a command line interface application that is connecting to an oracle database using MyBatis and injection done by Guice. My question is with injection of nested classes. My class structure looks pretty much like…
scphantm
  • 4,293
  • 8
  • 43
  • 77
0
votes
1 answer

injection different of different instances with guice

so, we have a properties file per vendor where vendors will never really exceed 50(we are at about 20 maybe right now). Each has about 20 properties or so. We would like to have each instance of VendorStream(AND all his children) to be injected…
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
0
votes
1 answer

Google Guice. Methods annotated with @Provides annotation are not invoked

I am a new to Guice dependecy injection, hope someone could explain me why my code doesn't work. here is the class that extends AbstractModule: public class WebCoreModule extends AbstractModule { @Provides public SomeFactory…
Ihor M.
  • 2,728
  • 3
  • 44
  • 70
0
votes
1 answer

Google guice module configuration for unit testing

I'm trying to use google guice for dependency injection however I can't seem to wire everything togheter. In my web.xml I defined the guiceFilter and the guiceListener like so: guiceFilter
J.Pip
  • 4,523
  • 7
  • 31
  • 49
0
votes
1 answer

How to pass an object to a class that will be injected later

I am pretty new to google guice . I am writing a nexus plugin where nexus injects some classes . for example say the class to be injected in class A. Now before that class A is injected, I have another class B that was instantiated and inside it I…
Harish Kayarohanam
  • 3,886
  • 4
  • 31
  • 55
0
votes
1 answer

Restful webservices(Apache wink+Guice+openjpa)

I would like to use the following technologies to develop restful webservice. Apache wink+Guice3+openjpa. I dont know how to use guice with wink and openjpa. could you please explain.
Prabu
  • 101
  • 2
  • 7
0
votes
0 answers

Guice Multibindings and proguard

Im trying to use roboguice+guice multibindings for android. When I skip proguard the app is working well. When proguard is on I got runtime errors like: Multibinder is not initialized The proguard.properties is set up correctly for the standard…
jakk
  • 1,193
  • 2
  • 12
  • 28
0
votes
1 answer

Get the implementation type for an interface in Guice

I'm using Guice 3 to do dependency injection. I have a particular use case where I need to know what implementation type has been bound to the interface. Is there a mechanism is Guice that allows us to do this?
Pradeep Gollakota
  • 2,161
  • 16
  • 24
0
votes
1 answer

Guice: cannot inject assisted List

I just started learning how to use Guice and I'm having some trouble trying to configure assisted injections. I have the following interface: public interface Individual extends Comparable, Iterable{ ... } It will be created by a…
Paulo Guedes
  • 7,189
  • 5
  • 40
  • 60
0
votes
1 answer

Guice Assisted Injection with custom Annotations

At the moment I use Assisted Injection with Named Parameters like this: public interface Factory { public MyObject create(@Assisted("string1") String string1, @Assisted("string2") String string2); } This works great. But I think it is a bit ugly to…
Dominik Obermaier
  • 5,610
  • 4
  • 34
  • 45
0
votes
1 answer

How to handle UnauthenticatedException with Shiro

I have a method in my resource with @RequiresGuest annotation. When logged in user hits the link it rightfully throws an UnauthenticatedException with this message Attempting to perform a guest-only operation. The current Subject is not a guest…
husayt
  • 14,553
  • 8
  • 53
  • 81
-1
votes
2 answers

Dropwizard: integration of Google Guice

I try to use dependency injection in DropWizard with Google Guice but I have a lot of problems. So I programmed a simple code like below to find the main problem. The errors are in the class Test, line :testservice.Result (10,10,10). - Syntax…
Mariem
  • 1
1 2 3 4 5 6
7