0 Replies Latest reply on Aug 6, 2013 12:46 AM by tonygeorge

    Connecting to a remote queue from Jboss4.2 to 4.3EAP

    tonygeorge Newbie

      Hi all,


      I am trying to send a message  from a java application ( Client : ) which is runnning in JBoss4.2 to a remote queue in another server ( Server  : which is JBoss4.3 EAP in another host.

      The below piece of code works fine when both Client and Sever running in same version ( that is 4.2 to 4.2 and 4.3 to 4.3 ). But when i try to send message from 4.2 to 4.3 am getting below exception from the statement  where i try to get the QueueConnectionFactory.


           InitialContext initialContext = null;

              try {

                       initialContext = new InitialContext();

                       String providerUrl ="jnp://";// This is my remote IP where JBoss EAP is running and queue resides


                       Properties properties = new Properties();

                      properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");


                      initialContext = new InitialContext(properties);


                     QueueConnectionFactory  qconFactory = (QueueConnectionFactory) initialContext.lookup("/ConnectionFactory");// Here i am getting exception

                      queueConnection = qconFactory.createQueueConnection();


              catch (NamingException e){

                  initialContext = null;

                  messageCenter.error(" NamingException : "+ e.getMessage());



      Exception I am getting is as given below :


      Could not obtain connection to any of these urls: and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]



      How we can establish the connection and send message when client and server is in different version ?