Am Sonntag, 16. Juni 2013 23:52:08 UTC+2 schrieb Thomas Broyer:
>
>
>
> On Friday, June 14, 2013 5:55:03 PM UTC+2, Nermin wrote:
>>
>> Hello Thomas,
>>
>> Open Session In View is the right approach to go for. Thank you for this 
>> advice!
>> I have implemented it and it works fine now.
>>
>> However, I have one question regarding OSIV-Pattern: 
>> In the Hybernate example (see link below) they *begin transaction*before 
>> doFilter() and 
>> *commit on transaction* after it.
>> https://community.jboss.org/wiki/OpenSessionInView
>>
>> I am using standard GWT setting with DataNucleus. For some reason it does 
>> not let me call em.getTransaction().begin(); and 
>> em.getTransaction().commit(); within the filter.
>> In my current implementation I can *create EntityManager* before 
>> doFilter()  and *close it* afterwards (this works), but cannot commit 
>> nor rollback transaction
>>
>
> You *should* do that (create EntityManager and close it in filter; 
> begin/commit transactions in each service method)
>
> I'll see if I can improve the documentation. Feel free to propose patches 
> yourself though: http://www.gwtproject.org/makinggwtbetter.html#webpage
>

Thank you for your reply and the link, which is one of the best GWT 
references I have see so far on the net. ... GREAT WORK!
My code works fine now thanks to OSIV-pattern.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to