Calling Remote EJB between Jboss 7.1.1 servers
bbr_developer Nov 13, 2012 4:10 PMHi,
I have a problem when i try to call a remote ejb from one jboss 7 server (central server) to others jboss 7 servers (module servers). Every single server runs in different ports and different machines. The problem is that apparently the central server only supports a unique ejb receiver, therefore the central server only connects to a one module server. I followed the instructions in https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance, and its works when connect one module server, but i need to connect more.
My standalone-full.xml looks like:
...
<security-realm name="usr-ejb-security-realm">
<server-identities>
<secret value="MTIzcXdl"/>
</server-identities>
</security-realm>
<security-realm name="com-ejb-security-realm">
<server-identities>
<secret value="MTIzcXdl"/>
</server-identities>
</security-realm>
...
<outbound-connections>
<remote-outbound-connection name="usr-remote-ejb-connection" outbound-socket-binding-ref="usr-remote-ejb" username="appuser" security-realm="usr-ejb-security-realm">
<properties>
<property name="SASL_POLICY_NOANONYMOUS" value="false"/>
<property name="SSL_ENABLED" value="false"/>
</properties>
</remote-outbound-connection>
<remote-outbound-connection name="com-remote-ejb-connection" outbound-socket-binding-ref="com-remote-ejb" username="appuser" security-realm="com-ejb-security-realm">
<properties>
<property name="SASL_POLICY_NOANONYMOUS" value="false"/>
<property name="SSL_ENABLED" value="false"/>
</properties>
</remote-outbound-connection>
</outbound-connections>
....
<outbound-socket-binding name="usr-remote-ejb">
<remote-destination host="user.regional.server" port="1199"/> <!-- host 1 -->
</outbound-socket-binding>
<outbound-socket-binding name="com-remote-ejb">
<remote-destination host="commercial.regional.server" port="1299"/> <!-- host 2-->
</outbound-socket-binding>
...
My jboss-ejb-client.xml looks like:
<?xml version="1.0" encoding="UTF-8"?>
<p:jboss-ejb-client xmlns:p="urn:jboss:ejb-client:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:ejb-client:1.0 jboss-ejb-client_1_0.xsd ">
<client-context>
<ejb-receivers exclude-local-receiver="true" local-receiver-pass-by-value="true">
<remoting-ejb-receiver outbound-connection-ref="usr-remote-ejb-connection"/>
<remoting-ejb-receiver outbound-connection-ref="com-remote-ejb-connection"/>
</ejb-receivers>
</client-context>
</p:jboss-ejb-client>
In the server.log...
12:24:20,625 INFO [org.jboss.ejb.client.remoting.VersionReceiver] (Remoting "machine-bbr" task-2) Received server version 1 and marshalling strategies [river]
12:24:20,632 INFO [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (MSC service thread 1-8) Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@7b5a3b00, receiver=Remoting connection EJB receiver [connection=Remoting connection <56e45c8>,channel=jboss.ejb,nodename=machine-bbr]} on channel Channel ID 90b506d0 (outbound) of Remoting connection 03155ba4 to commercial.regional.server/<host 2>:1299
12:24:20,655 WARN [org.jboss.ejb.client.remoting.ChannelAssociation] (Remoting "machine-bbr" task-3) Unsupported message received with header 0xffffffff
But, for user.regional.server does not create a EJBReceiverContext. And when calling remote ejb throws...
java.lang.IllegalStateException: No EJB receiver available for handling [appName:ModuleOneEAR,modulename:ModuleOneManager,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@d8c07f9
Please a need your help!
Thanks!
-
standalone-full.xml 21.6 KB
-
jboss-ejb-client.xml 567 bytes