Comment by [email protected]:

"Note that if you make MyService a @Singleton, then you should inject Provider<EntityManager> instead."

When should MyService be a singleton? If I am using the DAO without state, i.e. injecting it into my Servlets for processing through a Provider, should it be a one and done created object? I am creating a new one each time, but have noticed that on message boards people say to make the DAO Services singletons, is that right?

For more information:
http://code.google.com/p/google-guice/wiki/JPA

--
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