One way would be to register the services you wish to call on cluster B from cluster A in cluster A's registry. This can be done either by inserting the relevant rows from cluster B's registry DB into cluster A's registry DB, or using the JAXR Java API (this is fairly straightforward and examples of this can be found with google, or if you provide your email address i can send you some sample code).
If you do this with services that use JBoss Messaging accross firewalls that are configured to close idle connections after a certain amount of time, the messaging configuration should be changed to send some pings (remoting-bisocket-service.xml):
<attribute name="pingFrequency" isParam="true">30000</attribute> <attribute name="pingWindowFactor" isParam="true">71582</attribute>
Also if only a limited number of ports are opened in the firewalls between the two clusters a secondary bind port should be configured (also in remoting-bisocket-service.xml):
(see the JBoss Messaging doc for more on this)
Hope this helps.
Note that you can unfortunately not let the two clusters share the same registry DB unless they also share the same jBPM database (or you are not using jBPM) as the jBPM callback service otherwise will not work (callback messages can be sent to the node that doesn't actually have the jBPM instance in its DB).
Thanks for the advices. It is a good idea to automatically sync the two repositories using Jaxr. To bad there isn't a service available that does this already.
I am only wondering about the JBoss messaging configuration. I have some bad experience connecting directly to another JBoss messaging instance over a WAN. On connection loss it wouldn't reconnect. However that was with EJB message beans and with JBoss MQ. We switched to JBoss Messaging with message bridges, which does reliably reconnect on connection loss. How reliable does JBoss Messaging work when not using a bridge?
I send you an e-mail with a request for those examples. Thanks for offering them.
To bad there isn't a service available that does this already.
We agree and it will be addressed in future.
I hope the samples help :)
I don't have any experience using JMS over WAN. I suppose you could try in the JBoss Messaging forum? It does however work through firewalls once the configuration changes are made (that is it don't require an unreasonable amount of open ports and can do keep alive etc.).
If you use the ESB (ServiceInvoker) to deliver the messages i would think the redelivery mechanism in the ESB would make the system capable of tolerating network break downs? even potential problems with a messaging system not being able to reconnect, as i think the ESB code would discard it the problematic connection and create a new one behind the scenes?
I'm also trying to connect 2 ESB servers, could you please send me the sample code as well. I'll send you my email address.