1 2 Previous Next 16 Replies Latest reply on Mar 28, 2014 5:14 AM by igor.dragic Go to original post
      • 15. Re: stateless ejb load balancing wildfly
        wdfink

        Are both 'client' and 'server' with clustered configuration and clustered application?

        If not you miss the <clusters> configuration in your jboss-ejb-client.xml.

        See ejb-multi-server quickstart for examples

         

        If yes

        you need to change the cluster-name ejb which is defined by the configuration of SFSB cache and infinispan subsystem.

        If you change it you need to add both cluster configurations to your jboss-ejb-client.xml.

        Other option is to exclude the local ejb-receiver here if you did not use a ejb-connection in your client app to the client-servers, have a look to the dtd how to do.

        • 16. Re: stateless ejb load balancing wildfly
          igor.dragic

          I forgot to send my jboss-ejb-client.xml.

           

          <code>

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

              <client-context>

                  <ejb-receivers>

                    

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

                     

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

                  </ejb-receivers>

           

           

                  <!-- if there is a cluster behind the outbound connection the cluster element must be defined -->

                  <clusters>

                      <!-- cluster of remote-ejb-connection-1 -->

                      <cluster name="ejb" security-realm="ejb-security-realm-1" username="ejb">

                          <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>

          </code>

           

          In the server app I have jboss-ejb3.xml:

           

          <code>

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

          <jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee" xmlns="http://java.sun.com/xml/ns/javaee"

                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="urn:security" xmlns:c="urn:clustering:1.0"

                         xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd

                               http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"

                         version="3.1" impl-version="2.0">

              <enterprise-beans>

              </enterprise-beans>

              <assembly-descriptor>

                  <!-- mark all EJB's of the application as clustered (without using the jboss specific @Clustered annotation for each class) -->

                  <c:clustering>

                      <ejb-name>*</ejb-name>

                      <c:clustered>true</c:clustered>

                  </c:clustering>

              </assembly-descriptor>

          </jboss:ejb-jar>

          </code>

           

          Can you send me some example how to change cluster name? How to exclude local ejb receiver?

          1 2 Previous Next