Index: .classpath
===================================================================
--- .classpath	(revision 73544)
+++ .classpath	(working copy)
@@ -1,39 +1,40 @@
-<classpath>
-  <classpathentry kind="src" path="src/main/java"/>
-  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
-  <classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
-  <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
-  <classpathentry kind="output" path="target/classes"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javassist/3.6.0.GA/javassist-3.6.0.GA.jar" sourcepath="M2_REPO/org/jboss/javassist/3.6.0.GA/javassist-3.6.0.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar" sourcepath="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.4.GA/jboss-common-core-2.2.4.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.4.GA/jboss-common-core-2.2.4.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-logging-log4j/2.0.4.GA/jboss-common-logging-log4j-2.0.4.GA.jar" sourcepath="M2_REPO/jboss/jboss-common-logging-log4j/2.0.4.GA/jboss-common-logging-log4j-2.0.4.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA.jar" sourcepath="M2_REPO/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-container/2.0.0.Beta10/jboss-container-2.0.0.Beta10.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.Beta3Update1/jboss-ejb-api-3.0.0.Beta3Update1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.Beta3Update1/jboss-ejb-api-3.0.0.Beta3Update1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/0.3/jboss-ejb3-ext-api-0.3.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/0.3/jboss-ejb3-ext-api-0.3-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.0.Beta3Update1/jboss-javaee-5.0.0.Beta3Update1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.0.Beta3Update1/jboss-javaee-5.0.0.Beta3Update1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-jaxrpc/1.0.4.GA/jboss-jaxrpc-1.0.4.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-jaxws/2.0.1.GA/jboss-jaxws-2.0.1.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.Beta11/jboss-reflect-2.0.0.Beta11.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.0.Beta11/jboss-reflect-2.0.0.Beta11-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-test/1.0.5.GA/jboss-test-1.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-test/1.0.5.GA/jboss-test-1.0.5.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.Beta3Update1/jboss-transaction-api-1.0.1.Beta3Update1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.Beta3Update1/jboss-transaction-api-1.0.1.Beta3Update1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.0.0.Beta10/jboss-vfs-2.0.0.Beta10.jar" sourcepath="M2_REPO/org/jboss/jboss-vfs/2.0.0.Beta10/jboss-vfs-2.0.0.Beta10-sources.jar">
-    <attributes>
-      <attribute value="jar:file:/C:/cygwin/home/Kabir/sourcecontrol/local.mavenrepo/repository/org/jboss/jboss-vfs/2.0.0.Beta10/jboss-vfs-2.0.0.Beta10-javadoc.jar!/" name="javadoc_location"/>
-    </attributes>
-  </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/ws/jbossws-spi/1.0.2.GA/jbossws-spi-1.0.2.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.CR8/jbossxb-2.0.0.CR8.jar" sourcepath="M2_REPO/org/jboss/jbossxb/2.0.0.CR8/jbossxb-2.0.0.CR8-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src/test/java"/>
+  <classpathentry kind="src" path="src/test/resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/eclipse-classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar" sourcepath="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.5.GA/jboss-common-core-2.2.5.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.5.GA/jboss-common-core-2.2.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-jaxws/2.0.1.GA/jboss-jaxws-2.0.1.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.0.Beta15/jboss-mdr-2.0.0.Beta15.jar" sourcepath="M2_REPO/org/jboss/jboss-mdr/2.0.0.Beta15/jboss-mdr-2.0.0.Beta15-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.Beta12/jboss-reflect-2.0.0.Beta12.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.0.Beta12/jboss-reflect-2.0.0.Beta12-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.0.0.Beta11/jboss-vfs-2.0.0.Beta11.jar" sourcepath="M2_REPO/org/jboss/jboss-vfs/2.0.0.Beta11/jboss-vfs-2.0.0.Beta11-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.CR9/jbossxb-2.0.0.CR9.jar" sourcepath="M2_REPO/org/jboss/jbossxb/2.0.0.CR9/jbossxb-2.0.0.CR9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/0.3/jboss-ejb3-ext-api-0.3.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/0.3/jboss-ejb3-ext-api-0.3-sources.jar">
+    <attributes>
+      <attribute value="jar:file://home/carlo/.m2/repository/org/jboss/ejb3/jboss-ejb3-ext-api/0.3/jboss-ejb3-ext-api-0.3-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.CR1/jboss-ejb-api-3.0.0.CR1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.CR1/jboss-ejb-api-3.0.0.CR1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.CR1/jboss-transaction-api-1.0.1.CR1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.CR1/jboss-transaction-api-1.0.1.CR1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-jaxrpc/1.0.4.GA/jboss-jaxrpc-1.0.4.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0.CR1/jboss-jms-api-1.1.0.CR1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0.CR1/jboss-jms-api-1.1.0.CR1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-persistence-api/3.0.0.CR1/jboss-persistence-api-3.0.0.CR1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-persistence-api/3.0.0.CR1/jboss-persistence-api-3.0.0.CR1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.0.GA/jboss-test-1.1.0.GA.jar" sourcepath="M2_REPO/org/jboss/test/jboss-test/1.1.0.GA/jboss-test-1.1.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.0.GA/jboss-server-manager-0.1.0.GA.jar" sourcepath="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.0.GA/jboss-server-manager-0.1.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/ws/jbossws-spi/1.0.2.GA/jbossws-spi-1.0.2.GA.jar"/>
 </classpath>
\ No newline at end of file
Index: .project
===================================================================
--- .project	(revision 73544)
+++ .project	(working copy)
@@ -1,13 +1,13 @@
-<projectDescription>
-  <name>jboss-metadata</name>
-  <comment>The common JavaEE metadata classes</comment>
-  <projects/>
-  <buildSpec>
-    <buildCommand>
-      <name>org.eclipse.jdt.core.javabuilder</name>
-    </buildCommand>
-  </buildSpec>
-  <natures>
-    <nature>org.eclipse.jdt.core.javanature</nature>
-  </natures>
+<projectDescription>
+  <name>jboss-metadata</name>
+  <comment>The common JavaEE metadata classes</comment>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
 </projectDescription>
\ No newline at end of file
Index: src/test/java/org/jboss/test/metadata/ejb/ResolvedJndiNameUnitTestCase.java
===================================================================
--- src/test/java/org/jboss/test/metadata/ejb/ResolvedJndiNameUnitTestCase.java	(revision 73544)
+++ src/test/java/org/jboss/test/metadata/ejb/ResolvedJndiNameUnitTestCase.java	(working copy)
@@ -65,7 +65,7 @@
       String resolvedJndiNameRemote = beanMD.determineResolvedJndiName(KnownInterfaces.REMOTE, null);
       assertEquals("testResolvedJndiNames-jndi-name/remote", resolvedJndiNameRemote);      
       String resolvedJndiNameHome = beanMD.determineResolvedJndiName(KnownInterfaces.HOME, null);
-      assertEquals("testResolvedJndiNames-jndi-name/remoteHome", resolvedJndiNameHome);      
+      assertEquals("testResolvedJndiNames-jndi-name/home", resolvedJndiNameHome);      
       String resolvedJndiNameLocal = beanMD.determineResolvedJndiName(KnownInterfaces.LOCAL, null);
       assertEquals("testResolvedJndiNames-jndi-name/local", resolvedJndiNameLocal);      
       String resolvedJndiNameLocalHome = beanMD.determineResolvedJndiName(KnownInterfaces.LOCAL_HOME, null);
@@ -100,7 +100,7 @@
       String resolvedJndiNameRemote2 = beanMD.determineResolvedJndiName("org.jboss.ifaces.RemoteIF2", null);
       assertEquals("testResolvedJndiNamesWithKnownIfaces-jndi-name/remote-org.jboss.ifaces.RemoteIF2", resolvedJndiNameRemote2);      
       String resolvedJndiNameHome = beanMD.determineResolvedJndiName("org.jboss.ifaces.HomeIF", null);
-      assertEquals("testResolvedJndiNamesWithKnownIfaces-jndi-name/remoteHome", resolvedJndiNameHome);      
+      assertEquals("testResolvedJndiNamesWithKnownIfaces-jndi-name/home", resolvedJndiNameHome);      
       String resolvedJndiNameLocal = beanMD.determineResolvedJndiName("org.jboss.ifaces.LocalIF", null);
       assertEquals("testResolvedJndiNamesWithKnownIfaces-jndi-name/local-org.jboss.ifaces.LocalIF", resolvedJndiNameLocal);      
       String resolvedJndiNameLocal2 = beanMD.determineResolvedJndiName("org.jboss.ifaces.LocalIF2", null);
@@ -142,7 +142,7 @@
       String resolvedJndiName = beanMD.determineResolvedJndiName(null, null);
       assertEquals("testResolvedJndiNamesWithKnownIfacesEntity-jndi-name", resolvedJndiName);      
       String resolvedJndiNameHome = beanMD.determineResolvedJndiName("org.jboss.ifaces.HomeIF", null);
-      assertEquals("testResolvedJndiNamesWithKnownIfacesEntity-jndi-name/remoteHome", resolvedJndiNameHome);      
+      assertEquals("testResolvedJndiNamesWithKnownIfacesEntity-jndi-name/home", resolvedJndiNameHome);      
       String resolvedJndiNameLocalHome = beanMD.determineResolvedJndiName("org.jboss.ifaces.LocalHomeIF", null);
       assertEquals("testResolvedJndiNamesWithKnownIfacesEntity-jndi-name/localHome", resolvedJndiNameLocalHome);      
       String resolvedJndiNameIface = beanMD.determineResolvedJndiName("org.jboss.test.some.IFace", null);
Index: src/test/java/org/jboss/test/metadata/jbmeta42/unit/DefaultNamingStrategyTestCase.java
===================================================================
--- src/test/java/org/jboss/test/metadata/jbmeta42/unit/DefaultNamingStrategyTestCase.java	(revision 73544)
+++ src/test/java/org/jboss/test/metadata/jbmeta42/unit/DefaultNamingStrategyTestCase.java	(working copy)
@@ -29,6 +29,7 @@
 import org.jboss.metadata.annotation.finder.DefaultAnnotationFinder;
 import org.jboss.metadata.ejb.jboss.JBossMetaData;
 import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossSessionPolicyDecorator;
 import org.jboss.metadata.ejb.spec.EjbJar30MetaData;
 import org.jboss.test.metadata.common.PackageScanner;
 import org.jboss.test.metadata.common.ScanPackage;
@@ -65,30 +66,34 @@
       mergedMetaData.merge(metaData, specMetaData);
       
       sessionBeanMetaData = (JBossSessionBeanMetaData) mergedMetaData.getEnterpriseBean("MyStatelessBean");
+      
+      // We want the meta data decorated with the JNDI binding policy.
+      sessionBeanMetaData = new JBossSessionPolicyDecorator(sessionBeanMetaData);
+      
       assertNotNull(sessionBeanMetaData);
    }
    
    public void testBusinessLocal()
    {
-      String actual = sessionBeanMetaData.determineLocalJndiName();
+      String actual = sessionBeanMetaData.getLocalJndiName();
       assertEquals("MyStatelessBean/local", actual);
    }
    
    public void testBusinessRemote()
    {
-      String actual = sessionBeanMetaData.determineJndiName();
+      String actual = sessionBeanMetaData.getJndiName();
       assertEquals("MyStatelessBean/remote", actual);      
    }
    
    public void testLocalHome()
    {
-      String actual = sessionBeanMetaData.determineResolvedJndiName(sessionBeanMetaData.getLocalHome());
+      String actual = sessionBeanMetaData.getLocalHomeJndiName();
       assertEquals("MyStatelessBean/localHome", actual);
    }
    
    public void testHome()
    {
-      String actual = sessionBeanMetaData.determineResolvedJndiName(sessionBeanMetaData.getHome());
+      String actual = sessionBeanMetaData.getHomeJndiName();
       assertEquals("MyStatelessBean/home", actual);
    }
    
Index: src/main/java/org/jboss/metadata/ejb/jboss/JBossEnterpriseBeanMetaData.java
===================================================================
--- src/main/java/org/jboss/metadata/ejb/jboss/JBossEnterpriseBeanMetaData.java	(revision 73544)
+++ src/main/java/org/jboss/metadata/ejb/jboss/JBossEnterpriseBeanMetaData.java	(working copy)
@@ -606,87 +606,98 @@
          DefaultJndiBindingPolicy defaultPolicy)
    {
       String baseJndiName = getMappedName();
-      if(baseJndiName == null)
+      if (baseJndiName == null)
          baseJndiName = determineJndiName();
-      String resolvedJndiName = baseJndiName;
-      if(getJBossMetaData().getDeploymentSummary() != null)
+      
+      // Obtain the Deployment Summary
+      DeploymentSummary dsummary = getJBossMetaData().getDeploymentSummary();
+      
+      // Initialize the Default JNDI Binding Policy
+      DefaultJndiBindingPolicy policy = null;
+      
+      // If Deployment Summary is defined
+      if (dsummary != null)
       {
-         // Use summary info to create the metadata policy if it exists
-         DeploymentSummary dsummary = getJBossMetaData().getDeploymentSummary();
-         DefaultJndiBindingPolicy policy = null;
          try
          {
+            // Create a JNDI Policy from the Deployment Summary
             policy = createPolicy(dsummary.getLoader(), null);
          }
-         catch(Exception e)
+         catch (Exception e)
          {
          }
-         if(policy == null)
-            policy = defaultPolicy;
-         if(policy == null)
-         {
-            // Use the metadata default binding policy
-            policy = new BasicJndiBindingPolicy(baseJndiName);
-         }
+      }
+      if (policy == null)
+         policy = defaultPolicy;
+      if (policy == null)
+      {
+         // Use the metadata default binding policy
+         policy = new BasicJndiBindingPolicy(baseJndiName);
+      }
 
-         // Derive the summary info from this metadata and deployment summary
-         EjbDeploymentSummary ejbSummary = new EjbDeploymentSummary(this, dsummary);
-         KnownInterfaceType ifaceType = KnownInterfaces.classifyInterface(iface);
-         // Need to compare iface against the metadata local-home/home & business locals/remotes
-         if(this.isSession() && ifaceType == KnownInterfaceType.UNKNOWN)
+      if(dsummary==null)
+      {
+         dsummary = new DeploymentSummary();
+      }
+      
+      // Derive the summary info from this metadata and deployment summary
+      EjbDeploymentSummary ejbSummary = new EjbDeploymentSummary(this, dsummary);
+      KnownInterfaceType ifaceType = KnownInterfaces.classifyInterface(iface);
+      // Need to compare iface against the metadata local-home/home & business locals/remotes
+      if (this.isSession() && ifaceType == KnownInterfaceType.UNKNOWN)
+      {
+         JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) this;
+         // Figure out the interface type from the metadata
+         if (sbeanMD.getLocalHome() != null && sbeanMD.getLocalHome().equals(iface))
+            ifaceType = KnownInterfaceType.LOCAL_HOME;
+         else if (sbeanMD.getHome() != null && sbeanMD.getHome().equals(iface))
+            ifaceType = KnownInterfaceType.REMOTE_HOME;
+         else
          {
-            JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) this;
-            // Figure out the interface type from the metadata
-            if(sbeanMD.getLocalHome() != null && sbeanMD.getLocalHome().equals(iface))
-               ifaceType = KnownInterfaceType.LOCAL_HOME;
-            else if(sbeanMD.getHome() != null && sbeanMD.getHome().equals(iface))
-               ifaceType = KnownInterfaceType.REMOTE_HOME;
-            else
+            // Check business locals
+            BusinessLocalsMetaData locals = sbeanMD.getBusinessLocals();
+            if (locals != null)
             {
-               // Check business locals
-               BusinessLocalsMetaData locals = sbeanMD.getBusinessLocals();
-               if(locals != null)
+               for (String local : locals)
                {
-                  for(String local : locals)
+                  if (local.equals(iface))
                   {
-                     if(local.equals(iface))
-                     {
-                        ifaceType = KnownInterfaceType.BUSINESS_LOCAL;
-                        break;
-                     }
+                     ifaceType = KnownInterfaceType.BUSINESS_LOCAL;
+                     break;
                   }
                }
-               if(ifaceType == KnownInterfaceType.UNKNOWN)
+            }
+            if (ifaceType == KnownInterfaceType.UNKNOWN)
+            {
+               // Check business remotes
+               BusinessRemotesMetaData remotes = sbeanMD.getBusinessRemotes();
+               if (remotes != null)
                {
-                  // Check business remotes
-                  BusinessRemotesMetaData remotes = sbeanMD.getBusinessRemotes();
-                  if(remotes != null)
+                  for (String remote : remotes)
                   {
-                     for(String remote : remotes)
+                     if (remote.equals(iface))
                      {
-                        if(remote.equals(iface))
-                        {
-                           ifaceType = KnownInterfaceType.BUSINESS_REMOTE;
-                           break;
-                        }
+                        ifaceType = KnownInterfaceType.BUSINESS_REMOTE;
+                        break;
                      }
                   }
                }
             }
          }
-         else if(this.isEntity() && ifaceType == KnownInterfaceType.UNKNOWN)
-         {
-            JBossEntityBeanMetaData ebeanMD = (JBossEntityBeanMetaData) this;
-            // Figure out the interface type from the metadata
-            if(ebeanMD.getLocalHome() != null && ebeanMD.getLocalHome().equals(iface))
-               ifaceType = KnownInterfaceType.LOCAL_HOME;
-            else if(ebeanMD.getHome() != null && ebeanMD.getHome().equals(iface))
-               ifaceType = KnownInterfaceType.REMOTE_HOME;
-         }
+      }
+      else if (this.isEntity() && ifaceType == KnownInterfaceType.UNKNOWN)
+      {
+         JBossEntityBeanMetaData ebeanMD = (JBossEntityBeanMetaData) this;
+         // Figure out the interface type from the metadata
+         if (ebeanMD.getLocalHome() != null && ebeanMD.getLocalHome().equals(iface))
+            ifaceType = KnownInterfaceType.LOCAL_HOME;
+         else if (ebeanMD.getHome() != null && ebeanMD.getHome().equals(iface))
+            ifaceType = KnownInterfaceType.REMOTE_HOME;
+      }
 
-         // Have the policy generate the actual name
-         resolvedJndiName = policy.getJndiName(ejbSummary, iface, ifaceType);
-      }
+      // Have the policy generate the actual name
+      String resolvedJndiName = policy.getJndiName(ejbSummary, iface, ifaceType);
+
       return resolvedJndiName;
    }
 
Index: src/main/java/org/jboss/metadata/ejb/jboss/jndipolicy/spi/KnownInterfaces.java
===================================================================
--- src/main/java/org/jboss/metadata/ejb/jboss/jndipolicy/spi/KnownInterfaces.java	(revision 73544)
+++ src/main/java/org/jboss/metadata/ejb/jboss/jndipolicy/spi/KnownInterfaces.java	(working copy)
@@ -58,7 +58,7 @@
    public static final String LOCAL = "local";
    public static final String LOCAL_HOME = "localHome";
    public static final String REMOTE = "remote";
-   public static final String HOME = "remoteHome";
+   public static final String HOME = "home";
    public static final String UNKNOWN = "unknown";
 
    /**
Index: .settings/org.eclipse.jdt.core.prefs
===================================================================
--- .settings/org.eclipse.jdt.core.prefs	(revision 73544)
+++ .settings/org.eclipse.jdt.core.prefs	(working copy)
@@ -1,8 +1,5 @@
-#Fri Sep 07 10:35:32 CEST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+#Sun May 18 02:01:03 EDT 2008
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
