You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2012/01/20 23:11:17 UTC

svn commit: r1234177 - /openejb/site/trunk/content/ejb-refs.mdtext

Author: dblevins
Date: Fri Jan 20 22:11:16 2012
New Revision: 1234177

URL: http://svn.apache.org/viewvc?rev=1234177&view=rev
Log:
Notes on failover

Modified:
    openejb/site/trunk/content/ejb-refs.mdtext

Modified: openejb/site/trunk/content/ejb-refs.mdtext
URL: http://svn.apache.org/viewvc/openejb/site/trunk/content/ejb-refs.mdtext?rev=1234177&r1=1234176&r2=1234177&view=diff
==============================================================================
--- openejb/site/trunk/content/ejb-refs.mdtext (original)
+++ openejb/site/trunk/content/ejb-refs.mdtext Fri Jan 20 22:11:16 2012
@@ -150,3 +150,22 @@ Specifically, the `mappedName` syntax is
 
  - jndi:ext://`<contextId>`/`<jndiName>`
 
+
+## Referencing a bean in "many" servers
+
+Note the above also works with the various forms of failover that TomEE supports.
+
+If say, there are two servers that have the `OrangeBeanRemote` bean, you could expand the `<JndiProvider>` delcaration like so:
+
+      <JndiProvider id="shoe">
+        java.naming.provider.url = failover:ejbd://192.168.1.20:4201,ejbd://192.168.1.30:4201
+        java.naming.factory.initial = org.apache.openejb.client.RemoteInitialContextFactory
+      </JndiProvider>
+
+In the event that the `ejbd://192.168.1.20:4201` server cannot be contacted, the second server will be tried.
+
+See these docs for more details on Failover and Discovery:
+
+ - [Multicast Discovery (UDP)](multicast-discovery.html)
+ - [Multipoint Discovery (TCP)](multipoint-discovery.html)
+