小编Lec*_*iak的帖子

Spring <jee:remote-slsb>和JBoss AS7 - 没有EJB接收器可供处理

我在JBoss AS 7上有@Remote EJB,可以通过名字获得java:global/RandomEjb/DefaultRemoteRandom!pl.lechglowiak.ejbTest.RemoteRandom.

独立客户端是使用<jee:remote-slsb>bean的Spring应用程序.当我尝试使用那个bean时java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:, moduleName:RandomEjb, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@1a89031.

这是applicationContext.xml的相关部分:

<jee:remote-slsb id="remoteRandom"
    jndi-name="RandomEjb/DefaultRemoteRandom!pl.lechglowiak.ejbTest.RemoteRandom"
    business-interface="pl.lechglowiak.ejbTest.RemoteRandom"
    <jee:environment>
        java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory
        java.naming.provider.url=remote://localhost:4447
        jboss.naming.client.ejb.context=true
        java.naming.security.principal=testuser
        java.naming.security.credentials=testpassword
    </jee:environment>
</jee:remote-slsb>

<bean id="remoteClient" class="pl.lechglowiak.RemoteClient">
    <property name="remote" ref="remoteRandom" />
</bean>
Run Code Online (Sandbox Code Playgroud)

RemoteClient.java公共类RemoteClient {

private RemoteRandom random;

public void setRemote(RemoteRandom random){
    this.random = random;
}

public Integer callRandom(){
    try {
        return random.getRandom(100);
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}
Run Code Online (Sandbox Code Playgroud)

}

我的jboss客户端jar:org.jboss.as jboss-as-ejb-client-bom …

spring ejb jboss7.x

8
推荐指数
1
解决办法
5620
查看次数

标签 统计

ejb ×1

jboss7.x ×1

spring ×1