Author: dblevins
Date: Sat Sep 15 18:48:57 2007
New Revision: 576021

URL: http://svn.apache.org/viewvc?rev=576021&view=rev
Log:
Merging 576011 from trunk
Switched default openejb.jndiName.format to 
{deploymentId}{interfaceType.annotationName}

Modified:
    
openejb/branches/3.0-beta-1/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
    
openejb/branches/3.0-beta-1/container/openejb-core/src/main/java/org/apache/openejb/util/Classes.java
    
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/security/SecurityTest.java
    
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/Compat3to2Test.java
    
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java
    
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulInterceptorTest.java
    
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSessionBeanTest.java
    
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/CrossClassLoaderProxyTest.java
    
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessContainerTest.java
    
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessInterceptorTest.java
    
openejb/branches/3.0-beta-1/examples/calculator-stateless-pojo/src/test/java/org/apache/openejb/examples/calculator/CalculatorTest.java
    
openejb/branches/3.0-beta-1/examples/counter-stateful-pojo/src/test/java/org/apache/openejb/examples/counter/CounterImplTest.java
    
openejb/branches/3.0-beta-1/examples/ejb-injection/src/test/java/org/apache/openejb/examples/injection/EjbDependencyTest.java
    
openejb/branches/3.0-beta-1/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/enventries/StratocasterTest.java
    
openejb/branches/3.0-beta-1/examples/helloworld-stateful-pojo/src/test/java/org/acme/FriendlyPersonTest.java
    
openejb/branches/3.0-beta-1/examples/resource-injection/src/test/java/org/apache/openejb/examples/injection/InvoiceBeanTest.java
    
openejb/branches/3.0-beta-1/examples/resource-injection/src/test/java/org/apache/openejb/examples/injection/PurchaseOrderBeanTest.java
    
openejb/branches/3.0-beta-1/examples/telephone-stateful/src/test/java/org/apache/openejb/examples/telephone/TelephoneTest.java

Modified: 
openejb/branches/3.0-beta-1/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
 (original)
+++ 
openejb/branches/3.0-beta-1/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
 Sat Sep 15 18:48:57 2007
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.assembler.classic;
 
+import static org.apache.openejb.util.Classes.packageName;
+
 import javax.naming.Context;
 import javax.naming.NamingException;
 import javax.naming.Reference;
@@ -26,6 +28,7 @@
 import org.apache.openejb.InterfaceType;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
+import org.apache.openejb.util.Classes;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.core.CoreDeploymentInfo;
 import org.apache.openejb.core.ivm.naming.BusinessLocalReference;
@@ -134,7 +137,7 @@
                 return type;
             }
 
-            public String getAnnotatedName() {
+            public String getAnnotationName() {
                 return annotatedName;
             }
 
@@ -161,7 +164,7 @@
         private org.codehaus.swizzle.stream.StringTemplate template;
 
         public TemplatedStrategy(EjbJarInfo ejbJarInfo, Map<String, 
DeploymentInfo> deployments) {
-            String format = SystemInstance.get().getProperty(JNDINAME_FORMAT, 
"{deploymentId}{interfaceType.openejbLegacyName}");
+            String format = SystemInstance.get().getProperty(JNDINAME_FORMAT, 
"{deploymentId}{interfaceType.annotationName}");
             format = ejbJarInfo.properties.getProperty(JNDINAME_FORMAT, 
format);
 
             logger.debug("Using " + JNDINAME_FORMAT + " '" + format + "'");
@@ -176,15 +179,17 @@
             contextData.put("ejbType", 
deploymentInfo.getComponentType().name());
             contextData.put("ejbClass", 
deploymentInfo.getBeanClass().getName());
             contextData.put("ejbClass.simpleName", 
deploymentInfo.getBeanClass().getSimpleName());
+            contextData.put("ejbClass.packageName", 
packageName(deploymentInfo.getBeanClass()));
             contextData.put("ejbName", deploymentInfo.getEjbName());
             contextData.put("deploymentId", 
deploymentInfo.getDeploymentID().toString());
-            contextData.put("interfaceType", type.getAnnotatedName());
-            contextData.put("interfaceType.annotatedName", 
type.getAnnotatedName());
+            contextData.put("interfaceType", type.getAnnotationName());
+            contextData.put("interfaceType.annotationName", 
type.getAnnotationName());
             contextData.put("interfaceType.xmlName", type.getXmlName());
             contextData.put("interfaceType.xmlNameCc", type.getXmlNameCc());
             contextData.put("interfaceType.openejbLegacyName", 
type.getOpenejbLegacy());
             contextData.put("interfaceClass", interfce.getName());
             contextData.put("interfaceClass.simpleName", 
interfce.getSimpleName());
+            contextData.put("interfaceClass.packageName", 
packageName(interfce));
             return this.template.apply(contextData);
         }
     }
@@ -321,17 +326,24 @@
                 return;
             }
 
-            beanInfo.jndiNames.add(externalName);
-            logger.info("Jndi(name=" + externalName +")");
+            try {
+                context.bind(name, ref);
+                bindings.add(name);
+                beanInfo.jndiNames.add(externalName);
+                logger.info("Jndi(name=" + externalName +")");
+            } catch (NameAlreadyBoundException e) {
+                logger.error("Jndi name already in use: could not be bound; it 
may be taken by another ejb.  Jndi(name=" + name +")");
+            }
+        } else {
+            try {
+                context.bind(name, ref);
+                bindings.add(name);
+            } catch (NameAlreadyBoundException e) {
+                logger.error("Jndi name could not be bound; it may be taken by 
another ejb.  Jndi(name=" + name +")");
+                throw e;
+            }
         }
 
-        try {
-            context.bind(name, ref);
-            bindings.add(name);
-        } catch (NameAlreadyBoundException e) {
-            logger.error("Jndi name could not be bound; it may be taken by 
another ejb.  Jndi(name=" + name +")");
-            throw e;
-        }
     }
 
     private static List<Class> asList(Class interfce) {

Modified: 
openejb/branches/3.0-beta-1/container/openejb-core/src/main/java/org/apache/openejb/util/Classes.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/container/openejb-core/src/main/java/org/apache/openejb/util/Classes.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/container/openejb-core/src/main/java/org/apache/openejb/util/Classes.java
 (original)
+++ 
openejb/branches/3.0-beta-1/container/openejb-core/src/main/java/org/apache/openejb/util/Classes.java
 Sat Sep 15 18:48:57 2007
@@ -52,4 +52,17 @@
         }
         return Array.newInstance(clazz, new int[arrayDimentions]).getClass();
     }
+
+    public static String packageName(Class clazz){
+        return packageName(clazz.getName());
+    }
+
+    public static String packageName(String clazzName){
+        int i = clazzName.lastIndexOf('.');
+        if (i > 0){
+            return clazzName.substring(0, i);
+        } else {
+            return "";
+        }
+    }
 }

Modified: 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/security/SecurityTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/security/SecurityTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/security/SecurityTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/security/SecurityTest.java
 Sat Sep 15 18:48:57 2007
@@ -88,7 +88,7 @@
         InitialContext ctx = new InitialContext(props);
 
 
-        Project foo = (Project) ctx.lookup("FooBeanBusinessLocal");
+        Project foo = (Project) ctx.lookup("FooBeanLocal");
 
         foo.svnCheckout("");
 
@@ -105,7 +105,7 @@
         assertTrue("not in role community", foo.isCallerInRole("community"));
         assertFalse("in role contributor", foo.isCallerInRole("contributor"));
 
-//        Project bar = (Project) ctx.lookup("BarBeanBusinessLocal");
+//        Project bar = (Project) ctx.lookup("BarBeanLocal");
 //
 //        bar.svnCheckout("");
 //

Modified: 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/Compat3to2Test.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/Compat3to2Test.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/Compat3to2Test.java
 (original)
+++ 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/Compat3to2Test.java
 Sat Sep 15 18:48:57 2007
@@ -78,7 +78,7 @@
         calls.clear();
 
         InitialContext ctx = new InitialContext();
-        TargetHome home = (TargetHome) ctx.lookup("TargetBean");
+        TargetHome home = (TargetHome) ctx.lookup("TargetBeanRemoteHome");
         assertNotNull(home);
 
         Target target = home.create("Fuzz");

Modified: 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java
 Sat Sep 15 18:48:57 2007
@@ -64,7 +64,7 @@
         // Do a create...
 
         InitialContext ctx = new InitialContext();
-        Object object = ctx.lookup("WidgetBeanBusinessLocal");
+        Object object = ctx.lookup("WidgetBeanLocal");
 
         assertTrue("instanceof widget", object instanceof Widget);
 
@@ -89,7 +89,7 @@
         // Do a create...
 
         InitialContext ctx = new InitialContext();
-        Object object = ctx.lookup("WidgetBeanBusinessRemote");
+        Object object = ctx.lookup("WidgetBeanRemote");
 
         assertTrue("instanceof widget", object instanceof RemoteWidget);
 

Modified: 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulInterceptorTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulInterceptorTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulInterceptorTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulInterceptorTest.java
 Sat Sep 15 18:48:57 2007
@@ -80,7 +80,7 @@
         assembler.createApplication(ejbJar);
 
         InitialContext ctx = new InitialContext();
-        Target target = (Target) ctx.lookup("TargetBeanBusinessLocal");
+        Target target = (Target) ctx.lookup("TargetBeanLocal");
         target.echo(new ArrayList());
 
         assertCalls(Call.values());

Modified: 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSessionBeanTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSessionBeanTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSessionBeanTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSessionBeanTest.java
 Sat Sep 15 18:48:57 2007
@@ -69,7 +69,7 @@
         StatefulSessionBeanTest.calls.clear();
 
         InitialContext ctx = new InitialContext();
-        TargetHome home = (TargetHome) ctx.lookup("TargetBean");
+        TargetHome home = (TargetHome) ctx.lookup("TargetBeanRemoteHome");
         assertNotNull(home);
 
         Target target = home.create("Fuzz");

Modified: 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/CrossClassLoaderProxyTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/CrossClassLoaderProxyTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/CrossClassLoaderProxyTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/CrossClassLoaderProxyTest.java
 Sat Sep 15 18:48:57 2007
@@ -56,7 +56,7 @@
 
         InitialContext ctx = new InitialContext();
 
-        Widget widget = (Widget) ctx.lookup("WidgetBeanBusinessLocal");
+        Widget widget = (Widget) ctx.lookup("WidgetBeanLocal");
 
         // Do a business method...
         Stack<Lifecycle> lifecycle = widget.getLifecycle();
@@ -72,7 +72,7 @@
 
         InitialContext ctx = new InitialContext();
 
-        RemoteWidget widget = (RemoteWidget) 
ctx.lookup("WidgetBeanBusinessRemote");
+        RemoteWidget widget = (RemoteWidget) ctx.lookup("WidgetBeanRemote");
 
         // Do a business method...
         Stack<Lifecycle> lifecycle = widget.getLifecycle();
@@ -88,7 +88,7 @@
     public void testRemoteInterface() throws Exception {
 
         InitialContext ctx = new InitialContext();
-        EJBHome home = (EJBHome) ctx.lookup("WidgetBean");
+        EJBHome home = (EJBHome) ctx.lookup("WidgetBeanRemoteHome");
         assertNotNull("home", home);
         assertTrue("home should be an instance of WidgetHome", home instanceof 
WidgetHome);
         CrossClassLoaderProxyTestObject.widgetHome = (WidgetHome) home;
@@ -116,7 +116,7 @@
             Object testObject = testObjectClass.newInstance();
 
             InitialContext ctx = new InitialContext();
-            EJBHome rawHome = (EJBHome) ctx.lookup("WidgetBean");
+            EJBHome rawHome = (EJBHome) ctx.lookup("WidgetBeanRemoteHome");
             ;
             EJBHome home = (EJBHome) copy(rawHome);
             assertNotNull("home", home);

Modified: 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessContainerTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessContainerTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessContainerTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessContainerTest.java
 Sat Sep 15 18:48:57 2007
@@ -47,7 +47,7 @@
         {
             WidgetBean.lifecycle.clear();
 
-            Object object = ctx.lookup("WidgetBeanBusinessLocal");
+            Object object = ctx.lookup("WidgetBeanLocal");
 
             assertTrue("instanceof widget", object instanceof Widget);
 
@@ -65,7 +65,7 @@
 
             WidgetBean.lifecycle.clear();
 
-            Object object = ctx.lookup("WidgetBeanBusinessRemote");
+            Object object = ctx.lookup("WidgetBeanRemote");
 
             assertTrue("instanceof widget", object instanceof RemoteWidget);
 

Modified: 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessInterceptorTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessInterceptorTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessInterceptorTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessInterceptorTest.java
 Sat Sep 15 18:48:57 2007
@@ -82,7 +82,7 @@
         assembler.createApplication(ejbJar);
 
         InitialContext ctx = new InitialContext();
-        Target target = (Target) ctx.lookup("TargetBeanBusinessLocal");
+        Target target = (Target) ctx.lookup("TargetBeanLocal");
         target.echo(new ArrayList());
 
         assertCalls(Call.values());

Modified: 
openejb/branches/3.0-beta-1/examples/calculator-stateless-pojo/src/test/java/org/apache/openejb/examples/calculator/CalculatorTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/examples/calculator-stateless-pojo/src/test/java/org/apache/openejb/examples/calculator/CalculatorTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/examples/calculator-stateless-pojo/src/test/java/org/apache/openejb/examples/calculator/CalculatorTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/examples/calculator-stateless-pojo/src/test/java/org/apache/openejb/examples/calculator/CalculatorTest.java
 Sat Sep 15 18:48:57 2007
@@ -44,7 +44,7 @@
      */
     //START SNIPPET: remote
     public void testCalculatorViaRemoteInterface() throws Exception {
-        Object object = initialContext.lookup("CalculatorImplBusinessRemote");
+        Object object = initialContext.lookup("CalculatorImplRemote");
 
                assertNotNull(object);
                assertTrue(object instanceof CalculatorRemote);
@@ -61,7 +61,7 @@
      */
     //START SNIPPET: local    
     public void testCalculatorViaLocalInterface() throws Exception {
-        Object object = initialContext.lookup("CalculatorImplBusinessLocal");
+        Object object = initialContext.lookup("CalculatorImplLocal");
 
                assertNotNull(object);
                assertTrue(object instanceof CalculatorLocal);

Modified: 
openejb/branches/3.0-beta-1/examples/counter-stateful-pojo/src/test/java/org/apache/openejb/examples/counter/CounterImplTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/examples/counter-stateful-pojo/src/test/java/org/apache/openejb/examples/counter/CounterImplTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/examples/counter-stateful-pojo/src/test/java/org/apache/openejb/examples/counter/CounterImplTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/examples/counter-stateful-pojo/src/test/java/org/apache/openejb/examples/counter/CounterImplTest.java
 Sat Sep 15 18:48:57 2007
@@ -44,7 +44,7 @@
      */
     //START SNIPPET: remote    
     public void testCounterViaRemoteInterface() throws Exception {
-        Object object = initialContext.lookup("CounterImplBusinessRemote");
+        Object object = initialContext.lookup("CounterImplRemote");
 
                assertNotNull(object);
                assertTrue(object instanceof CounterRemote);
@@ -63,7 +63,7 @@
      */
     //START SNIPPET: local     
     public void testCounterViaLocalInterface() throws Exception {
-        Object object = initialContext.lookup("CounterImplBusinessLocal");
+        Object object = initialContext.lookup("CounterImplLocal");
 
                assertNotNull(object);
                assertTrue(object instanceof CounterLocal);

Modified: 
openejb/branches/3.0-beta-1/examples/ejb-injection/src/test/java/org/apache/openejb/examples/injection/EjbDependencyTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/examples/ejb-injection/src/test/java/org/apache/openejb/examples/injection/EjbDependencyTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/examples/ejb-injection/src/test/java/org/apache/openejb/examples/injection/EjbDependencyTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/examples/ejb-injection/src/test/java/org/apache/openejb/examples/injection/EjbDependencyTest.java
 Sat Sep 15 18:48:57 2007
@@ -46,7 +46,7 @@
 
     //START SNIPPET: test
     public void testViaLocalInterface() throws Exception {
-       Object object = initialContext.lookup("DataReaderImplBusinessLocal");
+       Object object = initialContext.lookup("DataReaderImplLocal");
        
        assertNotNull(object);
        assertEquals(LOCAL_STORE_RESULT, 
((DataReaderLocal)object).readDataFromLocalStore());
@@ -55,7 +55,7 @@
     //END SNIPPET: test
     
     public void testViaRemoteInterface() throws Exception {
-       Object object = initialContext.lookup("DataReaderImplBusinessRemote");
+       Object object = initialContext.lookup("DataReaderImplRemote");
        
        assertNotNull(object);
        assertEquals(LOCAL_STORE_RESULT, 
((DataReaderRemote)object).readDataFromLocalStore());

Modified: 
openejb/branches/3.0-beta-1/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/enventries/StratocasterTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/enventries/StratocasterTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/enventries/StratocasterTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/enventries/StratocasterTest.java
 Sat Sep 15 18:48:57 2007
@@ -50,7 +50,7 @@
     }
 
     public void test() throws Exception {
-        Stratocaster stratocaster = (Stratocaster) 
initialContext.lookup("StratocasterImplBusinessLocal");
+        Stratocaster stratocaster = (Stratocaster) 
initialContext.lookup("StratocasterImplLocal");
 
 
         assertEquals("Stratocaster.getMyClass()", Stratocaster.class, 
stratocaster.getMyClass());

Modified: 
openejb/branches/3.0-beta-1/examples/helloworld-stateful-pojo/src/test/java/org/acme/FriendlyPersonTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/examples/helloworld-stateful-pojo/src/test/java/org/acme/FriendlyPersonTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/examples/helloworld-stateful-pojo/src/test/java/org/acme/FriendlyPersonTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/examples/helloworld-stateful-pojo/src/test/java/org/acme/FriendlyPersonTest.java
 Sat Sep 15 18:48:57 2007
@@ -47,7 +47,7 @@
      * @throws Exception
      */
     public void testFriendlyPersonViaRemoteInterface() throws Exception {
-        Object object = initialContext.lookup("FriendlyPerson");
+        Object object = initialContext.lookup("FriendlyPersonRemoteHome");
         FriendlyPersonComponent.Home home = (FriendlyPersonComponent.Home) 
object;
         FriendlyPerson friendlyPerson = home.create();
 
@@ -60,7 +60,7 @@
      * @throws Exception
      */
     public void testFriendlyPersonViaLocalInterface() throws Exception {
-        Object object = initialContext.lookup("FriendlyPersonLocal");
+        Object object = initialContext.lookup("FriendlyPersonLocalHome");
         FriendlyPersonComponent.LocalHome home = 
(FriendlyPersonComponent.LocalHome) object;
         FriendlyPerson friendlyPerson = home.create();
 

Modified: 
openejb/branches/3.0-beta-1/examples/resource-injection/src/test/java/org/apache/openejb/examples/injection/InvoiceBeanTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/examples/resource-injection/src/test/java/org/apache/openejb/examples/injection/InvoiceBeanTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/examples/resource-injection/src/test/java/org/apache/openejb/examples/injection/InvoiceBeanTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/examples/resource-injection/src/test/java/org/apache/openejb/examples/injection/InvoiceBeanTest.java
 Sat Sep 15 18:48:57 2007
@@ -39,7 +39,7 @@
     }
 
     public void testAddLineItem() throws Exception {
-        Invoice order = (Invoice) 
initialContext.lookup("InvoiceBeanBusinessRemote");
+        Invoice order = (Invoice) initialContext.lookup("InvoiceBeanRemote");
         assertNotNull(order);
         LineItem item = new LineItem("ABC-1", "Test Item");
 
@@ -51,7 +51,7 @@
     }
 
     public void testGetMaxLineItems() throws Exception {
-        Invoice order = (Invoice) 
initialContext.lookup("InvoiceBeanBusinessRemote");
+        Invoice order = (Invoice) initialContext.lookup("InvoiceBeanRemote");
         assertNotNull(order);
 
         int maxLineItems = order.getMaxLineItems();

Modified: 
openejb/branches/3.0-beta-1/examples/resource-injection/src/test/java/org/apache/openejb/examples/injection/PurchaseOrderBeanTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/examples/resource-injection/src/test/java/org/apache/openejb/examples/injection/PurchaseOrderBeanTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/examples/resource-injection/src/test/java/org/apache/openejb/examples/injection/PurchaseOrderBeanTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/examples/resource-injection/src/test/java/org/apache/openejb/examples/injection/PurchaseOrderBeanTest.java
 Sat Sep 15 18:48:57 2007
@@ -41,7 +41,7 @@
     }
 
     public void testAddLineItem() throws Exception {
-        PurchaseOrder order = (PurchaseOrder) 
initialContext.lookup("PurchaseOrderBeanBusinessRemote");
+        PurchaseOrder order = (PurchaseOrder) 
initialContext.lookup("PurchaseOrderBeanRemote");
         assertNotNull(order);
         LineItem item = new LineItem("ABC-1", "Test Item");
 
@@ -53,7 +53,7 @@
     }
 
     public void testGetMaxLineItems() throws Exception {
-        PurchaseOrder order = (PurchaseOrder) 
initialContext.lookup("PurchaseOrderBeanBusinessRemote");
+        PurchaseOrder order = (PurchaseOrder) 
initialContext.lookup("PurchaseOrderBeanRemote");
         assertNotNull(order);
 
         int maxLineItems = order.getMaxLineItems();

Modified: 
openejb/branches/3.0-beta-1/examples/telephone-stateful/src/test/java/org/apache/openejb/examples/telephone/TelephoneTest.java
URL: 
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/examples/telephone-stateful/src/test/java/org/apache/openejb/examples/telephone/TelephoneTest.java?rev=576021&r1=576020&r2=576021&view=diff
==============================================================================
--- 
openejb/branches/3.0-beta-1/examples/telephone-stateful/src/test/java/org/apache/openejb/examples/telephone/TelephoneTest.java
 (original)
+++ 
openejb/branches/3.0-beta-1/examples/telephone-stateful/src/test/java/org/apache/openejb/examples/telephone/TelephoneTest.java
 Sat Sep 15 18:48:57 2007
@@ -56,7 +56,7 @@
         properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.openejb.client.LocalInitialContextFactory");
         InitialContext localContext = new InitialContext(properties);
 
-        Telephone telephone = (Telephone) 
localContext.lookup("TelephoneBeanBusinessRemote");
+        Telephone telephone = (Telephone) 
localContext.lookup("TelephoneBeanRemote");
 
         telephone.speak("Did you know I am talking directly through the 
embedded container?");
 
@@ -87,7 +87,7 @@
         properties.setProperty(Context.PROVIDER_URL, "ejbd://localhost:4201");
         InitialContext remoteContext = new InitialContext(properties);
 
-        Telephone telephone = (Telephone) 
remoteContext.lookup("TelephoneBeanBusinessRemote");
+        Telephone telephone = (Telephone) 
remoteContext.lookup("TelephoneBeanRemote");
 
         telephone.speak("Is this a local call?");
 


Reply via email to