Author: dblevins
Date: Tue Aug  7 14:48:18 2007
New Revision: 563669

URL: http://svn.apache.org/viewvc?view=rev&rev=563669
Log:
OPENEJB-458: META-INF/env-entries.properties
With example

Added:
    
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java
    openejb/trunk/openejb3/examples/expanded-env-entries/
      - copied from r561107, openejb/trunk/openejb3/examples/resource-injection/
    
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/enventries/
    
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/enventries/Stratocaster.java
    
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/enventries/StratocasterImpl.java
    
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/resources/META-INF/ejb-jar.xml
    
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/resources/META-INF/env-entries.properties
    
openejb/trunk/openejb3/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/enventries/
    
openejb/trunk/openejb3/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/enventries/StratocasterTest.java
Removed:
    
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/injection/
    
openejb/trunk/openejb3/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/injection/
Modified:
    
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
    openejb/trunk/openejb3/examples/expanded-env-entries/pom.xml
    openejb/trunk/openejb3/examples/pom.xml

Modified: 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java?view=diff&rev=563669&r1=563668&r2=563669
==============================================================================
--- 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
 (original)
+++ 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
 Tue Aug  7 14:48:18 2007
@@ -130,43 +130,46 @@
 public class AnnotationDeployer implements DynamicDeployer {
     public static final Logger logger = 
Logger.getInstance(LogCategory.OPENEJB_STARTUP, 
AnnotationDeployer.class.getPackage().getName());
 
-    public static final Set<String> knownResourceEnvTypes = new 
TreeSet<String>(Arrays.asList(
-            "javax.ejb.SessionContext",
-            "javax.ejb.EntityContext",
-            "javax.ejb.MessageDrivenContext",
-            "javax.transaction.UserTransaction",
-            "javax.jms.Queue",
-            "javax.jms.Topic",
-            "javax.xml.ws.WebServiceContext"
-    ));
-
-    public static final Set<String> knownEnvironmentEntries = new 
TreeSet<String>(Arrays.asList(
-            "boolean", "java.lang.Boolean",
-            "char",    "java.lang.Character",
-            "byte",    "java.lang.Byte",
-            "short",   "java.lang.Short",
-            "int",     "java.lang.Integer",
-            "long",    "java.lang.Long",
-            "float",   "java.lang.Float",
-            "double",  "java.lang.Double",
-            "java.lang.String"
-    ));
 
-    private final DiscoverBeansInClassLoader discoverBeansInClassLoader;
+    private final DiscoverAnnotatedBeans discoverAnnotatedBeans;
     private final ProcessAnnotatedBeans processAnnotatedBeans;
+    private final EnvEntriesPropertiesDeployer envEntriesPropertiesDeployer;
 
     public AnnotationDeployer() {
-        discoverBeansInClassLoader = new DiscoverBeansInClassLoader();
+        discoverAnnotatedBeans = new DiscoverAnnotatedBeans();
         processAnnotatedBeans = new ProcessAnnotatedBeans();
+        envEntriesPropertiesDeployer = new EnvEntriesPropertiesDeployer();
     }
 
     public AppModule deploy(AppModule appModule) throws OpenEJBException {
-        appModule = discoverBeansInClassLoader.deploy(appModule);
+        appModule = discoverAnnotatedBeans.deploy(appModule);
+        appModule = envEntriesPropertiesDeployer.deploy(appModule);
         appModule = processAnnotatedBeans.deploy(appModule);
         return appModule;
     }
 
-    public static class DiscoverBeansInClassLoader implements DynamicDeployer {
+    public static class DiscoverAnnotatedBeans implements DynamicDeployer {
+        public static final Set<String> knownResourceEnvTypes = new 
TreeSet<String>(Arrays.asList(
+                "javax.ejb.SessionContext",
+                "javax.ejb.EntityContext",
+                "javax.ejb.MessageDrivenContext",
+                "javax.transaction.UserTransaction",
+                "javax.jms.Queue",
+                "javax.jms.Topic",
+                "javax.xml.ws.WebServiceContext"
+        ));
+
+        public static final Set<String> knownEnvironmentEntries = new 
TreeSet<String>(Arrays.asList(
+                "boolean", "java.lang.Boolean",
+                "char",    "java.lang.Character",
+                "byte",    "java.lang.Byte",
+                "short",   "java.lang.Short",
+                "int",     "java.lang.Integer",
+                "long",    "java.lang.Long",
+                "float",   "java.lang.Float",
+                "double",  "java.lang.Double",
+                "java.lang.String"
+        ));
 
         public AppModule deploy(AppModule appModule) throws OpenEJBException {
             for (EjbModule ejbModule : appModule.getEjbModules()) {
@@ -281,6 +284,27 @@
     }
 
     public static class ProcessAnnotatedBeans implements DynamicDeployer {
+        public static final Set<String> knownResourceEnvTypes = new 
TreeSet<String>(Arrays.asList(
+                "javax.ejb.SessionContext",
+                "javax.ejb.EntityContext",
+                "javax.ejb.MessageDrivenContext",
+                "javax.transaction.UserTransaction",
+                "javax.jms.Queue",
+                "javax.jms.Topic",
+                "javax.xml.ws.WebServiceContext"
+        ));
+
+        public static final Set<String> knownEnvironmentEntries = new 
TreeSet<String>(Arrays.asList(
+                "boolean", "java.lang.Boolean",
+                "char",    "java.lang.Character",
+                "byte",    "java.lang.Byte",
+                "short",   "java.lang.Short",
+                "int",     "java.lang.Integer",
+                "long",    "java.lang.Long",
+                "float",   "java.lang.Float",
+                "double",  "java.lang.Double",
+                "java.lang.String"
+        ));
 
         public AppModule deploy(AppModule appModule) throws OpenEJBException {
             for (EjbModule ejbModule : appModule.getEjbModules()) {

Added: 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java?view=auto&rev=563669
==============================================================================
--- 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java
 (added)
+++ 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java
 Tue Aug  7 14:48:18 2007
@@ -0,0 +1,118 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.config;
+
+import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.util.Logger;
+import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.jee.EnvEntry;
+import org.apache.openejb.jee.EnterpriseBean;
+import org.apache.openejb.jee.JndiConsumer;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.List;
+
+/**
+ * Read in all the properties for an app's META-INF/env-entries.properties file
+ * and create <env-entry> tags for each in the component's enc.
+ *
+ * @version $Rev$ $Date$
+ */
+public class EnvEntriesPropertiesDeployer implements DynamicDeployer {
+
+    private static final Logger log = 
Logger.getInstance(LogCategory.OPENEJB_STARTUP_CONFIG, 
EnvEntriesPropertiesDeployer.class);
+
+    public AppModule deploy(AppModule appModule) throws OpenEJBException {
+
+        // ApplicationClient META-INF/env-entries.properties
+        for (ClientModule module : appModule.getClientModules()) {
+            for (Map.Entry<String, String> entry : 
getEnvEntries(module).entrySet()) {
+                EnvEntry envEntry = new EnvEntry(entry.getKey(), 
"java.lang.String", entry.getValue());
+                apply(module.getApplicationClient(), envEntry, "AppClient");
+            }
+        }
+
+        // EjbJar META-INF/env-entries.properties
+        for (EjbModule module : appModule.getEjbModules()) {
+            for (Map.Entry<String, String> entry : 
getEnvEntries(module).entrySet()) {
+                EnvEntry envEntry = new EnvEntry(entry.getKey(), 
"java.lang.String", entry.getValue());
+
+                // To override a specific ejb only
+                // the following format is used:
+                // <ejb-name>.name = value
+                if (envEntry.getName().contains(".")) {
+                    String name = envEntry.getName();
+                    String ejbName = name.substring(0,name.indexOf('.'));
+                    name = name.substring(name.indexOf('.')+1);
+                    EnterpriseBean bean = 
module.getEjbJar().getEnterpriseBean(ejbName);
+                    if (bean != null){
+                        // Set the new property name without the <ejb-name>. 
prefix
+                        envEntry.setName(name);
+                        apply(bean, envEntry, bean.getEjbName());
+                        continue;
+                    }
+                }
+
+                for (EnterpriseBean bean : 
module.getEjbJar().getEnterpriseBeans()) {
+                    apply(bean, envEntry, bean.getEjbName());
+                }
+            }
+        }
+
+        return appModule;
+    }
+
+    private void apply(JndiConsumer bean, EnvEntry newEntry, String 
componentName) {
+        List<EnvEntry> entries = bean.getEnvEntry();
+
+        // If this is an override to an existing entry, apply
+        // it and return
+        for (EnvEntry entry : entries) {
+            if (entry.getName().equals(newEntry.getName())){
+                log.debug("envprops.override", componentName, entry.getName(), 
entry.getEnvEntryValue(), newEntry.getEnvEntryValue());
+                entry.setEnvEntryValue(newEntry.getEnvEntryValue());
+                return;
+            }
+        }
+
+        // Must not be an override, just add the new entry
+        log.debug("envprops.add", componentName, newEntry.getName(), 
newEntry.getEnvEntryValue());
+        entries.add(newEntry);
+    }
+
+    private Map<String, String> getEnvEntries(DeploymentModule module) {
+        URL propsUrl = (URL) module.getAltDDs().get("env-entries.properties");
+        if (propsUrl == null) return Collections.EMPTY_MAP;
+        try {
+
+            InputStream in = propsUrl.openStream();
+            Properties envEntriesProps = new Properties();
+            envEntriesProps.load(in);
+            HashMap<String, String> envEntriesMap = new HashMap<String, 
String>((Map<? extends String, ? extends String>) envEntriesProps);
+            return envEntriesMap;
+        } catch (IOException e) {
+            log.error("envprops.notLoaded", e, propsUrl.toExternalForm());
+            return Collections.EMPTY_MAP;
+        }
+    }
+}

Modified: openejb/trunk/openejb3/examples/expanded-env-entries/pom.xml
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/expanded-env-entries/pom.xml?view=diff&rev=563669&r1=561107&r2=563669
==============================================================================
--- openejb/trunk/openejb3/examples/expanded-env-entries/pom.xml (original)
+++ openejb/trunk/openejb3/examples/expanded-env-entries/pom.xml Tue Aug  7 
14:48:18 2007
@@ -24,10 +24,10 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.openejb</groupId>
-  <artifactId>resource-injection</artifactId>
+  <artifactId>expanded-env-entries</artifactId>
   <packaging>jar</packaging>
   <version>1.0-SNAPSHOT</version>
-  <name>OpenEJB :: Examples :: Resource Injection</name>
+  <name>OpenEJB :: Examples :: Expanded support for Env Entries</name>
   <build>
     <defaultGoal>install</defaultGoal>
     <plugins>

Added: 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/enventries/Stratocaster.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/enventries/Stratocaster.java?view=auto&rev=563669
==============================================================================
--- 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/enventries/Stratocaster.java
 (added)
+++ 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/enventries/Stratocaster.java
 Tue Aug  7 14:48:18 2007
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.examples.enventries;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.io.File;
+import java.net.InetAddress;
+import java.net.URI;
+import java.net.URL;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface Stratocaster {
+    Class getMyClass();
+
+    Date getMyDate();
+
+    File getMyFile();
+
+    InetAddress getMyInetAddress();
+
+    List getMyList();
+
+    Map getMyMap();
+
+    URI getMyURI();
+
+    URL getMyURL();
+}

Added: 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/enventries/StratocasterImpl.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/enventries/StratocasterImpl.java?view=auto&rev=563669
==============================================================================
--- 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/enventries/StratocasterImpl.java
 (added)
+++ 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/java/org/apache/openejb/examples/enventries/StratocasterImpl.java
 Tue Aug  7 14:48:18 2007
@@ -0,0 +1,89 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.examples.enventries;
+
+import javax.annotation.Resource;
+import javax.ejb.Stateless;
+import java.io.File;
+import java.net.InetAddress;
+import java.net.URI;
+import java.net.URL;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * In addition to the standard env-entry types (String, Integer, Long, Short, 
Byte, Boolean, Double, Float, Character)
+ * OpenEJB supports many other types.
+ *
+ * This bean has just about every flavor of env-entry OpenEJB supports.
+ *
+ * @version $Rev$ $Date$
+ */
[EMAIL PROTECTED]
+public class StratocasterImpl implements Stratocaster {
+
+    @Resource(name = "myClass")
+    private Class myClass;
+    @Resource(name = "myDate")
+    private Date myDate;
+    @Resource(name = "myFile")
+    private File myFile;
+    @Resource(name = "myInetAddress")
+    private InetAddress myInetAddress;
+    @Resource(name = "myList")
+    private List myList;
+    @Resource(name = "myMap")
+    private Map myMap;
+    @Resource(name = "myURI")
+    private URI myURI;
+    @Resource(name = "myURL")
+    private URL myURL;
+
+    public Class getMyClass() {
+        return myClass;
+    }
+
+    public Date getMyDate() {
+        return myDate;
+    }
+
+    public File getMyFile() {
+        return myFile;
+    }
+
+    public InetAddress getMyInetAddress() {
+        return myInetAddress;
+    }
+
+    public List getMyList() {
+        return myList;
+    }
+
+    public Map getMyMap() {
+        return myMap;
+    }
+
+    public URI getMyURI() {
+        return myURI;
+    }
+
+    public URL getMyURL() {
+        return myURL;
+    }
+
+}

Added: 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/resources/META-INF/ejb-jar.xml
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/expanded-env-entries/src/main/resources/META-INF/ejb-jar.xml?view=auto&rev=563669
==============================================================================
--- 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/resources/META-INF/ejb-jar.xml
 (added)
+++ 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/resources/META-INF/ejb-jar.xml
 Tue Aug  7 14:48:18 2007
@@ -0,0 +1 @@
+<ejb-jar/>

Added: 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/resources/META-INF/env-entries.properties
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/expanded-env-entries/src/main/resources/META-INF/env-entries.properties?view=auto&rev=563669
==============================================================================
--- 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/resources/META-INF/env-entries.properties
 (added)
+++ 
openejb/trunk/openejb3/examples/expanded-env-entries/src/main/resources/META-INF/env-entries.properties
 Tue Aug  7 14:48:18 2007
@@ -0,0 +1,8 @@
+myClass = org.apache.openejb.examples.enventries.Stratocaster
+myDate = Jan 1, 1954
+myFile = /tmp/play-history.txt
+myInetAddress = localhost
+myList = [Stevie Ray Vaughan, Eric Johnson, Mark Knopfler, Buddy Guy]
+myMap = color=3-Color Sunburst\nneck=maple\nfretboard=African 
rosewood\npickups=Texas Special
+myURI = game://guitarheroII/?mode=expert
+myURL = http://www.fender.com/
\ No newline at end of file

Added: 
openejb/trunk/openejb3/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/enventries/StratocasterTest.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/enventries/StratocasterTest.java?view=auto&rev=563669
==============================================================================
--- 
openejb/trunk/openejb3/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/enventries/StratocasterTest.java
 (added)
+++ 
openejb/trunk/openejb3/examples/expanded-env-entries/src/test/java/org/apache/openejb/examples/enventries/StratocasterTest.java
 Tue Aug  7 14:48:18 2007
@@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.examples.enventries;
+
+import junit.framework.TestCase;
+
+import javax.naming.InitialContext;
+import javax.naming.Context;
+import java.util.Properties;
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.LinkedHashMap;
+import java.io.File;
+import java.net.URI;
+import java.net.URL;
+import java.net.InetAddress;
+import java.text.DateFormat;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class StratocasterTest extends TestCase {
+
+    private InitialContext initialContext;
+
+    protected void setUp() throws Exception {
+        Properties properties = new Properties();
+        properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.openejb.client.LocalInitialContextFactory");
+        properties.setProperty("openejb.deployments.classpath.include", 
".*expanded-env-entries.*");
+
+        initialContext = new InitialContext(properties);
+    }
+
+    public void test() throws Exception {
+        Stratocaster stratocaster = (Stratocaster) 
initialContext.lookup("StratocasterImplBusinessLocal");
+
+
+        assertEquals("Stratocaster.getMyClass()", Stratocaster.class, 
stratocaster.getMyClass());
+
+        Date date = DateFormat.getDateInstance().parse("Jan 1, 1954");
+        assertEquals("Stratocaster.getMyDate()", date, 
stratocaster.getMyDate());
+
+        File file = new File("/tmp/play-history.txt").getCanonicalFile();
+        assertEquals("Stratocaster.getMyFile()", file, 
stratocaster.getMyFile());
+
+        InetAddress host = InetAddress.getByName("localhost");
+        assertEquals("Stratocaster.getMyInetAddress()", host, 
stratocaster.getMyInetAddress());
+
+        List<String> list = new LinkedList();
+        list.add("Stevie Ray Vaughan");
+        list.add("Eric Johnson");
+        list.add("Mark Knopfler");
+        list.add("Buddy Guy");
+        assertEquals("Stratocaster.getMyList()", list, 
stratocaster.getMyList());
+
+        Map<String,String> map = new LinkedHashMap();
+        map.put("color", "3-Color Sunburst");
+        map.put("neck", "maple");
+        map.put("fretboard", "African rosewood");
+        map.put("pickups", "Texas Special");
+        assertEquals("Stratocaster.getMyMap()", map, stratocaster.getMyMap());
+
+        assertEquals("Stratocaster.getMyURI()", new 
URI("game://guitarheroII/?mode=expert"), stratocaster.getMyURI());
+
+        assertEquals("Stratocaster.getMyURL()", new 
URL("http://www.fender.com/";), stratocaster.getMyURL());
+
+
+    }
+}

Modified: openejb/trunk/openejb3/examples/pom.xml
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/pom.xml?view=diff&rev=563669&r1=563668&r2=563669
==============================================================================
--- openejb/trunk/openejb3/examples/pom.xml (original)
+++ openejb/trunk/openejb3/examples/pom.xml Tue Aug  7 14:48:18 2007
@@ -36,5 +36,6 @@
     <module>ejb-injection</module>
     <module>resource-injection</module>
     <module>telephone-stateful</module>
+    <module>expanded-env-entries</module>
   </modules>
 </project>


Reply via email to