Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4223

Failure to load balance clustered SLSB

    XMLWordPrintable

Details

    Description

      The following code points to an EJB which is specified as clustered via the jboss-ejb3.xml - however it always connects to the first node in remote.connections.

      Properties properties = new Properties();

      properties.put("endpoint.name", "farecompare-client-endpoint");
      properties.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");

      properties.put("remote.connections", "cmc5101,cmc5102");
      properties.put("remote.connection.cmc5101.host", "cmc5-101");
      properties.put("remote.connection.cmc5101.port", "4447");
      properties.put("remote.connection.cmc5101.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");

      properties.put("remote.connection.cmc5102.host", "cmc5-102");
      properties.put("remote.connection.cmc5102.port", "4447");
      properties.put("remote.connection.cmc5102.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");

      PropertiesBasedEJBClientConfiguration configuration = new PropertiesBasedEJBClientConfiguration(properties);

      final ContextSelector ejbClientContextSelector = new ConfigBasedEJBClientContextSelector(configuration);

      final ContextSelector previousSelector = EJBClientContext.setSelector(ejbClientContextSelector);

      final Hashtable jndiProperties = new Hashtable();
      jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

      final Context context = new InitialContext(jndiProperties);

      LocationModuleAPI locationModule = (LocationModuleAPI) context.lookup(
      "ejb:locationmodule/xxi-framework-location-finder-module-ejb//LocationModuleSessionBean!com.xxi.framework.locationfindermodule.api.LocationModuleAPI");

      Attachments

        Issue Links

          Activity

            People

              pferraro@redhat.com Paul Ferraro
              gwwallace_jira Graeme Wallace (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: