2 Replies Latest reply on Feb 17, 2013 8:16 AM by Wolf-Dieter Fink

    EJB3 RMI via HTTP/s

    underflyer Newbie

      hi,

       

      I'm porting my EJB3_APP from JBoss6 to JBoss AS 7.

       

      I've seen these two awesome Articles:

      https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI

      https://docs.jboss.org/author/display/AS71/Remote+EJB+invocations+via+JNDI+-+EJB+client+API+or+remote-naming+project

      these are very helpful ;-) thanks

       

      I'm using my ejb3_app from locations where non-http traffic and other TCP-Ports are not accessible (e.g. 4447). These are locations behind a http-proxy (TCP Ports 80 / 443). On JBoss AS 6 I had an http-invoker Servlet for everything: JNDI-Lookup, EJB3-RMI, ...

      https://access.redhat.com/knowledge/docs/en-US/JBoss_Enterprise_Application_Platform/5/html/Security_Guide/EJB3_RMI_HTTPS.html

       

      So everything seems to be http-traffic for the HTTP-Proxy.

       

      Does this still work on JBoss AS 7?

       

      Best Regards

        Dirk R.

        • 1. Re: EJB3 RMI via HTTP/s
          Wolf-Dieter Fink Master

          Not at the moment.

          See AS7-4714, you may vote and watch it.

          1 of 1 people found this helpful
          • 2. Re: EJB3 RMI via HTTP/s
            underflyer Newbie

            a little update,

             

            i simply tried the the same:

            https://access.redhat.com/knowledge/docs/en-US/JBoss_Enterprise_Application_Platform/5/html/Security_Guide/EJB3_RMI_HTTPS.html

             

            on my JBoss AS 7

             

            thats my output:

             

            13:55:09,117 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "servlet-invoker-service.xml"
            13:55:09,120 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."servlet-invoker-service.xml".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."servlet-invoker-service.xml".PARSE: Failed to process phase PARSE of deployment "servlet-invoker-service.xml"
                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
            Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017224: Failed to parse service xml ["/content/servlet-invoker-service.xml"]
                    at org.jboss.as.service.ServiceDeploymentParsingProcessor.deploy(ServiceDeploymentParsingProcessor.java:95)
                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
                    ... 5 more
            Caused by: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)
                    at com.ctc.wstx.sr.BasicStreamReader.throwNotTextual(BasicStreamReader.java:5444)
                    at com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:833)
                    at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.getText(XMLExtendedStreamReaderImpl.java:275)
                    at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.unexpectedContent(JBossServiceXmlDescriptorParser.java:622)
                    at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.parseMBean(JBossServiceXmlDescriptorParser.java:212)
                    at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.readElement(JBossServiceXmlDescriptorParser.java:183)
                    at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.readElement(JBossServiceXmlDescriptorParser.java:46)
                    at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
                    at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
                    at org.jboss.as.service.ServiceDeploymentParsingProcessor.deploy(ServiceDeploymentParsingProcessor.java:88)
                    ... 6 more
            
            13:55:09,154 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment servlet-invoker-service.xml in 4ms
            13:55:09,151 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "servlet-invoker-service.xml" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"servlet-invoker-service.xml\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"servlet-invoker-service.xml\".PARSE: Failed to process phase PARSE of deployment \"servlet-invoker-service.xml\""}}
            13:55:09,164 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
            JBAS014777:   Services which failed to start:      service jboss.deployment.unit."servlet-invoker-service.xml".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."servlet-invoker-service.xml".PARSE: Failed to process phase PARSE of deployment "servlet-invoker-service.xml"
            
            13:55:09,171 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"servlet-invoker-service.xml\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"servlet-invoker-service.xml\".PARSE: Failed to process phase PARSE of deployment \"servlet-invoker-service.xml\""}}}}
            

             

            this is my servlet-invoker-service.xml

             

            <?xml version="1.0" encoding="UTF-8"?>
            
            
            <server>
            
            
              <mbean code="org.jboss.remoting.transport.Connector" name="jboss.remoting:service=connector,transport=servlet"
                display-name="Servlet transport Connector">
                <attribute name="InvokerLocator">servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet</attribute>
                <attribute name="Configuration">
                  <handlers>
                    <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
                  </handlers>
                </attribute>
              </mbean>
            
            </server>
            
            

             

            thats my servlet-invoker.war/WEB-INF/web.xml:

             

            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE web-app PUBLIC
               "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
               "http://java.sun.com/dtd/web-app_2_3.dtd">
            
            
            
            <web-app>
                <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>servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet</param-value>
                        <description>The servlet server invoker</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>
            
            </web-app>
            
            

             

            thanks for any help/advise

            Dirk R.