Re: is RequestFactory and/or the Editor framework rendering the JPA optimistic locking useless?

2011-03-08 Thread Jens
Thanks for your bug report. I have recently checked our RF code and run into 
this issue. Hopefully this issue gets a higher priority (we need more 
stars!) soon as it makes RF nearly useless and I guess many people doesn't 
recognize that RF currently does no version check and just overwrite 
everything. Especially as version checking is officially mentioned 
in 
http://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideRequestFactory.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: is RequestFactory and/or the Editor framework rendering the JPA optimistic locking useless?

2011-02-18 Thread JosephLi
Thanks Thomas for taking the time to open a ticket and responded so
quickly.

Thanks again.
Joseph


On Feb 18, 7:32 pm, Thomas Broyer  wrote:
> Had the very same thoughts, so I opened an 
> issue:http://code.google.com/p/google-web-toolkit/issues/detail?id=6046
>
> I can only tell you that it *was* present in early versions of
> RequestFactory, but has been removed at some point in time before the 2.1.0
> release.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: is RequestFactory and/or the Editor framework rendering the JPA optimistic locking useless?

2011-02-18 Thread Thomas Broyer
Had the very same thoughts, so I opened an issue: 
http://code.google.com/p/google-web-toolkit/issues/detail?id=6046

I can only tell you that it *was* present in early versions of 
RequestFactory, but has been removed at some point in time before the 2.1.0 
release.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



is RequestFactory and/or the Editor framework rendering the JPA optimistic locking useless?

2011-02-18 Thread JosephLi
I am thinking more likely the RequestFactory is rendering optimistic
locking useless. The project is created with Roo with DataNucleus  &
GWT. I wiped out all the generated stuff out and use the resulting
Maven build as a starting point. I have been able to get a simple
entity going and have a simple Editor allowing modifications and
retrieval/update via RequestFactory.

In the app I have been able to pile up newly generated Editor with the
same entity, then change the same field one at a time and save it.
Doing so I was hoping the backed JPA stack will give me an exception
complain about update using a stale version. But to my surprise it
isn't doing it. It just happily updated the record and bump up the
version field by one without problem.

Looking at the TCPIP trace, requestFactory's request is indeed only
sending the modified field over the wire. So that means the
RequestFactoryServlet must be quietly loading the current version of
the entity from the db and "merge" the partial-update to construct the
entity object that later passed to the persist method the caller
instructed. Thus, the version would be fine even if the request was
generated based on a staled but modified version of the entity.

So my question to the GWT team, will this be fixed/changed? Or at
least make it a configurable option that requestFactory will
communicate and check the version automatically to ensure the
optimistic locking works?


Thanks,
Joseph

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.