On Tuesday, December 21, 2010 1:25:18 PM UTC+1, Sebastian wrote:
>
> Further investigation has revealed that SimpleRequestProcessor call's 
> ServiceLayer#isLive() for every non-null domain object to check if 
> it's still there. Otherwise the write operation is set to "DELETE". 
> IMO that's terrible: I don't want to do two entity manager/db lookups 
> for every "find" (even if it's aggressively cached). Using DAOs, I 
> don't even call remove() on my entities but on the DAO (and I call 
> removeById() -- I don't have a domain object in these situations!) 
>
> So providing a ServiceLayerDecorator with an overridden isLive() 
> method (returning always true) solves this part. But I still need the 
> findXxx method because of the check Henrik mentions (even if it's 
> never called). 
>
> I really appreciate the possibility to use DAOs and service locators 
> in 2.1.1 -- but unfortunately it's still not usable (for me). I don't 
> want data access methods in my domain models and I don't want 
> unnecessary db operations! And I don't want to provide a totally 
> redundant Locator for *every* domain model either... 
>
>  

> Is there any way to avoid the check for the findXxx methods?


If you really want it, yes: override all the resolveXxx on a 
ServiceLayerDecorator to totally by-pass the stock ResolverServiceLayer 
(which calls the RequestFactoryInterfaceValidator).
See also: http://code.google.com/p/google-web-toolkit/issues/detail?id=5761
(method validated with the RequestFactoryMagic and InProcessRequestTransport 
in a unit-test; and deferred-binding generator does not look like it's 
making use of the validator)

-- 
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-tool...@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.

Reply via email to