Hi Joseph,

We are using RequestFactory for most of our calls to the services layer. 
 We do use GWT-RPC for calls to our Solr/Lucene service, but that's it. 
 Our projects seems to be setup correctly (with the changes suggested by 
Thomas), but we still have a few hiccups (highlighted in my previous post). 
 We actually have a fork of our project doing just what you said, but with 
moving the interfaces into their own package which is referenced in a 
module instead of an entirely new project.  Both projects are at the same 
point however...

It is great to know there is another big project out there though! 
 Sometimes I wonder if we are alone ;)   I don't suppose you are also using 
aspectJ instead of proxy based transactions?  We've had a hell of a time 
with aspectj and it seems to have slowed our environments down a lot 
(around compiling).  Anyway, off-topic ;)


/c

On Thursday, 10 May 2012 12:06:09 UTC-3, Joseph Lust wrote:
>
> Christien,
>
> On our project which is about the size of yours, we have an *Interfaces* 
> Maven 
> project. Our GWT project makes no direct references to the Services project 
> and visa versa. This way the issue of making the sources available is a 
> non-issue. We use Spring4GWT <http://code.google.com/p/spring4gwt/> to 
> wireup GWT->Service RPC calls using the interfaces in the Interfaces 
> project. Thus the build order is (1) Interfaces, (2) GWT, (3) Services.
>
> So there is an interface for the service in the Interface project
>
> @RemoteServiceRelativePath("springGwtServices/marketService")
> public interface MarketService extends RemoteService {
>
>
> MarketDTOContainer getMarketData(Date begin, Date end)
>  
>
>
> So a GWT module references an async interface seen below. Now you can 
> access your service just fine from GWT.
> This interface has all the methods of the above interface, but the return 
> value is wrapped in an async callback.
>
> public interface MarketRiskServiceAsync {
>
> void getMarketData(Date begin, Date end, AsyncCallback<MarketDTOContainer> 
> async);
>
>  ..
>
>
> The actual service uses an annotation to tell Spring where to find it for 
> wireup with a name matching that in the interface.
>
> @Service("marketService")
> public class MarketServiceImpl implements MarketService { ...
>
>
> There is a one off config to setup the servlet mappings:
>
>     <servlet>
>         <servlet-name>springGwt</servlet-name>
>         
> <servlet-class>org.spring4gwt.server.SpringGwtRemoteServiceServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>springGwt</servlet-name>
>         <url-pattern>springGwtServices/*</url-pattern>
>     </servlet-mapping>
>
>
> Clearly your project is well along, but you might find this pattern 
> useful. While it looks like a lot of interfaces, in many cases we just add 
> another method to a service interface and we're done. We also like the 
> DTOContainer patter since we can pass another parameter along with an 
> existing request by just adding it to the container class. 
>
> Hope this helps you or others with similar issues.
>
> Sincerely,
> Joseph
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/wY8TLghbv8cJ.
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