On Tuesday, April 5, 2011 4:51:12 PM UTC+2, Magno Machado wrote:
>
> I'm doing my first steps on RequestFactory. I managed to make it work by 
> different ways:
> 1. implementing the service methods as static methods on the entity class
> 2. implementing the service methods as static methods on a locator class
> 3. implementing the service methods as instance methods on a locator class, 
> providing a service locator on the @Service annotation. I could even use a 
> generic service locator
>
> I want my service methods implemented on the server as instance methods, 
> but I want to avoid having to specify the service locator on all my 
> RequestContext interfaces.
>
> I thought I could do that by implementing my on ServiceLayerDecorator which 
> always returns my generic service locator class on the resolveServiceLocator 
> method but id didn't work <http://code.google.com/p/emballo/>
>

No, the RequestFactoryInterfaceValidator (used internally, but you can also 
run it from the command line) checks that interfaces and domain types match. 
If you do not give a locator in @Service/@ServiceName, it'll check that 
methods are indeed static.
It's possible to bypass the RequestFactoryInterfaceValidator but I wouldn't 
recommend it, particularly if this is your only use-case: you shouldn't have 
that many RequestContext-s in your app, so it shouldn't be an issue to put a 
locator in the @Service/@ServiceName.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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-web-toolkit?hl=en.

Reply via email to