We inherited a codebase that has Guice on the server side supporting
GWT code on the client side. While we have the basic 'handler'
mappings, the rest of the server side still heavily relies on
singletons and factories. I am in the initial steps of converting
things over.
I have a file uploading servlet that needs to maintain a map of
uploaded files per user session. It also needs to read some properties
from a .properties file.
I am injecting a 'propertyreader' instance into the servlet
@Inject
public FileUploadServlet(PropertyReader propertyReader) {
............
The servlet is bound in a servlet module.
bind(FileUploadServlet.class).in(Singleton.class);
serveRegex("/.gupld").with( FileUploadServlet.class );
I am getting instantiation exceptions on GET requests. Technically, it
should be a singleton and new requests shouldn't attempt to create new
instances of this object, right?
What am I doing wrong?
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice?hl=en.