Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10540

jboss-ejb-client.xml is unable to specify global cluster config

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 13.0.0.Final
    • EJB

      When configuring an Wildfly instance with EJB Client applications to make remote EJB calls to another Wildfly instance with clustering enabled using a server to server connection configuration, the client Wildfly will specify remote-outbound-connection in the remoting subsystem. The client Wildfly instance will create and maintain these 2 connections in this example below.

      Client applications deployed on the client Wildfly instance will then package a jboss-ejb-client.xml in the application which specifies the remote server aliases that it wants to have access to.

      For the application to use clustered ejb, it then specifies the cluster information in the jboss-ejb-client.xml, where it has to specify connection information like username, connection options as opposed to just an alias as in the case of remoting-ejb-receiver.

      The cluster info should be configured in the JBoss profile xml so that client apps jboss-ejb-client.xml can just reference aliases like the non clustered connections to avoid applications creating their own connections to the same cluster nodes.

                  <subsystem xmlns="urn:jboss:domain:remoting:3.0">
                      <endpoint/>
                      <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
                      <outbound-connections>
                          <remote-outbound-connection name="remote-ejb-connection-1" outbound-socket-binding-ref="remote-ejb-1" username="ejbuser" security-realm="ApplicationRealm" protocol="http-remoting">
                              <properties>
                                  <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
                                  <property name="SASL_DISALLOWED_MECHANISMS" value="JBOSS-LOCAL-USER"/>
                                  <property name="SSL_ENABLED" value="false"/>
                              </properties>
                          </remote-outbound-connection>
                          <remote-outbound-connection name="remote-ejb-connection-2" outbound-socket-binding-ref="remote-ejb-2" username="ejbuser" security-realm="ApplicationRealm" protocol="http-remoting">
                              <properties>
                                  <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
                                  <property name="SASL_DISALLOWED_MECHANISMS" value="JBOSS-LOCAL-USER"/>
                                  <property name="SSL_ENABLED" value="false"/> 
                              </properties>
                          </remote-outbound-connection>
                      </outbound-connections>
                  </subsystem>
      
      <jboss-ejb-client xmlns:xsi="urn:jboss:ejb-client:1.2"
        xsi:noNamespaceSchemaLocation="jboss-ejb-client_1_2.xsd">
        <client-context>
          <ejb-receivers exclude-local-receiver="true">
            <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection-1" />
            <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection-2" />
          </ejb-receivers>
          <clusters>
            <cluster name="ejb" security-realm="ApplicationRealm"
              username="ejb-cluster-username">
              <connection-creation-options>
                <property name="org.xnio.Options.SSL_ENABLED" value="false" />
                <property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS"
                  value="false" />
              </connection-creation-options>
            </cluster>
          </clusters>
        </client-context>
      </jboss-ejb-client>
      

              pferraro@redhat.com Paul Ferraro
              rhn-support-bmaxwell Brad Maxwell
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: