Yeah, i see. You implement manual version control in your project.
But, I decided to use RF in my project to forget about transmission domain
objects between server and client.
In general, it is unclear why the guys at Google have made the RF this way.
On Wednesday, June 10, 2015 at 2:51:48
On Wednesday, June 10, 2015 at 12:21:03 PM UTC+2, Anton Mityagin wrote:
In general, it is unclear why the guys at Google have made the RF this way.
If you look at the changes between the various milestones and RCs of GWT
2.1, and then 2.1.1 and 2.2, you'll see that RF is totally different
Undoubtedly, RF - greate thing. I use it and plan to continue to use.
The more that I get to make workaround for those things that do not exist
in RF.
Just very strange that such a good thing as RF does not support such basic
things like optimistic locking, refire request after excpetion.
We made a similar approach using the client/server version variables. But
we call it version/expectedVersion.
class MyEntity {
@Version int version;
public int getExpectedVersion() { return null; }
public void setExpectedVersion(int v) { this.version = v; }
public int getVersion() { return
Thanks for your comment
On Tuesday, June 9, 2015 at 10:12:10 PM UTC+3, Ignacio Baca Moreno-Torres
wrote:
We made a similar approach using the client/server version variables. But
we call it version/expectedVersion.
As explained in stackoverflow
We don't use RequestFactory but GWT-RPC with Eclipselink + optimistic
locking and heavy auto saving. Because we don't want to live with the extra
query when doing the em.find / detach / update version / merge dance we
simply do the version check manually in the app. Also we don't send
versions
IMO using attached entities in RF is dangerous because in hibernate any
committed transaction will persist any previous change in the current
context. So, if you are using per-request entityManager, whenever you call
transaction.commit you will persist any modification sent from the client
As all you know RequestFactory does not support optimistic locking.
see
details https://code.google.com/p/google-web-toolkit/issues/detail?id=6046
I tried to implement it для RequestFactory + Spring + JPA + Hibernate
I took as a basis the idea proposed by
Thomas