5 Replies Latest reply on Nov 25, 2008 8:40 AM by garwind111

    Using ServerInvokerServlet for Jboss Messaging

    garwind111

      Hello,

      I have a JBM application which is configureto run on HTTPS. I have to make it run behind router/firewall and use only port 8443.

      I read that it's possible to use the ServerInvokerServlet to make it run, but I didn't understand well how it works.

      I configured my servlet :

      <servlet>
       <servlet-name>ServerInvokerServlet</servlet-name>
       <description>
       The ServerInvokerServlet receives requests via HTTP protocol from
       within a web container and passes it onto the ServletServerInvoker
       for processing.
       </description>
       <servlet-class>
       org.jboss.remoting.transport.servlet.web.ServerInvokerServlet
       </servlet-class>
       <init-param>
       <param-name>locatorUrl</param-name>
       <param-value>
       sslservlet://localhost:8443/servlet-invoker/ServerInvokerServlet
       </param-value>
       <description>The servlet server invoker locator url</description>
       </init-param>
       <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
       <servlet-name>ServerInvokerServlet</servlet-name>
       <url-pattern>/ServerInvokerServlet/*</url-pattern>
       </servlet-mapping>


      Than I write a connector :

      <mbean code="org.jboss.remoting.transport.Connector"
       name="jboss.remoting:service=Connector,transport=SSLServlet"
       display-name="SSL Servlet transport Connector">
      
       <attribute name="InvokerLocator">
       sslservlet://localhost:8443/servlet-invoker/ServerInvokerServlet
       </attribute>
       <attribute name="Configuration">
       <config>
       <handlers>
       <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
       </handlers>
       </config>
       </attribute>
       </mbean>
      


      I dont undersand well how I can make my clients work with it instead of my https connector :

      <mbean code="org.jboss.remoting.transport.Connector"
       name="jboss.messaging:service=Connector,transport=https"
       display-name="HTTPS transport Connector">
       <attribute name="Configuration">
       <config>
       <invoker transport="https">
       <attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
       <attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
       <attribute name="dataType" isParam="true">jms</attribute>
       <attribute name="leasePeriod">10000</attribute>
       ...
       </invoker>
       <handlers>
       <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
       </handlers>
       </config>
       </attribute><depends>jboss.messaging:service=ServerSocketFactory,type=SSL</depends>
       </mbean>


      Does anyone can already such connector or can help me !

      Thanks.

        • 1. Re: Using ServerInvokerServlet for Jboss Messaging
          ron_sigal

          Your sslservlet Connector MBean doesn't have the same set of parameters that your https Connector MBean has; e.g., marshaller and unmarshaller, without which, JBM will not function.

          You should:

          1. Remove the InvokerLocator attribute from the sslservlet Connector MBean and replace it with the config element from the https Connector MBean (changing "https" to "sslservlet").

          2. Replace the locatorUrl init-param value in your servlet configuration with the InvokerLocator that gets generated from your sslservlet Connector. You can find the InvokerLocator printed out in the server.log

          • 2. Re: Using ServerInvokerServlet for Jboss Messaging
            ron_sigal

            The InvokerLgcator is logged at DEBUG level. If you're not getting DEBUG log messages, you can change the log level by adding

             <category name="org.jboss.remoting">
             <priority value="DEBUG"/>
             </category>
            


            to $JBOSS_HOME/server/$CONFIG/conf/jboss-log4j.xml.

            • 3. Re: Using ServerInvokerServlet for Jboss Messaging
              garwind111

              thank you for your answer. I have some difficulties to find the InvokerLocator that is generated from your sslservlet Connector.

              My clients were connecting through jndi binding. How can they connect now ?

              • 4. Re: Using ServerInvokerServlet for Jboss Messaging
                ron_sigal

                 

                "garwind111" wrote:

                I have some difficulties to find the InvokerLocator that is generated from your sslservlet Connector.


                Start up the Application Server with the servlet Connector *-service.xml file in place and look in $JBOSS_HOME/server/$CONFIG/log/server.log.

                "garwind111" wrote:

                My clients were connecting through jndi binding. How can they connect now ?


                You mean getting a queue or topic? That shouldn't change.

                By the way, I was recently reminded of JBMESSAGING-1131 "Add configuration for Remoting servlet transport". You should find some useful configuration files attached to that JIRA issue.

                • 5. Re: Using ServerInvokerServlet for Jboss Messaging
                  garwind111

                  Thanks.

                  It's a bit embarrassing, I must have this feature as fast as possible. I think I will get back to Jboss MQ. I keep these Jira request in mind, for a later retry.