14 Replies Latest reply on Oct 31, 2013 9:49 PM by jeryma

    wildfly & hornetq about  env.put(Context.PROVIDER_URL, "remote://localhost:4447")

    jeryma

      When I test hornetq with jms ,I confuse about next :

       

      jms provider code :

      ........

      public class HelloWorlsJMS {

            private Context getContext() throws NamingException{ 

                    

               final Properties env = new Properties();

                       env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");

                       env.put(Context.PROVIDER_URL, "remote://localhost:4447"); 

                       env.put(Context.SECURITY_PRINCIPAL, "kylin");

                       env.put(Context.SECURITY_CREDENTIALS, "redhat");

                    

              return new InitialContext(env);

          }

      .............

       

      jboss7 standalone-full.xml configutration have remote port 4447 ,but wildfly beta1 don't have . what should I do with env.put(Context.PROVIDER_URL, "remote://localhost:4447") in wildfly  ?

       

      HQ214013: Failed to decode packet: java.lang.IllegalArgumentException: HQ119032: Invalid type: -1  &&  Failed to connect to any server. Servers tried: [remote://10.19.x.x:5445]