How can I configure HA on initial lookup to communicate to two different EJBs on two different clusters?
Asked Answered
G

0

6

I have this scenario:

  • A remote system BE-TEST exposes an @Clustered ejb-Name-BE deployed on a two machines JBoss EAP 6.3 cluster
  • A remote system COMMON-TEST exposes an @Clustered ejb-name-Test deployed on a two machines JBoss EAP 6.3 cluster
  • A client system, also deployed on JBoss EAP 6.3 clester, that needs to call both remote EJBs from a single EAR

The question is:

  • How do I have to configure the jboss-ejb-client.xml to handle the HA about the two different and indipendent EJBs?

I followed the indications that can be found here: https://access.redhat.com/solutions/136963

On the client, I've configured the standalone-ha.xml like this:

<remote-outbound-connection name="remote-ejb-BE-TEST-A" outbound-socket-binding-ref="ejb-Name-BE-A" ...>
<remote-outbound-connection name="remote-ejb-BE-TEST-B" outbound-socket-binding-ref="ejb-Name-BE-B" ...>
<remote-outbound-connection name="remote-ejb-COMMON-TEST-A" outbound-socket-binding-ref="ejb-name-Test-A" ...>
<remote-outbound-connection name="remote-ejb-COMMON-TEST-B" outbound-socket-binding-ref="ejb-name-Test-B" ...>
.
<outbound-socket-binding name="ejb-Name-BE-A">
   <remote-destination host="BE-A" port="4447"/>
</outbound-socket-binding>
<outbound-socket-binding name="ejb-Name-BE-B">
   <remote-destination host="BE-B" port="4447"/>
</outbound-socket-binding>
<outbound-socket-binding name="ejb-name-Test-A">
   <remote-destination host="Test-A" port="4447"/>
</outbound-socket-binding>
<outbound-socket-binding name="ejb-name-Test-B">
   <remote-destination host="Test-B" port="4447"/>
</outbound-socket-binding>

How do I have to configure the jboss-ejb-client.xml? Am I force to mix two different groups of connections within the same ejb-receivers tag?

<jboss-ejb-client xmlns="urn:jboss:ejb-client:1.2">
<client-context>
<ejb-receivers>
    <remoting-ejb-receiver outbound-connection-ref="remote-ejb-BE-TEST-A" />
    <remoting-ejb-receiver outbound-connection-ref="remote-ejb-BE-TEST-A" />
    <remoting-ejb-receiver outbound-connection-ref="remote-ejb-COMMON-TEST-A" />
    <remoting-ejb-receiver outbound-connection-ref="remote-ejb-COMMON-TEST-A" />
</ejb-receivers>

How does JBoss recognize that they are two different clusters?

Bye and thanks

Gati answered 3/3, 2017 at 15:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.