6 Replies Latest reply on Nov 28, 2005 1:59 PM by Pavel Kral

    ejb3 and remote http invocation

    tlewandowski Newbie

      how should I annotate my session bean class to be accessible through http invoker? It is well documented for EJB<3 but I couldn't find any hints how to do it for EJB3

        • 1. Re: ejb3 and remote http invocation
          xu bin Newbie

          EJB3 does not provide native support for web service now.

          You can see here http://wiki.jboss.org/wiki/Wiki.jsp?page=WebservicesAndEJB3

          • 2. Re: ejb3 and remote http invocation
            tlewandowski Newbie

            I'm not going to expose my EJB3 as web service (with SOAP/WSDL), I just want to use through firewalls. With JBoss and EJB<3 I could use http detached invoker (which is well documented in JBoss AS Guide ) but I can't find any help how to do it with EJB3, should I use annotations (which?) or should I configure it in old xml descriptor (how?).

            • 3. Re: ejb3 and remote http invocation
              Alex Newbie

              You may invoke your ejb throw http protocol for it you must configure http connector on the server side. For example deploy\ejb3.deployer\META-INF\jboss-service must be:

              <mbean code="org.jboss.ejb3.EJB3Deployer" name="jboss.ejb3:service=EJB3Deployer">
              <mbean code="org.jboss.remoting.transport.Connector" xmbean-dd="org/jboss/remoting/transport/Connector.xml" name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
               <attribute name="InvokerLocator">http://localhost:7080</attribute>
              <attribute name="Configuration">
               <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
              But in this case jboss run new http server.
              If you want use tomcat server that bundle to jboss you must use servelt conector
              But befor use this connector you must add servlet-invoker.war to you deploy directory
              and put to it META-INF directory web.xml and jboss-web.xml:
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE web-app PUBLIC
               "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
              <!-- The the JBossRemoting server invoker servlet web.xml descriptor
              $Id: web.xml,v 1.1 2005/06/16 21:12:48 telrod Exp $
               <description>The ServerInvokerServlet receives requests via HTTP
               protocol from within a web container and passes it onto the
               ServletServerInvoker for processing.
               <description>The servlet server invoker</description>

              and jboss-web.xml for example
               <!-- Uncomment the security-domain to enable security. You will
               need to edit the jmx-console login configuration to setup the
               login modules used to authentication users.

              after that add to you ejb anatation @RemoteBinding(clientBindUrl="http://localhost:8080/servlet-invoker/ServerInvokerServlet"),because if you don't add it client will be try to the servelt://localhost:8080/servlet-invoker/ServerInvokerServlet
              and some error will acure.
              But servlet connector implementing by developer with error i fix with bug fo me and write to the forum about this bug but nobody answer me.

              • 4. Re: ejb3 and remote http invocation
                Tom Elrod Master

                I saw the post you had on the remoting forum about the servlet invoker bug. Sorry I have not replied to it yet. This bug will be fixed for 1.4.0 release of JBossRemoting (and appreciate you pointing it out).

                One of the reasons for my delayed response is that we are working on switching out the http invoker implementation to use the http connector for tomcat. I am not sure if or how this will impact configuration for the http or servlet invoker (since the two currently share code). I will post to the remoting forum about this when it is completed.



                Tom Elrod
                JBossRemoting Lead

                • 5. Re: ejb3 and remote http invocation
                  Alex Newbie

                  Tom,I very thankful for you response.
                  It will be grateful if you make only one http connector that use tomcat.It necasary for use Remoting behind firewall and using http load balancing for Jboss cluster.

                  • 6. Re: ejb3 and remote http invocation
                    Pavel Kral Newbie

                    Upgrading to jBoss 4.0.3SP1 + Remoting 1.4.0beta (jboss-remoting.jar replacement for jboss) with still same result.