Status: New
Owner: ----

New issue 334 by gili.tzabari: Inconsistent documentation and  
implementation for ServletModule
http://code.google.com/p/google-guice/issues/detail?id=334

This is a follow-up of
http://groups.google.com/group/google-guice/browse_thread/thread/bcb8f9c4d35cfe6b

ServletModule.configureServlets()'s Javadoc reads "Every servlet is
required to be a singleton and will implicitly be bound as one if it isn't
already."

1) This conflicts with the actual implementation. Servlets aren't being
bound to singleton scope by default.

2) This should be consist across both servlets and filters. That is, the
documentation should state the same thing for filters.

3) This conflicts with what
http://code.google.com/p/google-guice/wiki/ServletModule says "Note: Every
servlet (or filter) is required to be a @Singleton. If you cannot annotate
the class directly, you must bind it separtely using
bind(..).in(Singleton.class), separate to the filter() or servlet() rules."

Personally, I prefer the approach of #1. Servlets and filters should be
bound as singletons unless the user specifies otherwise (which will trigger
an error since this is illegal).

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" 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-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to