Hi all,
I am trying to send a message from a java application ( Client : 10.1.3.170 ) which is runnning in JBoss4.2 to a remote queue in another server ( Server : 10.1.3.160) 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://10.1.3.160";// 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");
properties.put(Context.PROVIDER_URL,providerUrl);
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: 10.1.3.160 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 ?