1 Reply Latest reply on Apr 21, 2011 9:53 AM by Kobi Ianko

    ejb3 over http

    Kobi Ianko Apprentice

      Hi,

      I'm looking for a way to enable EJB3 over HTTP,

      I saw some articles on the sobject here in the community. like https://community.jboss.org/wiki/EJB3overHTTPHTTPSinJBossAS-5

       

      but all of them are indicating that I need to set the @RemoteBinding - clientBindUrl in the SessionBean.

       

      I have some custumers who want to use the HTTP and some that are using regular RMI.

       

      I don't wanna create  two versions of the same class, one for HTTP and one for RMI.

       

      how do I configure this outside the SessionBean?

       

      and it looks like I need to set the same string (clientBindUrl) in all my SessionBeans, is there a way to set it once in Jboss conf files?

       

      10x, Kobi

        • 1. ejb3 over http
          Kobi Ianko Apprentice

          found the conf file I was looking for

          check out the ejb3-connectors-jboss-beans.xml at the deploy dir,

          I've set the invokerLocator to my own http servlet like so:

           

           

           

            <bean name="org.jboss.ejb3.RemotingConnector"

              class="org.jboss.remoting.transport.Connector">

           

           

              <property name="invokerLocator"><![CDATA[servlet://${jboss.bind.address}:80/unified-invoker/Ejb3ServerInvokerServlet/?dataType=invocation&marshaller=org.jboss.invocation.unified.marshall.InvocationMarshaller&return-exception=true&unmarshaller=org.jboss.invocation.unified.marshall.InvocationUnMarshaller]]></property>

              <property name="serverConfiguration">

                <inject bean="ServerConfiguration" />

              </property>

            </bean>

           

           

            <!-- Remoting Server Configuration -->

            <bean name="ServerConfiguration"

              class="org.jboss.remoting.ServerConfiguration">

              <property name="invocationHandlers">

                <map keyClass="java.lang.String" valueClass="java.lang.String">

                  <entry>

                    <key>AOP</key>

                    <value>

                      org.jboss.aspects.remoting.AOPRemotingInvocationHandler

                    </value>

                  </entry>

                </map>

              </property>

            </bean>