2 Replies Latest reply on Nov 3, 2006 4:01 PM by tom.elrod

    JBoss Remoting with AJAX?

    vivash

      We have a web client and trying to look for a remoting technology that would provide both asynchronous and callbacks. I've been playing around with JBoss Remoting a little and looks pretty interesting. I don't know if this makes sense, but here are some of the questions,

      1) Is there any comparison between JBoss Remoting vs AJAX - performance wise?

      2) From what I've read JBoss Remoting already provides asynchronous and callback features, then why would one require AJAX when using remoting?

      3) Can AJAX be used in conjunction with JBoss Remoting - how would it help?

      4) Is there any good example on how to use JBoss Remoting over http for a web application? I've already successfully tried using Transporter in a stand-alone application - how can I convert that to use it in a web application?

      Thanks.

        • 1. Re: JBoss Remoting with AJAX?
          ron_sigal

          Hi,

          I personally don't know anything about AJAX, so I can't comment on 1), 2), or 3) except to say that Remoting does indeed support asynchronous calls and callbacks. In fact, the API may be extended in this area for the next release.

          As for 4), look into org.jboss.remoting.transport.servlet.web.ServerInvokerServlet and org.jboss.remoting.transport.servlet.ServletServerInvoker. The former is a servlet which transmits invocations to the latter.

          I'm not aware of a good example. Would you like to be the first to contribute one?

          • 2. Re: JBoss Remoting with AJAX?

            AJAX and JBoss Remoting are totally different animals, so very difficult to comare the two. AJAX is all about adding dynamic interaction within a web browser using scripting (i.e. update areas within a web page dynamically, which is often done via server calls underneath, etc.) to a model that has traditionally been static (i.e. load page, send request to server, re-load whole page).

            Basically the only way to have JBoss Remoting running in a similar fashion would be to have an applet running within a browser, but frankly seems silly to do this just to be able to make client server invocations.

            It would be possible to use JBoss Remoting with the http transport protocol on the server side to handle http requests from any client (i.e. web browser) and org.jboss.remoting.samples.http.WebInvocationHandler within the samples shows how to do this. However, if doing anything complicated, probably best to use a full fledge web container like Tomcat that handles web deployments (i.e. war files) so can do all the standard web application configuration.

            If wanting to just make simple http requests to a third party web server, can use JBoss Remoting with the http transport for the client invocation. The org.jboss.remoting.samples.http.SimpleClient class within the remoting samples illustrates how to do this as well.