메시지를 처리하고 메시지를 처리 할 수 있도록 원격 서버의 큐 ("JBoss MQ"를 실행하는)로 메시지를 보내야합니다. 위의 코드를 실행할 때원격 서버에 JMS 메시지 보내기
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
properties.put(Context.PROVIDER_URL, "jnp://192.168.1.131.129:1299");
InitialContext jndiContext = new InitialContext(properties);
//[2] Look up connection factory and queue.
ConnectionFactory connectionFactory = (ConnectionFactory)jndiContext.lookup("UIL2XAConnectionFactory");
Queue queue = (Queue)jndiContext.lookup("Queue/DataTransferQueue");
하지만 예외가 : 는 (비록, 내가 원격 서버를 Ping 할 수 있습니다).
javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.1.131.129:1299 and
discovery failed with error: javax.naming.CommunicationException:
Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
[Root exception is javax.naming.CommunicationException: Failed to connect to server 192.168.1.131.129:1299
원격 대기열에 연결하기 위해 특별한 방법이 있습니까?
왜이 기능을 사용합니까? – Adam