I could be wrong but doesn't spring give you a proxy EntityManager, which
behind the scenes works like your provider?

On Mon, Oct 27, 2008 at 8:00 PM, Dhanji R. Prasanna <[EMAIL PROTECTED]>wrote:

>
>
> On Tue, Oct 28, 2008 at 1:50 PM, Timothy Braje <[EMAIL PROTECTED]>wrote:
>
>> On Monday 27 October 2008 20:08:44 Dhanji R. Prasanna wrote:
>> > On Tue, Oct 28, 2008 at 1:06 PM, Timothy Braje <[EMAIL PROTECTED]>
>> wrote:
>>
>
> <snip>
>
>>
>>
>> Good point, but I remember having to do more work in the content of the
>> method, dealing with transactional semantics.
>
>
> No, you don't even need the @Transactional annotation (you can use Spring's
> or EJB's or none at all).
>
>
>>  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.
>
> >
>

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