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

downloading guice3.0 artifact from maven central repository

I'm trying to upgrade my struts2 web app from guice2.0 to guice3.0. I'm trying to test it out using maven jetty. I've successfully upgraded my pom.xml to use the correct version and groupId for the 3.0 release, but if I call mvn jetty:run I see…
Sumit
  • 1,661
  • 1
  • 13
  • 18
0
votes
1 answer

Guice -How to inject dependency inside the class which is extending Abstract module - Java

I have to trigger TestDriver.startPoller() from EnvironmentModule since EnvironmentModule is extending from Abstractmodule I am not sure how to inject dependency inside EnvironmentModule is it even possible ?. If not how do I trigger …
Jeya Kumar
  • 1,002
  • 1
  • 13
  • 36
0
votes
0 answers

Guice binding for generic types not working with ".class"

I am trying to bind a Generic class dependencies using Guice public class Myclass { @Inject public Myclass(Class clazz) { ... } } I am trying to create a Myclass> but the binding fails for me private static…
user1918858
  • 1,202
  • 1
  • 20
  • 29
0
votes
1 answer

Gettting WELD Exception on server startup of weblogic where as using Google Guice for DI in Jersey based application

I am using Weblogic 12b as App server. My application uses Jersey 2.5.1 with Guice3 in my project. I have a class called Application derived from org.glassfish.jersey.server.ResourceConfig. On server startup I am getting error as below: Caused By:…
0
votes
0 answers

Guice configuration errors:No implementation for xxx was bound

My handler class: public class Handler { private final IStore dataStore; @Inject @Singleton public Handler(IStore dataStore) { this.dataStore = dataStore; } } } My interface class: public interface…
Fisher Coder
  • 3,278
  • 12
  • 49
  • 84
0
votes
1 answer

Creating an instance using factory with assisted parameters throws exception with Google Guice

I have an interface with two implementations public interface JobConfiguration { void execute(); } DecryptJobConfiguration: public class DecryptJobConfiguration implements JobConfiguration { @Inject public…
infojolt
  • 5,244
  • 3
  • 40
  • 82
0
votes
0 answers

Get Filters order at runtime

I'm using Tomcat, but i'd like to go for a generic way (servlet 3.0) I have some configured filters in the web.xml and one of these is the GuiceFilter. GuiceFilter is a a little bully...once it get executed it will swallow the request and never call…
lelmarir
  • 593
  • 2
  • 7
  • 24
0
votes
0 answers

Using arquillian with Google Guice 4.0 and JSF 2.2

I would like to use arquillian to do some more specific tests. The application is a jsf 2.2 web application which uses google guice 4.0 for DI. In my web.xml i've defined a custom injection provider:
user3726033
  • 125
  • 2
  • 10
0
votes
1 answer

Guice Merge Collection between AbstractModules

I have a couple modules A extends AbstractModule B extends AbstractModule Which are used to provide class C. class C { @Inject List components; } That class C can use A, B or both to be instantiate with a specific…
paul
  • 12,873
  • 23
  • 91
  • 153
0
votes
1 answer

Inject custom logic in Guice binding process

Is there a way to implement kind of before and after hook in Guice binding? E.g. before Guice calling a constructor to get the instance to be injected into a method, can I provide a logic check if the instance is already existed somewhere, if I can…
Gelin Luo
  • 14,035
  • 27
  • 86
  • 139
0
votes
1 answer

Implementation of Google guice does not work

I am a beginner lerner of Google guice. I have programmed like below to insert in Oracle and postgres db, I have posted a very simple coede here but, when I run this I am getting an error as Exception in thread "main"…
New Bee
  • 390
  • 3
  • 10
0
votes
1 answer

Dynamodb Range query gives limited number of results

I'm trying to implement application using google guice framework with dynamodb database. I have implemented API for finding documents by range query the result set is not updating with new records. The number of records are always same. How we can…
Prashant Biradar
  • 301
  • 5
  • 14
0
votes
1 answer

Guice Singleton and Constructor Exceptions

I have a @Singleton class that loads some data from a database. The Singleton is loaded during bootstrap, however the constructor throws an exception from the DAO data loading class. I never see this exception, I assuming because Guice's singleton…
shawnjohnson
  • 375
  • 6
  • 19
0
votes
0 answers

Update @Named("someproperty.key") Runtime

I am using Guice 3.0. I have used Names.bindProperties() to bind a property file key and values. However, my requirement is that, at run time if i change the property value for a Named key, it should be bound automatically through a Scheduler or…
0
votes
1 answer

Guice in Android without Use Roboguice, good choice?

I have been using Roboguice for a while but as I see the source code in github, it has a lot of unnecessary stuff that I am not typically use it or need it, so I decided to start working only with Guice. The only drawback with this is that I need to…
Nicolas Jafelle
  • 2,661
  • 2
  • 24
  • 30