On Monday 27 October 2008 21:00:19 Dhanji R. Prasanna wrote:
<snip>
> >  Also, if I remember correctly,
> > you have to inject a Provider<EntityManager> and then a emProvider.get()
> > rather than just em.<callmethod>.
>
> You would have the same problem with Spring, EJB and @PersistenceContext.
> It's just that their tutorials assume you aren't using a singleton and ours
> do (hence, the provider =)
>
> Dhanji.
 
Actually, I believe Spring does assume a singleton.  I think that the Spring 
implementation creates a proxy object for the EntityManager, so it is, in 
essence, transparently using provider-like semantics while keeping the simpler 
syntax.  Perhaps one could argue there is not much benefit in this, but it does 
feel kind of nice.

Tim

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

Reply via email to