远程ejb无法在jboss-eap 6.4中工作

时间:2017-08-23 11:20:54

标签: java ejb jboss6.x

我有一个ejb客户端,能够在tomcat和weblogic上测试远程ejb。但它在jboss-eap 6.4中失败了。

没有防火墙问题,因为它在其他服务器中工作。我尝试将jboss附带的jboss-client jar放在一起,并尝试使用bom类型。仍然是同样的错误。

Jboss服务器日志:

19:27:45,107 TRACE [org.jboss.remoting.remote] (Remoting "config-based-naming-client-endpoint" read-1) Received message data
19:27:45,108 TRACE [org.jboss.remoting.remote] (Remoting "config-based-naming-client-endpoint" read-1) CAS Channel ID bf292e5d (outbound) of Remoting connection 33fccb04 to /192.168.1.50:4447
    old: RS=false WS=false IM=0 OM=0
    new: RS=false WS=false IM=1 OM=0
19:27:45,109 TRACE [org.jboss.remoting.remote] (Remoting "config-based-naming-client-endpoint" read-1) Opened inbound message on Channel ID bf292e5d (outbound) of Remoting connection 33fccb04 to /192.168.1.50:4447
19:27:45,116 TRACE [org.jboss.remoting.remote] (Remoting "config-based-naming-client-endpoint" read-1) Received message data
19:27:45,116 TRACE [org.jboss.remoting.remote] (Remoting "config-based-naming-client-endpoint" read-1) CAS Channel ID bf292e5d (outbound) of Remoting connection 33fccb04 to /192.168.1.50:4447
    old: RS=false WS=false IM=1 OM=0
    new: RS=false WS=false IM=0 OM=0
19:27:45,117 TRACE [org.jboss.remoting.remote] (Remoting "config-based-naming-client-endpoint" read-1) Closed inbound message on Channel ID bf292e5d (outbound) of Remoting connection 33fccb04 to /192.168.1.50:4447
19:27:45,117 TRACE [org.jboss.remoting.remote.connection] (Remoting "config-based-naming-client-endpoint" read-1) Sent message java.nio.HeapByteBuffer[pos=7 lim=7 cap=8192] (direct)
19:27:45,117 TRACE [org.jboss.remoting.remote.connection] (Remoting "config-based-naming-client-endpoint" read-1) Flushed channel (direct)
19:27:45,117 TRACE [org.jboss.remoting.remote] (Remoting "config-based-naming-client-endpoint" read-1) No message ready; returning

Jboss standalone.xml配置:

<subsystem
    xmlns="urn:jboss:domain:remoting:1.2">
    <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
    <outbound-connections>
        <remote-outbound-connection name="remote-ejb-connection" outbound-socket-binding-ref="remote-ejb" username="admin" security-realm="ApplicationRealm">
            <properties>
                <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
                <property name="SSL_ENABLED" value="false"/>
            </properties>
        </remote-outbound-connection>
    </outbound-connections>
</subsystem>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    <outbound-socket-binding name="remote-ejb">
        <remote-destination host="192.168.2.31" port="4447"/>
    </outbound-socket-binding>
</socket-binding-group>

Stacktrace是:

callExternalService - Exchange-exception :java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:, moduleName:AS-Test-EJB, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@a89afa9
    at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:747)
    at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:116)
    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)
    at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:255)
    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:200)
    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:183)
    at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)
    at com.sun.proxy.$Proxy406.sayHello(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:408)
    at org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:279)
    at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:252)
    at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:177)
    at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
    at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:68)
    at org.apache.camel.component.bean.BeanProducer.process(BeanProducer.java:38)
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
    at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
    at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:68)
    at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:412)
    at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:380)
    at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:270)
    at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:380)
    at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:221)
    at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:124)
    at org.apache.camel.impl.DefaultProducerTemplate$13.call(DefaultProducerTemplate.java:616)
    at org.apache.camel.impl.DefaultProducerTemplate$13.call(DefaultProducerTemplate.java:614)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

使用用于查找的属性进行编辑。

<endpoint id="Admin__Admin__EJBServiceTest" uri="ejb04-Admin:AS-Test-EJB/ServerTestBean!com.appzillon.test.ejb.ServerTest?method=sayHello"/>
<bean class="org.apache.camel.component.ejb.EjbComponent" id="ejb04-Admin">
<property name="properties" ref="Admin_Admin__EJBServiceTest_jndiProperties"/>
</bean>
<util:properties id="Admin_Admin__EJBServiceTest_jndiProperties">
<prop key="java.naming.provider.url">remote://192.168.1.50:4447</prop>
<prop key="java.naming.factory.initial">org.jboss.naming.remote.client.InitialContextFactory</prop>
<prop key="jboss.naming.client.ejb.context">true</prop>
<prop key="java.naming.security.principal">admin</prop>
<prop key="java.naming.security.credentials">********</prop>
</util:properties>

我们正在使用apache camel进行处理。我们从xml文件读取端点,proccess.lookup由apche camel处理。

0 个答案:

没有答案