[jboss-cvs] JBossAS SVN: r75882 - in projects/ejb3/trunk/core: src/main/java/org/jboss/ejb3/proxy/factory and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jul 16 06:01:53 EDT 2008


Author: ALRubinger
Date: 2008-07-16 06:01:53 -0400 (Wed, 16 Jul 2008)
New Revision: 75882

Added:
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulLocalProxyFactory.java
Removed:
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulLocalProxyFactory.java
Modified:
   projects/ejb3/trunk/core/pom.xml
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulClusterProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/BaseStatelessRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessClusterProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessLocalProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/stateless/unit/StatelessContainerTestCase.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/cachepassivation/unit/CachePassivationUnitTestCase.java
Log:
[JBMETA-68] Refactoring EJB3 Core alongside jboss-metadata to bind interface-specific addresses

Modified: projects/ejb3/trunk/core/pom.xml
===================================================================
--- projects/ejb3/trunk/core/pom.xml	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/pom.xml	2008-07-16 10:01:53 UTC (rev 75882)
@@ -330,7 +330,7 @@
     <dependency>
       <groupId>org.jboss.ejb3</groupId>
       <artifactId>jboss-ejb3-common</artifactId>
-      <version>0.1.2</version>
+      <version>0.1.3-SNAPSHOT</version>
     </dependency>
 
     <dependency>

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -43,7 +43,6 @@
 import javax.ejb.Handle;
 import javax.ejb.HomeHandle;
 import javax.ejb.RemoteHome;
-import javax.naming.NameNotFoundException;
 import javax.naming.NamingException;
 
 import org.jboss.ejb3.EJBContainer;
@@ -219,15 +218,16 @@
             String jndiName = JbossSessionBeanJndiNameResolver.resolveJndiName(smd, businessInterface);
             log.debug("Binding proxy for " + getContainer().getEjbName() + ", interface " + businessInterface
                   + " in JNDI at " + jndiName);
-            if(Proxy.isProxyClass(proxy.getClass()))
+            if (Proxy.isProxyClass(proxy.getClass()))
             {
-               for(Class<?> in : proxy.getClass().getInterfaces())
+               for (Class<?> in : proxy.getClass().getInterfaces())
                {
-                 log.debug("Proxy Interface for JNDI Name " + jndiName + ": " + in);
+                  log.debug("Proxy Interface for JNDI Name " + jndiName + ": " + in);
                }
             }
             Util.rebind(this.getContainer().getInitialContext(), jndiName, proxy);
          }
+
          
       } catch (NamingException e)
       {
@@ -239,6 +239,7 @@
       }
    }
    
+   
    /**
     * Returns whether this Proxy Factory is local.  A Hack until EJB3 Proxy 
     * is in place, but this keeps us moving forward easily.
@@ -246,8 +247,12 @@
     * @deprecated Hack
     * @return
     */
-   protected abstract boolean isLocal();
-   
+   @Deprecated
+   protected boolean isLocal()
+   {
+      return false;
+   }
+
    /**
     * Whether or not to bind the home and business interfaces together
     * 

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -44,6 +44,7 @@
 import javax.management.ObjectName;
 
 import org.jboss.ejb3.Container;
+import org.jboss.ejb3.DeploymentScope;
 import org.jboss.ejb3.EJBContainer;
 import org.jboss.ejb3.KernelAbstraction;
 import org.jboss.ejb3.KernelAbstractionFactory;
@@ -55,12 +56,16 @@
 import org.jboss.ejb3.annotation.impl.LocalImpl;
 import org.jboss.ejb3.annotation.impl.RemoteImpl;
 import org.jboss.ejb3.common.lang.ClassHelper;
+import org.jboss.ejb3.service.ServiceContainer;
 import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.stateful.StatefulContainer;
 import org.jboss.ejb3.stateless.StatelessContainer;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.ejb.jboss.jndipolicy.spi.JbossEnterpriseBeanJndiNameResolver;
-import org.jboss.metadata.ejb.jboss.jndipolicy.spi.JbossSessionBeanJndiNameResolver;
+import org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy;
+import org.jboss.metadata.ejb.jboss.jndipolicy.spi.DefaultJndiBindingPolicy;
+import org.jboss.metadata.ejb.jboss.jndipolicy.spi.DeploymentSummary;
+import org.jboss.metadata.ejb.jboss.jndipolicy.spi.EjbDeploymentSummary;
 
 /**
  * Comment
@@ -410,6 +415,8 @@
 
       // Initialize to defaults of remote and not home
       String jndiName = null;
+      boolean isHome = false;
+      boolean isLocal = false;
 
       // Determine if remote
       Class<?>[] remotes = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(container);
@@ -447,6 +454,9 @@
                // Encountered, return
                return binding.jndiBinding();
             }
+
+            // Set home for policy
+            isHome = true;
          }
       }
 
@@ -463,6 +473,10 @@
                // Encountered, return
                return binding.jndiBinding();
             }
+
+            // Set local and home for policy
+            isHome = true;
+            isLocal = true;
          }
       }
 
@@ -479,6 +493,9 @@
                // Encountered, return
                return binding.jndiBinding();
             }
+
+            // Set local for policy
+            isLocal = true;
          }
       }
 
@@ -490,7 +507,8 @@
                + businessInterface.getName());
 
          // Set JNDI name
-         jndiName = JbossEnterpriseBeanJndiNameResolver.resolveJndiName(container.getXml(), businessInterface.getName());
+         JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData) container.getXml();
+         jndiName = smd.getJndiName();
       }
 
       // Return
@@ -842,9 +860,8 @@
       if (binding != null)
          return binding.jndiBinding();
 
-      // Use metadata
-      String jndiName = JbossSessionBeanJndiNameResolver.resolveRemoteHomeJndiName((JBossSessionBeanMetaData) container
-            .getXml());
+      JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
+      String jndiName = smd.getHomeJndiName();
       return jndiName;
    }
 
@@ -855,9 +872,9 @@
       if (binding != null)
          return binding.jndiBinding();
 
-      // Use metadata
-      String jndiName = JbossSessionBeanJndiNameResolver.resolveLocalHomeJndiName((JBossSessionBeanMetaData) container
-            .getXml());
+      // Use Default JNDI Binding Policy
+      JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
+      String jndiName = smd.getLocalHomeJndiName();
       return jndiName;
    }
 
@@ -872,11 +889,10 @@
       LocalBinding localBinding = container.getAnnotation(LocalBinding.class);
 
       // If none specified
-      if (localBinding == null)
+      if (localBinding == null || localBinding.jndiBinding() != null || localBinding.jndiBinding().trim().length() == 0)
       {
-         // Get JNDI name from metadata
-         String name = JbossSessionBeanJndiNameResolver
-               .resolveLocalBusinessDefaultJndiName((JBossSessionBeanMetaData) container.getXml());
+         JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
+         String name = smd.getLocalJndiName();
 
          // If we should check for naming conflict
          if (conflictCheck){
@@ -910,16 +926,18 @@
    {
       if (container.getAnnotation(Local.class) != null)
       {
-         JBossSessionBeanMetaData md = (JBossSessionBeanMetaData) container.getXml();
-         String localJndiName = JbossSessionBeanJndiNameResolver.resolveLocalBusinessDefaultJndiName(md);
-         String remoteJndiName = JbossSessionBeanJndiNameResolver.resolveRemoteBusinessDefaultJndiName(md);
+         JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
+         String localJndiName = smd.getLocalJndiName();
+         String remoteJndiName = smd.getJndiName();
          String ejbName = container.getEjbName();
-         if ((localJndiName.equals(remoteJndiName)))
+         if (localJndiName != null)
          {
-            throw new javax.ejb.EJBException("Conflict between default jndi name " + remoteJndiName
-                  + " for both remote and local for ejb-name:" + ejbName + ", bean class=" + container.getBeanClass());
+            if (localJndiName.equals(remoteJndiName) || localJndiName.startsWith(remoteJndiName + "/"))
+               throw new javax.ejb.EJBException("Conflict between default jndi name " + remoteJndiName
+                     + " for both remote and local for ejb-name:" + ejbName + ", bean class="
+                     + container.getBeanClass() + "\nLocal JNDI Name: " + localJndiName + "\nRemote JNDI Name: "
+                     + remoteJndiName);
          }
-
       }
    }
 
@@ -960,78 +978,8 @@
 
    public static String getDefaultRemoteBusinessJndiName(EJBContainer container)
    {
-      // Return the policy's default remote name for this summary
-      return JbossSessionBeanJndiNameResolver.resolveRemoteBusinessDefaultJndiName((JBossSessionBeanMetaData) container
-            .getXml());
+      JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
+      String jndiName = smd.getJndiName();
+      return jndiName;
    }
-
-   /*
-    * Commented out; not used
-    */
-//   /**
-//    * Obtains the JNDI Binding Policy for the specified container
-//    * 
-//    * @param container
-//    * @author ALR
-//    * @return
-//    */
-//   private static DefaultJndiBindingPolicy getJndiBindingPolicy(EJBContainer container)
-//   {
-//      // Attempt to obtain the binding policy from annotation repo
-//      JndiBindingPolicy bindingPolicy = container.getAnnotation(JndiBindingPolicy.class);
-//
-//      // Initialize
-//      Class<? extends DefaultJndiBindingPolicy> policy = null;
-//      
-//      // If policy is defined
-//      if (bindingPolicy != null){
-//         // Use it
-//         policy = bindingPolicy.policy();
-//      }
-//      // No policy defined
-//      else
-//      {
-//         // Use default policy
-//         Class<? extends DefaultJndiBindingPolicy> policyClass = BasicJndiBindingPolicy.class;
-//         // Log warning
-//         log.warn("No default JNDI Binding Policy Defined (see ejb3-interceptors-aop.xml for example); defaulting to "
-//               + policyClass.getName());
-//         policy = policyClass;
-//      }
-//      
-//      // Log
-//      log.debug("Obtaining JNDI name from policy " + policy.getName());
-//
-//      try
-//      {
-//         // Instanciate the policy and return
-//         return policy.newInstance();
-//      }
-//      catch (InstantiationException e)
-//      {
-//         throw new RuntimeException("Could not instanciate JNDI Binding Policy: " + policy.getName(), e);
-//      }
-//      catch (IllegalAccessException e)
-//      {
-//         throw new RuntimeException(e);
-//      }
-//   }
-//
-//   private static EjbDeploymentSummary getDeploymentSummaryFromContainer(EJBContainer container)
-//   {
-//      // Construct Deployment Summary
-//      DeploymentSummary dsummary = new DeploymentSummary();
-//      dsummary.setDeploymentName(container.getDeployment().getName());
-//      DeploymentScope scope = container.getDeployment().getEar();
-//      if (scope != null)
-//      {
-//         dsummary.setDeploymentScopeBaseName(scope.getBaseName());
-//      }
-//      
-//      // Construct EjbDeploymetSummary
-//      EjbDeploymentSummary summary = new EjbDeploymentSummary(container.getXml(),dsummary);
-//      
-//      // Return
-//      return summary;
-//   }
 }
\ No newline at end of file

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulProxyFactory.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulProxyFactory.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -25,9 +25,6 @@
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NamingException;
 import javax.naming.RefAddr;
 import javax.naming.Reference;
 import javax.naming.StringRefAddr;

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulRemoteProxyFactory.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulRemoteProxyFactory.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -36,8 +36,6 @@
 import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.ejb3.stateful.StatefulHandleRemoteImpl;
 import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.ejb.jboss.jndipolicy.spi.JbossSessionBeanJndiNameResolver;
 import org.jboss.remoting.InvokerLocator;
 
 /**
@@ -64,8 +62,7 @@
    // Constructor
    public BaseStatefulRemoteProxyFactory(SessionSpecContainer container, RemoteBinding binding)
    {
-      super(container, JbossSessionBeanJndiNameResolver
-            .resolveRemoteBusinessDefaultJndiName((JBossSessionBeanMetaData) container.getXml()));
+      super(container, ProxyFactoryHelper.getRemoteBusinessJndiName(container));
       
       this.binding = binding;
       

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulClusterProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulClusterProxyFactory.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulClusterProxyFactory.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -109,19 +109,6 @@
    }
    
    /**
-    * Returns whether this Proxy Factory is local.  A Hack until EJB3 Proxy 
-    * is in place, but this keeps us moving forward easily.
-    * 
-    * @deprecated Hack
-    * @return
-    */
-   @Deprecated
-   protected boolean isLocal()
-   {
-      return false;
-   }
-   
-   /**
     * Defines the access type for this Proxies created by this Factory
     * 
     * @return

Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulLocalProxyFactory.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulLocalProxyFactory.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -1,245 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.proxy.factory.stateful;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.rmi.dgc.VMID;
-
-import javax.ejb.EJBLocalObject;
-import javax.ejb.LocalHome;
-import javax.naming.NamingException;
-
-import org.jboss.ejb3.Ejb3Registry;
-import org.jboss.ejb3.SpecificationInterfaceType;
-import org.jboss.ejb3.annotation.LocalBinding;
-import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
-import org.jboss.ejb3.proxy.handler.stateful.StatefulLocalHomeProxyInvocationHandler;
-import org.jboss.ejb3.proxy.handler.stateful.StatefulLocalProxyInvocationHandler;
-import org.jboss.ejb3.session.ProxyAccessType;
-import org.jboss.ejb3.session.SessionContainer;
-import org.jboss.ejb3.session.SessionSpecContainer;
-import org.jboss.proxy.ejb.handle.StatefulHandleImpl;
-import org.jboss.util.NotImplementedException;
-import org.jboss.util.naming.Util;
-
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public class StatefulLocalProxyFactory extends BaseStatefulProxyFactory
-{
-   private VMID vmid = Ejb3Registry.getVMID();
-   
-   /**
-    * Do not call, only for externalizable
-    */
-   public StatefulLocalProxyFactory()
-   {
-      super();
-   }
-   
-   public StatefulLocalProxyFactory(SessionSpecContainer container, LocalBinding binding)
-   {
-      super(container, binding.jndiBinding());
-   }
-   
-   /**
-    * Returns the interface type for Home
-    * 
-    * @return
-    */
-   @Override
-   protected Class<?> getHomeType()
-   {
-      return ProxyFactoryHelper.getLocalHomeInterface(this.getContainer());
-   }
-   
-   /**
-    * Returns whether this Proxy Factory is local.  A Hack until EJB3 Proxy 
-    * is in place, but this keeps us moving forward easily.
-    * 
-    * @deprecated Hack
-    * @return
-    */
-   @Deprecated
-   protected boolean isLocal()
-   {
-      return true;
-   }
-
-   /**
-    * Defines the access type for this Proxies created by this Factory
-    * 
-    * @return
-    */
-   @Override
-   protected ProxyAccessType getProxyAccessType(){
-      return ProxyAccessType.LOCAL;
-   }
-   
-   protected void validateEjb21Views()
-   { 
-      // Obtain Container
-      SessionContainer container = this.getContainer();
-      
-      // Obtain @LocalHome
-      LocalHome localHome = container.getAnnotation(LocalHome.class);
-
-      // Ensure that if EJB 2.1 Components are defined, they're complete
-      this.validateEjb21Views(localHome == null ? null : localHome.value(), ProxyFactoryHelper
-            .getLocalInterfaces(container));
-
-   }
-   
-   /**
-    * Whether or not to bind the home and business interfaces together
-    * 
-    * @return
-    */
-   @Override
-   protected boolean bindHomeAndBusinessTogether()
-   {
-      return ProxyFactoryHelper.getLocalHomeJndiName(this.getContainer()).equals(this.jndiName);
-   }
-
-   public void start() throws Exception
-   {
-      super.start();
-
-      try
-      {
-         Util.rebind(getContainer().getInitialContext(), jndiName + PROXY_FACTORY_NAME, this);
-      }
-      catch (NamingException e)
-      {
-         NamingException namingException = new NamingException("Could not bind stateful local proxy with ejb name "
-               + getContainer().getEjbName() + " into JNDI under jndiName: "
-               + getContainer().getInitialContext().getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME);
-         namingException.setRootCause(e);
-         throw namingException;
-      }
-
-      SessionContainer statefulContainer = (SessionContainer) getContainer();
-      LocalHome localHome = this.getContainer().getAnnotation(LocalHome.class);
-      if (localHome != null && !bindHomeAndBusinessTogether())
-      {
-         Class<?>[] interfaces =
-         {localHome.value()};
-         Object homeProxy = java.lang.reflect.Proxy.newProxyInstance(statefulContainer.getBeanClass().getClassLoader(),
-               interfaces, new StatefulLocalHomeProxyInvocationHandler(statefulContainer));
-         Util.rebind(statefulContainer.getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(statefulContainer),
-               homeProxy);
-      }
-   }
-
-   public void stop() throws Exception
-   {
-      super.stop();
-      Util.unbind(getContainer().getInitialContext(), jndiName + PROXY_FACTORY_NAME);
-      SessionContainer statefulContainer = this.getContainer();
-      LocalHome localHome = this.getContainer().getAnnotation(LocalHome.class);
-      if (localHome != null && !bindHomeAndBusinessTogether())
-      {
-         Util.unbind(statefulContainer.getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(statefulContainer));
-      }
-   }
-
-   public Object createProxyBusiness()
-   {
-      SessionContainer sfsb = (SessionContainer) getContainer();
-      Object id = sfsb.createSession();
-      return this.createProxyBusiness(id);
-   }
-   
-   public EJBLocalObject createProxyEjb21(String businessInterfaceType)
-   {
-      Object id = getContainer().createSession();
-      return this.createProxyEjb21(id, businessInterfaceType);
-   }
-   
-   public Object createProxyBusiness(String businessInterfaceType)
-   {
-      return this.createProxyBusiness(null, businessInterfaceType);
-   }
-
-   public Object createProxyBusiness(Object id)
-   {
-      return this.createProxyBusiness(id, null);
-   }
-
-   public Object createProxyBusiness(Object id, String businessInterfaceType)
-   {
-      return this.createProxy(id, SpecificationInterfaceType.EJB30_BUSINESS, businessInterfaceType);
-   }
-
-   @SuppressWarnings("unchecked")
-   public <T extends EJBLocalObject> T createProxyEjb21(Object id, String businessInterfaceType)
-   {
-      return (T) this.createProxy(id, SpecificationInterfaceType.EJB21, null);
-   }
-
-   private Object createProxy(Object id, SpecificationInterfaceType type, String businessInterfaceType)
-   {
-      StatefulLocalProxyInvocationHandler proxy = new StatefulLocalProxyInvocationHandler(this.getContainer(), id,
-            vmid, businessInterfaceType);
-      return type.equals(SpecificationInterfaceType.EJB30_BUSINESS) ? this.constructProxyBusiness(proxy) : this
-            .constructEjb21Proxy(proxy);
-   }
-
-   public Object createProxy(Class<?>[] initTypes, Object[] initValues)
-   {
-      SessionContainer sfsb = (SessionContainer) getContainer();
-      Object id = sfsb.createSession(initTypes, initValues);
-      return this.createProxy(id, SpecificationInterfaceType.EJB30_BUSINESS, null);
-   }
-
-   public Object createProxyEjb21(Class<?>[] initTypes, Object[] initValues, String businessInterfaceType)
-   {
-      SessionContainer sfsb = (SessionContainer) getContainer();
-      Object id = sfsb.createSession(initTypes, initValues);
-      return this.createProxyEjb21(id, businessInterfaceType);
-   }
-
-   protected StatefulHandleImpl createHandle()
-   {
-      throw new NotImplementedException("NYI");
-   }
-   
-   @Override
-   public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
-   {
-      super.readExternal(in);
-      vmid = (VMID)in.readObject();
-   }
-
-   @Override
-   public void writeExternal(ObjectOutput out) throws IOException
-   {
-      super.writeExternal(out);
-      out.writeObject(vmid);
-   }
-}

Added: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulLocalProxyFactory.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulLocalProxyFactory.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -0,0 +1,250 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.proxy.factory.stateful;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.rmi.dgc.VMID;
+
+import javax.ejb.EJBLocalObject;
+import javax.ejb.LocalHome;
+import javax.naming.NamingException;
+
+import org.jboss.ejb3.Ejb3Registry;
+import org.jboss.ejb3.SpecificationInterfaceType;
+import org.jboss.ejb3.annotation.LocalBinding;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
+import org.jboss.ejb3.proxy.handler.stateful.StatefulLocalHomeProxyInvocationHandler;
+import org.jboss.ejb3.proxy.handler.stateful.StatefulLocalProxyInvocationHandler;
+import org.jboss.ejb3.session.ProxyAccessType;
+import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
+import org.jboss.proxy.ejb.handle.StatefulHandleImpl;
+import org.jboss.util.NotImplementedException;
+import org.jboss.util.naming.Util;
+
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision$
+ */
+public class StatefulLocalProxyFactory extends BaseStatefulProxyFactory
+{
+   private VMID vmid = Ejb3Registry.getVMID();
+   
+   /**
+    * Do not call, only for externalizable
+    */
+   public StatefulLocalProxyFactory()
+   {
+      super();
+   }
+   
+   public StatefulLocalProxyFactory(SessionSpecContainer container, LocalBinding binding)
+   {
+      super(container, ProxyFactoryHelper.getLocalJndiName(container));
+   }
+   
+   /**
+    * Returns the interface type for Home
+    * 
+    * @return
+    */
+   @Override
+   protected Class<?> getHomeType()
+   {
+      return ProxyFactoryHelper.getLocalHomeInterface(this.getContainer());
+   }
+
+   /**
+    * Defines the access type for this Proxies created by this Factory
+    * 
+    * @return
+    */
+   @Override
+   protected ProxyAccessType getProxyAccessType(){
+      return ProxyAccessType.LOCAL;
+   }
+   
+   protected void validateEjb21Views()
+   { 
+      // Obtain Container
+      SessionContainer container = this.getContainer();
+      
+      // Obtain @LocalHome
+      LocalHome localHome = container.getAnnotation(LocalHome.class);
+
+      // Ensure that if EJB 2.1 Components are defined, they're complete
+      this.validateEjb21Views(localHome == null ? null : localHome.value(), ProxyFactoryHelper
+            .getLocalInterfaces(container));
+
+   }
+   
+   /**
+    * Whether or not to bind the home and business interfaces together
+    * 
+    * @return
+    */
+   @Override
+   protected boolean bindHomeAndBusinessTogether()
+   {
+      String localHomeJndiName = ProxyFactoryHelper.getLocalHomeJndiName(this.getContainer());
+      if(localHomeJndiName!=null)
+      {
+         return localHomeJndiName.equals(this.jndiName);
+      }
+      return false;
+   }
+   
+   /**
+    * Returns whether this Proxy Factory is local.  A Hack until EJB3 Proxy 
+    * is in place, but this keeps us moving forward easily.
+    * 
+    * @deprecated Hack
+    * @return
+    */
+   @Deprecated
+   protected boolean isLocal()
+   {
+      return true;
+   }
+
+   public void start() throws Exception
+   {
+      super.start();
+
+      try
+      {
+         Util.rebind(getContainer().getInitialContext(), jndiName + PROXY_FACTORY_NAME, this);
+      }
+      catch (NamingException e)
+      {
+         NamingException namingException = new NamingException("Could not bind stateful local proxy with ejb name "
+               + getContainer().getEjbName() + " into JNDI under jndiName: "
+               + getContainer().getInitialContext().getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME);
+         namingException.setRootCause(e);
+         throw namingException;
+      }
+
+      SessionContainer statefulContainer = (SessionContainer) getContainer();
+      LocalHome localHome = this.getContainer().getAnnotation(LocalHome.class);
+      if (localHome != null && !bindHomeAndBusinessTogether())
+      {
+         Class<?>[] interfaces =
+         {localHome.value()};
+         Object homeProxy = java.lang.reflect.Proxy.newProxyInstance(statefulContainer.getBeanClass().getClassLoader(),
+               interfaces, new StatefulLocalHomeProxyInvocationHandler(statefulContainer));
+         Util.rebind(statefulContainer.getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(statefulContainer),
+               homeProxy);
+      }
+   }
+
+   public void stop() throws Exception
+   {
+      super.stop();
+      Util.unbind(getContainer().getInitialContext(), jndiName + PROXY_FACTORY_NAME);
+      SessionContainer statefulContainer = this.getContainer();
+      LocalHome localHome = this.getContainer().getAnnotation(LocalHome.class);
+      if (localHome != null && !bindHomeAndBusinessTogether())
+      {
+         Util.unbind(statefulContainer.getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(statefulContainer));
+      }
+   }
+
+   public Object createProxyBusiness()
+   {
+      SessionContainer sfsb = (SessionContainer) getContainer();
+      Object id = sfsb.createSession();
+      return this.createProxyBusiness(id);
+   }
+   
+   public EJBLocalObject createProxyEjb21(String businessInterfaceType)
+   {
+      Object id = getContainer().createSession();
+      return this.createProxyEjb21(id, businessInterfaceType);
+   }
+   
+   public Object createProxyBusiness(String businessInterfaceType)
+   {
+      return this.createProxyBusiness(null, businessInterfaceType);
+   }
+
+   public Object createProxyBusiness(Object id)
+   {
+      return this.createProxyBusiness(id, null);
+   }
+
+   public Object createProxyBusiness(Object id, String businessInterfaceType)
+   {
+      return this.createProxy(id, SpecificationInterfaceType.EJB30_BUSINESS, businessInterfaceType);
+   }
+
+   @SuppressWarnings("unchecked")
+   public <T extends EJBLocalObject> T createProxyEjb21(Object id, String businessInterfaceType)
+   {
+      return (T) this.createProxy(id, SpecificationInterfaceType.EJB21, null);
+   }
+
+   private Object createProxy(Object id, SpecificationInterfaceType type, String businessInterfaceType)
+   {
+      StatefulLocalProxyInvocationHandler proxy = new StatefulLocalProxyInvocationHandler(this.getContainer(), id,
+            vmid, businessInterfaceType);
+      return type.equals(SpecificationInterfaceType.EJB30_BUSINESS) ? this.constructProxyBusiness(proxy) : this
+            .constructEjb21Proxy(proxy);
+   }
+
+   public Object createProxy(Class<?>[] initTypes, Object[] initValues)
+   {
+      SessionContainer sfsb = (SessionContainer) getContainer();
+      Object id = sfsb.createSession(initTypes, initValues);
+      return this.createProxy(id, SpecificationInterfaceType.EJB30_BUSINESS, null);
+   }
+
+   public Object createProxyEjb21(Class<?>[] initTypes, Object[] initValues, String businessInterfaceType)
+   {
+      SessionContainer sfsb = (SessionContainer) getContainer();
+      Object id = sfsb.createSession(initTypes, initValues);
+      return this.createProxyEjb21(id, businessInterfaceType);
+   }
+
+   protected StatefulHandleImpl createHandle()
+   {
+      throw new NotImplementedException("NYI");
+   }
+   
+   @Override
+   public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+   {
+      super.readExternal(in);
+      vmid = (VMID)in.readObject();
+   }
+
+   @Override
+   public void writeExternal(ObjectOutput out) throws IOException
+   {
+      super.writeExternal(out);
+      out.writeObject(vmid);
+   }
+}

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulRemoteProxyFactory.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulRemoteProxyFactory.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -63,19 +63,6 @@
    {
       super(container, binding);
    }
-   
-   /**
-    * Returns whether this Proxy Factory is local.  A Hack until EJB3 Proxy 
-    * is in place, but this keeps us moving forward easily.
-    * 
-    * @deprecated Hack
-    * @return
-    */
-   @Deprecated
-   protected boolean isLocal()
-   {
-      return false;
-   }
 
    @Override
    public void start() throws Exception

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/BaseStatelessRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/BaseStatelessRemoteProxyFactory.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/BaseStatelessRemoteProxyFactory.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -14,8 +14,6 @@
 import org.jboss.ejb3.session.SessionContainer;
 import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.ejb3.stateless.StatelessHandleRemoteImpl;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.ejb.jboss.jndipolicy.spi.JbossSessionBeanJndiNameResolver;
 import org.jboss.remoting.InvokerLocator;
 
 public abstract class BaseStatelessRemoteProxyFactory extends BaseStatelessProxyFactory implements RemoteProxyFactory
@@ -30,8 +28,7 @@
    // Constructor
    public BaseStatelessRemoteProxyFactory(SessionSpecContainer container, RemoteBinding binding)
    {
-      super(container, JbossSessionBeanJndiNameResolver
-            .resolveRemoteBusinessDefaultJndiName((JBossSessionBeanMetaData) container.getXml()));
+      super(container, ProxyFactoryHelper.getRemoteBusinessJndiName(container));
       
       this.binding = binding;
       

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessClusterProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessClusterProxyFactory.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessClusterProxyFactory.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -81,19 +81,6 @@
       this.binding = binding;
       this.clustered = clustered;
    }
-   
-   /**
-    * Returns whether this Proxy Factory is local.  A Hack until EJB3 Proxy 
-    * is in place, but this keeps us moving forward easily.
-    * 
-    * @deprecated Hack
-    * @return
-    */
-   @Deprecated
-   protected boolean isLocal()
-   {
-      return false;
-   }
 
    public void start() throws Exception
    {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessLocalProxyFactory.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessLocalProxyFactory.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -33,8 +33,6 @@
 import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.ejb3.stateless.StatelessHandleRemoteImpl;
 import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.ejb.jboss.jndipolicy.spi.JbossSessionBeanJndiNameResolver;
 import org.jboss.util.naming.Util;
 
 
@@ -50,8 +48,7 @@
    
    public StatelessLocalProxyFactory(SessionSpecContainer container, LocalBinding binding)
    {
-      super(container, JbossSessionBeanJndiNameResolver
-            .resolveLocalBusinessDefaultJndiName((JBossSessionBeanMetaData) container.getXml()));
+      super(container, ProxyFactoryHelper.getLocalJndiName(container));
    }
    
    /**
@@ -71,7 +68,19 @@
    {
       return ProxyAccessType.LOCAL;
    }
+
    
+   protected void validateEjb21Views(){
+      
+      EJBContainer container = this.getContainer();
+      
+      LocalHome localHome = container.getAnnotation(LocalHome.class);
+      
+      // Ensure that if EJB 2.1 Components are defined, they're complete
+      this.validateEjb21Views(localHome == null ? null : localHome.value(), ProxyFactoryHelper
+            .getLocalInterfaces(container));
+   }
+   
    /**
     * Returns whether this Proxy Factory is local.  A Hack until EJB3 Proxy 
     * is in place, but this keeps us moving forward easily.
@@ -80,23 +89,12 @@
     * @return
     */
    @Deprecated
+   @Override
    protected boolean isLocal()
    {
       return true;
    }
-
    
-   protected void validateEjb21Views(){
-      
-      EJBContainer container = this.getContainer();
-      
-      LocalHome localHome = container.getAnnotation(LocalHome.class);
-      
-      // Ensure that if EJB 2.1 Components are defined, they're complete
-      this.validateEjb21Views(localHome == null ? null : localHome.value(), ProxyFactoryHelper
-            .getLocalInterfaces(container));
-   }
-   
    /**
     * Whether or not to bind the home and business interfaces together
     * 
@@ -105,7 +103,12 @@
    @Override
    protected boolean bindHomeAndBusinessTogether()
    {
-      return ProxyFactoryHelper.getLocalHomeJndiName(this.getContainer()).equals(jndiName);
+      String localHomeJndiName = ProxyFactoryHelper.getLocalHomeJndiName(this.getContainer());
+      if(localHomeJndiName!=null)
+      {
+         return localHomeJndiName.equals(jndiName);
+      }
+      return false;
    }
 
    @Override

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessRemoteProxyFactory.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessRemoteProxyFactory.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -62,26 +62,21 @@
    protected boolean bindHomeAndBusinessTogether()
    {
       SessionSpecContainer container = this.getContainer();
-      return ProxyFactoryHelper.getHomeJndiName(container).equals(ProxyFactoryHelper.getRemoteBusinessJndiName(container));
+      String homeJndiName = ProxyFactoryHelper.getHomeJndiName(container);
+      if(homeJndiName!=null)
+      {
+         return homeJndiName.equals(ProxyFactoryHelper.getRemoteBusinessJndiName(container));
+      }
+      else
+      {
+         return false;
+      }
    }
 
    public void init() throws Exception
    {
       super.init();
    }
-   
-   /**
-    * Returns whether this Proxy Factory is local.  A Hack until EJB3 Proxy 
-    * is in place, but this keeps us moving forward easily.
-    * 
-    * @deprecated Hack
-    * @return
-    */
-   @Deprecated
-   protected boolean isLocal()
-   {
-      return false;
-   }
 
    public void start() throws Exception
    {

Modified: projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml
===================================================================
--- projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml	2008-07-16 10:01:53 UTC (rev 75882)
@@ -173,9 +173,6 @@
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="ThreadlocalPool", maxSize=30, timeout=10000)
       </annotation>
-      <annotation expr="!class(@org.jboss.ejb3.annotation.JndiBindingPolicy)">
-         @org.jboss.ejb3.annotation.JndiBindingPolicy (policy=org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy.class)
-      </annotation>
    </domain>
 
    <domain name="JACC Stateless Bean" extends="Intercepted Bean" inheritBindings="true">
@@ -206,9 +203,6 @@
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="ThreadlocalPool", maxSize=30, timeout=10000)
       </annotation>
-      <annotation expr="!class(@org.jboss.ejb3.annotation.JndiBindingPolicy)">
-         @org.jboss.ejb3.annotation.JndiBindingPolicy (policy=org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy.class)
-      </annotation>
    </domain>
 
    <domain name="Base Stateful Bean" extends="Intercepted Bean" inheritBindings="true">
@@ -258,9 +252,6 @@
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="ThreadlocalPool", maxSize=30, timeout=10000)
       </annotation>
-      <annotation expr="!class(@org.jboss.ejb3.annotation.JndiBindingPolicy)">
-         @org.jboss.ejb3.annotation.JndiBindingPolicy (policy=org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy.class)
-      </annotation>
    </domain>
 
    <domain name="Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">
@@ -327,9 +318,6 @@
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="ThreadlocalPool", maxSize=30, timeout=10000)
       </annotation>
-      <annotation expr="!class(@org.jboss.ejb3.annotation.JndiBindingPolicy)">
-         @org.jboss.ejb3.annotation.JndiBindingPolicy (policy=org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy.class)
-      </annotation>
 
       <!-- NON Clustered cache configuration -->
       <annotation expr="!class(@org.jboss.ejb3.annotation.Cache) AND !class(@org.jboss.ejb3.annotation.Clustered)">
@@ -356,9 +344,6 @@
       <annotation expr="!class(@org.jboss.ejb3.annotation.Cache)">
          @org.jboss.ejb3.annotation.Cache ("NoPassivationCache")
       </annotation>
-      <annotation expr="!class(@org.jboss.ejb3.annotation.JndiBindingPolicy)">
-         @org.jboss.ejb3.annotation.JndiBindingPolicy (policy=org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy.class)
-      </annotation>
 
    </domain>
 
@@ -380,9 +365,6 @@
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=15, timeout=10000)
       </annotation>
-      <annotation expr="!class(@org.jboss.ejb3.annotation.JndiBindingPolicy)">
-         @org.jboss.ejb3.annotation.JndiBindingPolicy (policy=org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy.class)
-      </annotation>
    </domain>
 
    <domain name="Consumer Bean" extends="Intercepted Bean" inheritBindings="true">
@@ -406,9 +388,6 @@
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=15, timeout=10000)
       </annotation>
-      <annotation expr="!class(@org.jboss.ejb3.annotation.JndiBindingPolicy)">
-         @org.jboss.ejb3.annotation.JndiBindingPolicy (policy=org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy.class)
-      </annotation>
    </domain>
 
    <domain name="Service Bean" extends="Intercepted Bean" inheritBindings="true">
@@ -436,9 +415,6 @@
          <!-- interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
          <stack-ref name="EJBInterceptors"/>
       </bind>
-      <annotation expr="!class(@org.jboss.ejb3.annotation.JndiBindingPolicy)">
-         @org.jboss.ejb3.annotation.JndiBindingPolicy (policy=org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy.class)
-      </annotation>
    </domain>
 
    <domain name="JACC Service Bean" extends="Intercepted Bean" inheritBindings="true">
@@ -466,9 +442,6 @@
          <!-- interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
          <stack-ref name="EJBInterceptors"/>
       </bind>
-      <annotation expr="!class(@org.jboss.ejb3.annotation.JndiBindingPolicy)">
-         @org.jboss.ejb3.annotation.JndiBindingPolicy (policy=org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy.class)
-      </annotation>
    </domain>
 
 </aop>
\ No newline at end of file

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/stateless/unit/StatelessContainerTestCase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/stateless/unit/StatelessContainerTestCase.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/stateless/unit/StatelessContainerTestCase.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -23,7 +23,6 @@
 
 import static org.junit.Assert.assertEquals;
 
-import java.util.Enumeration;
 import java.util.Hashtable;
 
 import javax.naming.InitialContext;
@@ -75,11 +74,7 @@
       
       InitialContext ctx = new InitialContext();
       System.out.println("ctx = " + ctx);
-      Enumeration<?> i = container.getInitialContext().list("MyStatelessBean");
-      while(i.hasMoreElements())
-      {
-         System.out.println("  " + i.nextElement());   
-      }
+      //System.out.println("  " + container.getInitialContext().list("MyStatelessBean").next());
       MyStateless bean = (MyStateless) ctx.lookup("MyStatelessBean/local");
       
       String actual = bean.sayHi("Me");

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/cachepassivation/unit/CachePassivationUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/cachepassivation/unit/CachePassivationUnitTestCase.java	2008-07-16 09:57:50 UTC (rev 75881)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/cachepassivation/unit/CachePassivationUnitTestCase.java	2008-07-16 10:01:53 UTC (rev 75882)
@@ -76,8 +76,9 @@
       Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(bootstrap.getKernel()));
       
       ClassLoader cl = Thread.currentThread().getContextClassLoader();
-      String beanClassName = MockBean.class.getName();
-      String ejbName = "MockBean";
+      Class<?> beanClass = MockBean.class;
+      String beanClassName = beanClass.getName();
+      String ejbName = beanClass.getSimpleName();
       Domain domain = new Domain(new AspectManager(), "Test", false);
       Map<String, Class<? extends PersistenceManagerFactory>> factories = new HashMap<String, Class<? extends PersistenceManagerFactory>>();
       factories.put("MyStatefulSessionFilePersistenceManager", MyStatefulSessionFilePersistenceManagerFactory.class);




More information about the jboss-cvs-commits mailing list