0 Replies Latest reply on Apr 27, 2016 11:42 AM by Nicola Corsaro

    Migrating Wildfly 8 to Wildfly 10 EJB invocations from a remote client doesn't work anymore

    Nicola Corsaro Newbie

      This code works with Wildfly 8 but does not work with Wildfly 10 (username and password are correct).

      Can anybody tell me why? What is changed in Wildfly 10?

       

              Properties clientProp = new Properties();

              clientProp.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");

              clientProp.put("remote.connections", "default");

              clientProp.put("remote.connection.default.port", "8080");

              clientProp.put("remote.connection.default.host", "172.16.1.25");

              clientProp.put("remote.connection.default.username", "nicola");

              clientProp.put("remote.connection.default.password", "nicola.x01");

              clientProp.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");

             

              EJBClientConfiguration cc = new PropertiesBasedEJBClientConfiguration(clientProp);

              ContextSelector<EJBClientContext> selector = new ConfigBasedEJBClientContextSelector(cc);

              EJBClientContext.setSelector(selector);

       

              Properties properties = new Properties();

              properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

              properties.put("jboss.naming.client.ejb.context", "true");

       

              try{

                      Context context = new InitialContext(properties);

                      AranRemote svc= (AranRemote)context.lookup("ejb:/agileejb/AranBean!it.xteam.agiledb.ejb.remote.AranRemote");

                      Aran a = svc.get("05","QWE");

              } catch (Exception e){

                     e.printStackTrace();

              }