I have solved the problem. Tunneling is not strictly required here, since
existed comet implementations transparently use "Load the JSON response into
a <script> tag" technique, that allows to manage cross-site comet connection
automatically.


On Tue, Jun 8, 2010 at 4:43 PM, Xasima <[email protected]> wrote:

> Hello. I have already a gwt application and an actual REST service. They
> are deployed on different servers (different ports/subdomains).
> I have successfully tunnelled GWT REST (restlet-gwt) requests to external
> REST  with the help of Redirector (see code below).
> Currently I want to perform the same with comet connections (atmosphere-gwt
> + atmosphere). I want to use Restlet (Redirector/Tunnel Service) to tunnel
> comet connections as well.
>
> Is Redirector supposed to tunnel COMET connections? What needs to be
> changed?
>
> ----------
>
> public class Tunnelling extends Application {
>     public org.restlet.Restlet createInboundRoot() {
>         Redirector redirector = new Redirector(getContext(),
> "http://myserverurl:8080{rr}";,
>                 Redirector.MODE_SERVER_OUTBOUND);
>         return redirector;
>     };
> }
>
>     <servlet>
>         <servlet-name>Rest Adapter</servlet-name>
>
> <servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
>         <init-param>
>             <param-name>org.restlet.application</param-name>
>             <param-value>com.example.gwt.server.Tunnelling</param-value>
>         </init-param>
>         <init-param>
>              <param-name>org.restlet.clients</param-name>
>              <param-value>HTTP</param-value>
>         </init-param>
>     </servlet>
>
>     <servlet-mapping>
>         <servlet-name>Rest Adapter</servlet-name>
>         <url-pattern>/rest/*</url-pattern>
>     </servlet-mapping>
>
>
>
> --
> Best regards,
>     ~ Xasima ~
>



-- 
Best regards,
    ~ Xasima ~

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2621606

Reply via email to