A not very sophisticated solution, but doesn't need much explanation
and gets you debugging how you want is a simple proxy servlet for each
Spring managed bean, like so:

public class PortfolioServiceProxyServlet extends RemoteServiceServlet
implements RemotePortfolioService {

    // Reference to spring managed bean.
    // The interface PortfolioService extends the interface
RemotePortfolioService.
    private PortfolioService service;

    public PortfolioServiceProxyServlet() {
        super();

        // Get a Spring application context.
        // This needs to be moved to a singleton so can be shared.
        String[] s = {"applicationContext.xml"};
        ApplicationContext context = new
ClassPathXmlApplicationContext(s);

        // Get a reference to the Spring managed bean.
        service = (PortfolioService)
context.getBean("portfolioService");
    }

    public Portfolio getPortfolioById(Integer id) throws Exception {
        try {
            // Forward to the spring managed bean.
            return service.getPortfolioById(id);
        } catch (Exception e) {
            // Ensure exceptions supported by GWT.
            throw new Exception(e);
        }
    }
}

--~--~---------~--~----~------------~-------~--~----~
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