Index: /home/bes/dev/ejb3/trunk/core/pom.xml
===================================================================
--- /home/bes/dev/ejb3/trunk/core/pom.xml	(revision 77377)
+++ /home/bes/dev/ejb3/trunk/core/pom.xml	(working copy)
@@ -367,6 +367,12 @@
       <artifactId>jboss-ejb3-proxy</artifactId>
       <version>0.1.2</version>
     </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.ejb3</groupId>
+      <artifactId>jboss-ejb3-proxy-clustered</artifactId>
+      <version>0.1.3-SNAPSHOT</version>
+    </dependency>
    
     <dependency>
       <groupId>org.jboss.ejb3</groupId>
Index: /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/EJBContainer.java
===================================================================
--- /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/EJBContainer.java	(revision 77377)
+++ /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/EJBContainer.java	(working copy)
@@ -220,6 +220,16 @@
       
       this.ejbName = ejbName;
       
+      String on = createObjectName(ejbName);     
+      try
+      {
+         objectName = new ObjectName(on);
+      }
+      catch (MalformedObjectNameException e)
+      {
+         throw new RuntimeException("failed to create object name for: " + on, e);
+      }
+      
       // Because interceptors will query back the EJBContainer for annotations
       // we must have set beanContainer first and then do the advisor. 
       try
@@ -230,16 +240,6 @@
       {
          throw new RuntimeException("failed to initialize bean container ",e);
       }
-      String on = createObjectName(ejbName);
-     
-      try
-      {
-         objectName = new ObjectName(on);
-      }
-      catch (MalformedObjectNameException e)
-      {
-         throw new RuntimeException("failed to create object name for: " + on, e);
-      }
       
       //annotations = new AnnotationRepositoryToMetaData(this);
       
Index: /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java
===================================================================
--- /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java	(revision 77377)
+++ /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java	(working copy)
@@ -57,8 +57,12 @@
 import org.jboss.ejb3.annotation.LocalBinding;
 import org.jboss.ejb3.annotation.RemoteBinding;
 import org.jboss.ejb3.annotation.RemoteBindings;
+import org.jboss.ejb3.common.registrar.spi.Ejb3Registrar;
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
 import org.jboss.ejb3.proxy.ProxyFactory;
 import org.jboss.ejb3.proxy.ProxyUtils;
+import org.jboss.ejb3.proxy.clustered.objectstore.ClusteredObjectStoreBindings;
+import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
 import org.jboss.ejb3.proxy.container.InvokableContext;
 import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
 import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
@@ -181,13 +185,11 @@
     */
    public Map<String, HATarget> getClusterFamilies()
    {
-      if(clusterFamilies != null)
-         return clusterFamilies;
-      
-      synchronized (this)
-      {
-         if(clusterFamilies == null)
-            clusterFamilies = new HashMap<String, HATarget>();
+      if(clusterFamilies == null)
+      {      
+         Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();
+         ProxyClusteringRegistry registry = (ProxyClusteringRegistry) registrar.lookup(ClusteredObjectStoreBindings.CLUSTERED_OBJECTSTORE_BEAN_NAME_PROXY_CLUSTERING_REGISTRY);
+         clusterFamilies = registry.getHATargets(this.getObjectName().getCanonicalName());
       }
       return clusterFamilies;
    }
Index: /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java
===================================================================
--- /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java	(revision 77377)
+++ /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java	(working copy)
@@ -72,6 +72,7 @@
 import org.jboss.ejb3.interceptors.container.StatefulSessionContainerMethodInvocation;
 import org.jboss.ejb3.proxy.ProxyFactory;
 import org.jboss.ejb3.proxy.ProxyUtils;
+import org.jboss.ejb3.proxy.clustered.objectstore.ClusteredObjectStoreBindings;
 import org.jboss.ejb3.proxy.container.StatefulSessionInvokableContext;
 import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
 import org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionProxyFactory;
@@ -355,7 +356,8 @@
     */
    protected String getJndiRegistrarBindName()
    {
-      return ObjectStoreBindings.OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SFSB;
+      return isClustered() ? ClusteredObjectStoreBindings.CLUSTERED_OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SFSB
+                           : ObjectStoreBindings.OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SFSB;
    }
 
    /**
Index: /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java
===================================================================
--- /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java	(revision 77377)
+++ /home/bes/dev/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java	(working copy)
@@ -55,6 +55,7 @@
 import org.jboss.ejb3.annotation.RemoteBinding;
 import org.jboss.ejb3.common.lang.SerializableMethod;
 import org.jboss.ejb3.proxy.ProxyUtils;
+import org.jboss.ejb3.proxy.clustered.objectstore.ClusteredObjectStoreBindings;
 import org.jboss.ejb3.proxy.container.InvokableContext;
 import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
 import org.jboss.ejb3.proxy.factory.SessionProxyFactory;
@@ -740,7 +741,8 @@
     */
    protected String getJndiRegistrarBindName()
    {
-      return ObjectStoreBindings.OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SLSB;
+      return isClustered() ? ClusteredObjectStoreBindings.CLUSTERED_OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SLSB
+                           : ObjectStoreBindings.OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SLSB;
    }
    
    static class WSCallbackImpl implements BeanContextLifecycleCallback
Index: /home/bes/dev/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml
===================================================================
--- /home/bes/dev/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml	(revision 77377)
+++ /home/bes/dev/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml	(working copy)
@@ -274,16 +274,10 @@
    
    <!-- 
     
-    JNDI Registrars
-    
+    JNDI Registrars   
     
     The JNDI Registrar is responsible for all JNDI Bindings for
-    an EJB.  Its constructor takes the following arguments, in order:
-    
-    javax.naming.Context (JNDI Context into which to bind objects)
-    org.jboss.ejb3.proxy.spi.registry.ProxyFactoryRegistry (Implementation of ProxyFactoryRegistry)
-    String statelessSessionProxyObjectFactoryType The JNDI ObjectFactory implementation to use for SLSB
-    ...more later when SFSB, @Service, MDB Implemented
+    an EJB.
     
   -->
 
@@ -306,5 +300,30 @@
       </parameter>
     </constructor>
   </bean>
+
+  <bean name="org.jboss.ejb3.ProxyClusteringRegistry"
+        class="org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry"/>
+
+  <!-- Clustered SLSB JNDI Registrar -->
+  <bean name="org.jboss.ejb3.JndiRegistrar.Session.ClusteredSLSBJndiRegistrar"
+    class="org.jboss.ejb3.proxy.clustered.jndiregistrar.JndiClusteredStatelessSessionRegistrar">
+    <constructor>
+      <parameter>
+        org.jboss.ejb3.proxy.clustered.objectfactory.session.stateless.StatelessSessionClusteredProxyObjectFactory
+      </parameter>
+      <parameter><inject bean="org.jboss.ejb3.ProxyClusteringRegistry"/></parameter>
+    </constructor>
+  </bean>
+
+  <!-- Clustered SFSB JNDI Registrar -->
+  <bean name="org.jboss.ejb3.JndiRegistrar.Session.ClusteredSFSBJndiRegistrar"
+    class="org.jboss.ejb3.proxy.clustered.jndiregistrar.JndiClusteredStatefulSessionRegistrar">
+    <constructor>
+      <parameter>
+        org.jboss.ejb3.proxy.clustered.objectfactory.session.stateful.StatefulSessionClusteredProxyObjectFactory
+      </parameter>
+      <parameter><inject bean="org.jboss.ejb3.ProxyClusteringRegistry"/></parameter>
+    </constructor>
+  </bean>
    
 </deployment>
