Was sollte ich tun, um eine Verbindung zum remote-jms-queue?

Habe ich arbeiten JBoss AS 7 (7.1.1 final) server auf localhost mit einige Warteschlange.

Und ich will zu verbinden, dass die Warteschlange in einer desktop-Anwendung.

Also schrieb ich etwas wie:

Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, "remote://localhost:4447");
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
InitialContext initialContext = new InitialContext(env);
ConnectionFactory connectionFactory = (ConnectionFactory) 
initialContext.lookup("RemoteConnectionFactory"); //<- there is it fail

Aber es ergibt sich in diesem Ausnahme:

Exception in thread "main" javax.die Benennung.CommunicationException: Könnte
nicht erhalten, Verbindung zu einer der folgenden urls: remote://localhost:4447
und-Ermittlung ist fehlgeschlagen mit dem Fehler: javax.die Benennung.CommunicationException:
Erhalten timed out [Root exception is java.net.SocketTimeoutException:
Erhalten timed out] [Root exception
javax.die Benennung.CommunicationException: Fehler beim verbinden mit server
remote:1099 [Root exception
javax.die Benennung.ServiceUnavailableException: Failed to connect to server
remote:1099 [Root exception is java.net.UnknownHostException:
remote -]]]

Natürlich habe ich jbosscall-client.jar in der Klasse Weg.

InformationsquelleAutor Hlib | 2012-11-04

Schreibe einen Kommentar