Uploaded image for project: 'JBoss Messaging'
  1. JBoss Messaging
  2. JBMESSAGING-1131

Add configuration for Remoting servlet transport

    Details

      Description

      In addition to the "http" transport, Remoting also has the http-based "servlet" transport. The servlet transport is the same as the http transport on the client side (they both use org.jboss.remoting.transport.http.HTTPClientInvokr), but they are different on the server side. In particular, CoyoteInvoker, the http transport server invoker, uses the network layer of tomcat/jbossweb, i.e., a ServerSocket with worker threads. But in the servlet transport, a org.jboss.remoting.transport.servlet.web.ServerInvokerServlet fields invocations and passes them to org.jboss.remoting.transport.servlet.ServletServerInvoker. The advantage, which came up in a forum thread recently (http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4098850#4098850 and http://www.jboss.com/index.html?module=bb&op=viewtopic&t=122218 ), is that only one ServerSocket is used. In principle, it's the appropriate transport to use when the server is running inside JBossAS. In fact, the wiki page "Accessing_EJB3s_over_HTTP_HTTPS" shows how to change the EJB3 transport from socket to servlet. However, there have been a couple of problems. For one, ServletServerInvoker has been a little behind CoyoteInvoker in its development, though I've been rectifying that (JBREM-675 "Problems with Servlet invoker"). For another, the servlet transport needs tomcat/jbossweb for unit testing, and we've never automated that, so it's not as well tested as CoyoteInvoker (JBREM-139 "need automated test for servlet server invoker"). However, I wanted to verify that JBossMessaging can run with the servlet transport, so I created a servlet example, parallel to the http example, along with the supporting configuration files, and it works.

        Gliffy Diagrams

          Attachments

          1. build.xml
            5 kB
          2. code_changes.zip
            14 kB
          3. messaging-servlet-service.xml
            0.8 kB
          4. remoting-servlet-service.xml
            2 kB
          5. ServletExample.java
            5 kB
          6. web.xml
            2 kB

            Issue Links

              Activity

                People

                • Assignee:
                  gaohoward Howard Gao
                  Reporter:
                  ron_sigal Ronald Sigal
                • Votes:
                  6 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: