14 Replies Latest reply on Sep 19, 2007 4:17 AM by marcreis

    Problem calling EJB3 method via HTTP only

    formica

      I have a problem in testing remote method calls via http using JBOSS 4.2.0.GA application server.

      I want to call EJB3 methods via HTTP ONLY (I have a firewall problem, as usual ;-) )

      (REMARK: using simple RMI and adequate JNDI parameter the client
      code is working correctly...)

      Following many forums/doc/wiki pages I have ended up with a configuration of the following type:

      SERVER SIDE:
      1) I have modified ejb3.deployer/META-INF/jboss-service.xml in the following way:

       <mbean code="org.jboss.remoting.transport.Connector"
       name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
       <depends>jboss.aop:service=AspectDeployer</depends>
       <attribute name="InvokerLocator">servlet://${jboss.bind.address}:8080/invoker/EJBInvokerServlet</attribute>
       <attribute name="Configuration">
       <handlers>
       <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
       </handlers>
       </attribute>
       </mbean>
      


      2) I have slightly modified the http-invoker.sar/META-INF/jboss-service.xml adding the the following lines to the 3 relative MBEAN definitions:

      
      <attribute name="InvokerURL">http://${jboss.bind.address}:8080/invoker/EJBInvokerServlet</attribute>
      .....
      <attribute name="InvokerURL">http://${jboss.bind.address}:8080/invoker/JMXInvokerServlet</attribute>
      .....
      <attribute name="InvokerURL">http://${jboss.bind.address}:8080/invoker/readonly/JMXInvokerServlet</attribute>
      
      


      3) I have modified the conf/standardjboss.xml config file like :

       <invoker-proxy-binding>
       <name>stateless-http-invoker</name>
       <invoker-mbean>jboss:service=invoker,type=http</invoker-mbean>
       <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
       <proxy-factory-config>
       <client-interceptors>
       <home>
       <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
       <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
       <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
       <interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor>
       <interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor>
       </home>
       <bean>
       <interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor>
       <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
       <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
       <interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor>
       <interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor>
       </bean>
       </client-interceptors>
       </proxy-factory-config>
       </invoker-proxy-binding>
      


      and the container part accordingly

       <container-name>Standard Stateless SessionBean</container-name>
       <call-logging>false</call-logging>
       <invoker-proxy-binding-name>stateless-http-invoker</invoker-proxy-binding-name>
       .....
      


      4) I have added the following annotation to my stateless session

      
      //@RemoteBinding(jndiBinding="AsapServer/OltestlinesDAOBean/remote")
      @RemoteBindings({
       @RemoteBinding(jndiBinding="AsapServer/OltestlinesDAOBean/remote"),
       @RemoteBinding(clientBindUrl="servlet://localhost:8080/invoker/EJBInvokerServlet",
       jndiBinding="AsapServer/OltestlinesDAOBean/http")
      })
      
      


      and finally...

      CLIENTSIDE
      5) I have defined the following JNDI properties for the connection :

      java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory java.naming.provider.url=http://$host:$port/invoker/JNDIFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      
      where host/port are : localhost/8080 or 127.0.0.1/8080
      


      Now, I get correctly the stub to the session bean in my client, and I
      managed to execute the method, but the method execution itself fails
      with the following exception from the server:

      2007-05-25 16:20:50,986 DEBUG [org.jboss.invocation.http.servlet.InvokerServlet] Invoke threw exception
      java.lang.ClassCastException: org.jboss.remoting.InvocationRequest
       at org.jboss.invocation.http.servlet.InvokerServlet.processRequest(InvokerServlet.java:137)
       at org.jboss.invocation.http.servlet.InvokerServlet.doPost(InvokerServlet.java:224)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:613)
      


      while the client sees the following :

      getting stub for beanName OltestlinesDAO
      obj looked up in OltestlinesDAO/http
      
      java.lang.ClassCastException: java.lang.String
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:103)
       at $Proxy2.findOlsLike(Unknown Source)
       at asap.client.delegate.OpticallineDBJboss.listOpticallines(OpticallineDBJboss.java:82)
       at asap.client.delegate.OpticallineDBJboss.main(OpticallineDBJboss.java:202)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:103)
       at $Proxy2.findOlsLike(Unknown Source)
       at asap.client.delegate.OpticallineDBJboss.listOpticallines(OpticallineDBJboss.java:82)
       at asap.client.delegate.OpticallineDBJboss.main(OpticallineDBJboss.java:202)
      Exception in thread "main" java.lang.NullPointerException
       at asap.client.delegate.OpticallineDBJboss.main(OpticallineDBJboss.java:203)
      


      Could you please explain me what is going on ? I'll try to post the message also in Remoting forum...

      Andrea

        • 1. Re: Problem calling EJB3 method via HTTP only
          marcreis

          Hi,
          I just wanted to mention that my intent to let the ejb3's communicate over http had the same result.
          My configuration is basically the same (I have not altered the http-invoker.sar's jboss-service.xml, have a bit different conf/standardjboss.xml an used one annotation for each binding instruction).
          The result is identical.

          Sincerely
          Marc

          • 2. Re: Problem calling EJB3 method via HTTP only
            marcreis

            Hello again,
            I just wanted to post some more detail to this. Hope this is ok, since we both have the same exception...
            I have debugged the client part and had a look at the server source.

            The Server throws an exception when it casts in the following lines
            ?(MarshalledInvocation) ois.readObject()?:

            // Get the invocation from the post
             ServletInputStream sis = request.getInputStream();
             ObjectInputStream ois = new ObjectInputStream(sis);
             mi = (MarshalledInvocation) ois.readObject();
             ois.close();
            

            This happens in the org.jboss.invocation.http.servlet.InvokerServlet as the exception states.

            On my Client side I stepped into it at the org.jboss.aspects.remoting.InvokerRemoteInterceptor around line 62
            try
             {
             client.connect();
             org.jboss.aop.joinpoint.InvocationResponse response = (org.jboss.aop.joinpoint.InvocationResponse)client.invoke(invocation, null);
             invocation.setResponseContextInfo(response.getContextInfo());
             return response.getResponse();
             }
            


            As far as I can tell with my humble knowledge, going through the interceptor chain and peeking at the values, it all seemed ok.

            The Object to pass (invocation) is of org.jboss.aop.joinpoint.Invocation (actually a MethodInvocation). In the MicroRemoteClientInvoker the Marshaller?s are set to HTTPMarshaller and HTTPUnMarshaller and it sets the payload to the invocationReq. After the calls of the HTTPClientInvoker it returns the response, which holds nonsense (the server throws the error when processing the request at the above mentioned line when casting).

            The Result is made up of 27 chars: "’##sr#$org.jboss.invocatio". The #'s here replaces the control characters. Casting this results obviously leads to the mentioned client exception (java.lang.ClassCastException: java.lang.String).

            So it seems that for some reason reading from the input stream on the server side results in an object which cannot be interpreted into the expected MarshalledInvocation. Unfortunately, I have not had time to debug the server?

            Sincerely
            Marc

            • 3. Re: Problem calling EJB3 method via HTTP only
              formica

              First of all, thanks a lot for your replies Marc!

              I have progressed a little bit in my understanding, and I think I managed to get a working system, so I want to describe to you what I have done. If experts are around they could may be comment on the procedure.

              Starting from the beginning:
              - I need to access a JBOSS 4.2.0GA stateless session bean from a remote
              client.
              - my client being behind a firewall I decided to pass my invocations via http, but I need to be sure that is http only !

              Reading forums + doc I have done the following changes to a standard jboss installation (on a "server" machine).

              1) I have added servlet-invoker.war from the jboss remoting 2.0 package (copy the war in deploy dir), performing the following modification in the config file WEB-INF/web.xml:


               <param-name>locatorUrl</param-name>
               <param-value>servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet</param-value>
               <description>The servlet server invoker locator url</description>
              


              2) I have added a Connector using a xxx-service.xml file that I have created and put in /server/default/deploy

              <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">
               <config>
               <handlers>
               <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
               </handlers>
               </config>
               </attribute>
               </mbean>
              </server>
              


              Now I start jboss running with option -b :
              run.sh -b myhost.domain.name
              


              I think this is important in order to associate the hostname to the variable jboss.bind.address, so to avoid ip number substitutions that would have a bad effect on the firewall....

              3) I have installed on the same jboss-server machine a Squid proxy server, configured to listen to port 3128 with the appropriate acl (see Squid documentation)

              4) I have forwarded the 3128 port into localhost 13128 using ssh tunneling (-L options)

              5) now I can for example access the JMX console if I configure in my web browser the proxy server to be localhost 13128

              6) I run the client program using in java command line the options:

              java -Dhttp.proxyHost=localhost -Dhttp.proxyPort=13128 xxxx
              


              and it works !

              Now my question is :
              Could I avoid to use an external proxy server ?

              Andrea

              • 4. Re: Problem calling EJB3 method via HTTP only
                formica

                I forgot one very important information:
                I have an annotation on stateless session bean of the type

                @RemoteBinding(clientBindUrl="servlet://myhost.domain.name:8080/servlet-invoker/ServerInvokerServlet",
                 jndiBinding="AsapServer/OpticallinesDAOBean/http")
                


                As you can see I have a problem here because I'm using hostname hardcoded in the annotation, I do not know yet if I can use the jboss.bind.address variable here, but I doubt it !!

                A.

                • 5. Re: Problem calling EJB3 method via HTTP only
                  formica

                  Just for info, I made a test using in the annotation the variable jboss.bind.address and the client fails with the following:

                  org.jboss.remoting.transport.http.WebServerError: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><TITLE>ERROR: The requested URL could not be retrieved</TITLE><STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE></HEAD><BODY><H1>ERROR</H1><H2>The requested URL could not be retrieved</H2><HR noshade size="1px"><P>While trying to retrieve the URL:<A HREF="http://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet">http://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet</A><P>The following error was encountered:<UL><LI><STRONG>Invalid URL</STRONG></UL><P>Some aspect of the requested URL is incorrect. Possible problems:<UL><LI>Missing or incorrect access protocol (should be `http://'' or similar)<LI>Missing hostname<LI>Illegal double-escape in the URL-Path<LI>Illegal character in hostname; underscores are not allowed</UL><P>Your cache administrator is <A HREF="mailto:webmaster">webmaster</A>. <BR clear="all"><HR noshade size="1px"><ADDRESS>Generated Thu, 31 May 2007 09:44:28 GMT by asap01.cern.ch (squid/2.6.STABLE1)</ADDRESS></BODY></HTML>
                   at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:375)
                  


                  • 6. Re: Problem calling EJB3 method via HTTP only
                    formica

                    This annotation works

                     @RemoteBinding(clientBindUrl="servlet://0.0.0.0:8080/servlet-invoker/ServerInvokerServlet",
                     jndiBinding="AsapServer/OltestlinesDAOBean/http")
                    

                    so 0.0.0.0 it is taking the correct value for the url



                    • 7. Re: Problem calling EJB3 method via HTTP only
                      marcreis

                      Hi Andrea,
                      first of, thanks for your answere!
                      I have also added the servlet-invoker.war again from the jboss-remoting 2.0 Package and with that it works, so the configuration is the same as in 4.0.x. I should have just tryed that first of ;-).
                      Except that I left aut the

                      "xmbean-dd="org/jboss/remoting/transport/Connector.xml" tag.
                      in the ejb3.deployers jboss-service.xml and which points to
                      servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet

                      rather than to
                      servlet://${jboss.bind.address}:8080/invoker/EJBInvokerServlet
                      so it would have used the servlets in http.invoker.sar (as I thought it would need to now).

                      So Thanks for your response!

                      I would still apreciate if one of the developers could state if this is the way it was indendet for 4.2.x.

                      Sincerely
                      Marc

                      • 8. Re: Problem calling EJB3 method via HTTP only
                        ron_sigal

                        Bill Decoste has just created a tutorial on the subject of accessing EJB3s over HTTP/HTTPS. It can be found in the JBoss wiki at http://wiki.jboss.org/wiki/Wiki.jsp?page=Accessing_EJB3s_over_HTTP_HTTPS.

                        • 9. Re: Problem calling EJB3 method via HTTP only
                          marcreis

                          Ok, Thanks!
                          Sincerely Marc

                          • 10. Re: Problem calling EJB3 method via HTTP only

                            Hi,

                            I have read the wiki on ejb3 over http/s. But i am still getting problems at the very fundamental level,

                            Exception in thread "main" javax.naming.CommunicationException: Operation failed [Root exception is java.rmi.ServerException: IOE; nested exception is:
                             java.net.ConnectException: Connection refused: connect]
                             at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:65)
                            

                            I am using httpd 2.2 sitting in front of jboss421GA and using mod_jk-1.2.25-httpd-2.2.4.so. My ideal setup would be :

                            1. remote client -->http://mydomain.com/invoker/JNDIFactory-->ajp://localhost:8009/...
                            2. remote client --->https://mydomain.com/<ejb invoke>-->ajp://localhost:8009/....

                            And also, i'd configure ssl client cert auth at the httpd level.

                            So actually, do i need ejb over http/s??? If not, how should i go about it?

                            If yes, what's wrong with the following config...

                            PLEASE HELP ME OUT......

                            mod_jk.conf

                            JkMount /invoker/* loadbalancer
                            JkMount /servlet-invoker/* loadbalancer
                            JkMount /jmx-console/* loadbalancer
                            JkMount /web-console/* loadbalancer
                            


                            workers.properties

                            # list of workers that will be used
                            # for mapping requests
                            # The configuration directives are valid
                            # for the mod_jk version 1.2.18 and later
                            #
                            worker.list=loadbalancer
                            
                            # Define Node1
                            # modify the host as your host IP or DNS name.
                            worker.node1.port=8009
                            worker.node1.host=localhost
                            worker.node1.type=ajp13
                            worker.node1.lbfactor=1
                            # worker.node1.connection_pool_size=10 (1)
                            
                            # Load-balancing behaviour
                            worker.loadbalancer.type=lb
                            worker.loadbalancer.balance_workers=node1
                            
                            # Status worker for managing load balancer
                            #worker.status.type=status
                            



                            jboss-web.deployer/server.xml, i didn't touch it as i don't https.

                            ejb3.deployer/META-INF/jboss-service.xml, i have only added in http portion
                            <mbean code="org.jboss.remoting.transport.Connector"
                             name="jboss.remoting:service=Connector,transport=Servlet"
                             display-name="Servlet transport Connector">
                             <depends>jboss.aop:service=AspectDeployer</depends>
                             <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>



                            servlet-invoker.war, specifically the WEB-INF/web.xml , i commented out the https part.

                            <?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">
                            
                            <!-- The the JBossRemoting server invoker servlet web.xml descriptor
                            $Id: web.xml,v 1.1 2005/06/16 21:12:48 telrod Exp $
                            -->
                            <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>invokerName</param-name>
                             <param-value>jboss.remoting:service=invoker,transport=servlet</param-value>
                             <description>The servlet server invoker</description>
                             </init-param>
                             <load-on-startup>1</load-on-startup>
                             </servlet>
                             <!-- <servlet>
                             <servlet-name>SSLServerInvokerServlet</servlet-name>
                             <description>The ServerInvokerServlet receives requests via HTTPS
                             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/SSLServerInvokerServlet</param-value>
                             <description>The ssl 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>
                             <!-- <servlet-mapping>
                             <servlet-name>SSLServerInvokerServlet</servlet-name>
                             <url-pattern>/SSLServerInvokerServlet/*</url-pattern>
                             </servlet-mapping> -->
                            </web-app>
                            
                            


                            env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.HttpNamingContextFactory");
                             env.setProperty(Context.PROVIDER_URL, "http://mydomain.com/invoker/JNDIFactory");
                             env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
                             InitialContext ctx = new InitialContext(env);
                             Calculator calculator = (Calculator) ctx.lookup("CalculatorHttpBean/remote");
                            


                            • 11. Re: Problem calling EJB3 method via HTTP only
                              ron_sigal

                              1. The JBoss naming service, which implements JNDI, doesn't use Remoting, so the exception

                              Exception in thread "main" javax.naming.CommunicationException: Operation failed [Root exception is java.rmi.ServerException:
                              IOE; nested exception is:
                               java.net.ConnectException: Connection refused: connect]
                               at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:65)
                              


                              is not related to Remoting. For help with the naming service, I would suggest the "JNDI/Naming/Network" forum.

                              2.


                              So actually, do i need ejb over http/s???


                              I'm not sure how to answer that. A typical reason for using http for EJB invocations would be to avoid firewall problems. Otherwise, you could use the standard EJB3 setup and the client would communicate directly with the EJB implementation, without going through a web server.

                              3. For more information about Tomcat, I'd suggest http://tomcat.apache.org/findhelp.html.

                              • 12. Re: Problem calling EJB3 method via HTTP only
                                marcreis

                                Hi,
                                we have run into another problem.
                                Assuming I have the http config setup and it works fine.
                                In 4.0.x I could set the

                                -Ddefault.client.bindurl=servlet://myserver.de/servlet-invoker/ServerInvoke
                                rServlet
                                

                                when starting the jboss server (run.sh), so that the client would call this url, instead of the
                                <attribute name="InvokerLocator">servlet://myserver.de:8080/servlet-invoker/ServerInvokerServlet</attribute>
                                

                                configured in the ejb3.deployer/jboss-service.xml

                                Now it seems that with 4.2.x this is ignored or the param has changed, and since the client trys to communicate with port 8080 which he cant reach, I can not communicate anymore.
                                Have the parameters changed or there handling?

                                Sincerely
                                Marc

                                • 13. Re: Problem calling EJB3 method via HTTP only
                                  marcreis

                                  Hi,
                                  the problem seems to be caused by configuration.
                                  My colleague configured the http-invoker.sar\META-INF\jboss-service.xml with

                                  servlet://${jboss.bind.address}:80/servlet- invoker/ServerInvokerServlet
                                  
                                  (the 80 is important)
                                  for the org.jboss.remoting.transport.Connector.
                                  Then it will work.
                                  Sincerely
                                  Marc

                                  • 14. Re: Problem calling EJB3 method via HTTP only
                                    marcreis

                                    Sorry,
                                    guess its time to take a break,
                                    it is ofcourse in the jboss-service.xml of the ejb3.deployer.