2016-07-13 36 views
1

Ich verwende Remote-Verbindung in Java Applet mit dem folgenden Code.Remote-Verbindung fiel nach einiger Zeit in Wildfly

Hashtable jndiProps = new Hashtable<Object,Object>(); 
    jndiProps.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); 
    jndiProps.put(Context.PROVIDER_URL, "http-remoting://" + myhost + ":" + "8080"); 
    jndiProps.put("jboss.naming.client.ejb.context", true); 
    jndiProps.put("org.jboss.ejb.client.scoped.context", true);; 
    //jndiProps.put(Context.URL_PKG_PREFIXES,"org.jboss.ejb.client.naming"); 
    jndiProps.put("endpoint.name", "client-endpoint"); 
    jndiProps.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", false); 
    jndiProps.put("remote.connections", "default"); 
    jndiProps.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", false); 
    jndiProps.put("remote.connection.default.host", myhost); 
    jndiProps.put("remote.connection.default.port", "8080"); 
    jndiProps.put(Context.SECURITY_PRINCIPAL, "demouser"); 
    jndiProps.put(Context.SECURITY_CREDENTIALS, "demouser123"); 
    InitialContext ctx = null; 
    try { 
     ctx = new InitialContext(jndiProps); 
    } catch(NamingException nex) { 
     nex.printStackTrace(); 
    } catch(Exception ex) { 
     ex.printStackTrace(); 
    } 
    RemoteInterface remote = (RemoteInterface)ctx.lookup(ejbUrl); 

Hier wird SECURITY_PRINCIPAL mit dem Skript add-user.sh erstellt. Das Applet lädt, alles funktioniert gut. Aber nach einiger Zeit in Java-Konsole, erscheint eine Meldung, die besagt

13. Juli 2016 03.04.21 org.jboss.ejb.client.remoting.ChannelAssociation $ ResponseReceiver handleEnd INFO: EJBCLIENT000016: Channel Channel ID 98a848d6 (Outbound) der Remoting-Verbindung 22d8b2a8 an cms8sf.cdotd.ernet.in/192.168.5.240:8080 kann Nachrichten nicht mehr verarbeiten.

Und danach, wann immer ich versuche, auf eine beliebige Methode der remote Bean Ausnahme in geworfen.

java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:app, moduleName:app-ejb, distinctName:] combination for invocation context [email protected] 
at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:774) 

Ich bin mir ziemlich unsicher, warum das passiert. Kann mir bitte jemand helfen? Danke im Voraus. Ich benutze Java 1.8 und Wildfly 9.0.2. Vielleicht

Antwort

0

, wird diese Option Ihnen helfen

remote.connection.default.connect.options.org.jboss.remoting3.RemotingOptions.HEARTBEAT_INTERVAL = 5000

es ist eine Art von Ping