On Tue, Oct 28, 2008 at 2:08 PM, Timothy Braje <[EMAIL PROTECTED]> wrote:
> 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 It might do, but that would violate the interface contract. We discussed this in another thread and particularly why we decided not to do it for warp-persist. https://groups.google.com/group/google-guice/browse_thread/thread/8db9ae9c20ec8a32/378a584ca746367c?lnk=st&q=scoped+proxy+guice+entitymanager#378a584ca746367c Dhanji. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
