1 Reply Latest reply on Mar 27, 2017 4:45 AM by jan.swaelens

    Dynamic Configuration of jboss-ejb-client.xml for cluster usage

    jan.swaelens

      Hello,

       

      We build a Java EE application which is distributed to our customers. Depending the desired deployment environment it is possible that our application is deployed on a cluster with 2, 4, 7 ... nodes.

      Our application consists of several tiers where tier A connects to tier B and thus needs the configuration of remote ejb receiver functionality.

       

      The combination of these two facts requires us to adapt the 'jboss-ejb-client.xml' file for each deployment which is less than ideal.

       

      To make deployment more maintainable for our customers we would like to see what the alternatives are to this approach.

      Could this configuration be loaded via a code API for example, since we would be able to provide the cluster name and/or outbound connection names trough our app.

       

      We are using JBoss EAP 6.4, this is an example of how we have the file now

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-ejb-client xmlns="urn:jboss:ejb-client:1.2">

        <client-context>

        <ejb-receivers>

        <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection-node1" />

        <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection-node2" />

        </ejb-receivers>

        

        <clusters>

        <cluster name="ejb">

        <connection-creation-options>

        <property name="org.xnio.Options.SSL_ENABLED" value="true" />

        <property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS" value="false" />

        </connection-creation-options>

        </cluster>

        </clusters>

        </client-context>

      </jboss-ejb-client>

       

      Any guidance would be greatly appreciated.

       

      Thanks!