0 Replies Latest reply on Jun 18, 2018 5:17 AM by Dominique Claes

    Wildfly 12: locale and remote components

    Dominique Claes Newbie

      Situation

      Our application consist of a total of 42 EAR components and several WAR components.

      When a developer wants to test his changes for a component, than only that component is deployed on his local Wildfly instance.

      The idea is that when other components, which are not deployed on his local Wildfly instance, need to be accessed, a remote Wildfly instance is used. This is the case for EJBs

       

      In Wildfly 9, we used the following configuration:

       

      The code for an EAR component has a jboss-ejb-client.xml with the following structure:

       

      <security-realm name="ejb-security-realm">
          <server-identities>
              <secret value="bmV3IFN0cmluZyhuZXcgY2hhclswXSk7"/>
          </server-identities>
      </security-realm>
       
      <subsystem xmlns="urn:jboss:domain:remoting:3.0">
          <endpoint worker="default"/>
          <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
          <outbound-connections>
              <remote-outbound-connection name="remote-ejb-connection" outbound-socket-binding-ref="remote-ejb" username="ejb" security-realm="ejb-security-realm">
                  <properties>
                      <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
                      <property name="SSL_ENABLED" value="false"/>
                  </properties>
              </remote-outbound-connection>
          </outbound-connections>
      </subsystem>
       
      <outbound-socket-binding name="remote-ejb">
          <remote-destination host="DMP_MO_URL" port="8080"/>
      </outbound-socket-binding> 

       

       

      The setup above was enough to make sure that if an EAR-component is not deployed locally, that the remote Wildfly instance would be used.

      I've tried the following links the make it work for Wildfly 12 but it was unsuccessful:

      Getting started with EJBs and Elytron Part 1: Securing EJBs and invoking them from remote clients

      Getting started with EJBs and Elytron Part 2: EJB invocations from remote servers

       

      Default it seems that the local Wildfly instance is used, but if never accesses the remote Wildfly instance if the local component is not found.

      For now we implement the interface DeploymentNodeSelector and changed the jboss-ejb-client.xml configuration to the following:

      <jboss-ejb-client xmlns="urn:jboss:ejb-client:1.2">
          <client-context>
              <ejb-receivers>
                  <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection"/>
              </ejb-receivers>
              <clusters>
                  <cluster name="ejb" username="ejb" security-realm="ejb-security-realm">
                      <connection-creation-options>
                          <property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS" value="true"/>
                          <property name="org.xnio.Options.SSL_ENABLED" value="false"/>
                      </connection-creation-options>
                  </cluster>
              </clusters>
          </client-context>
      </jboss-ejb-client> 

       

      How can I make it work on Wildfly 12, preferably by using the new configuration files?