openejb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r581127 [1/2] - in /openejb/trunk/openejb3: assembly/openejb-tomcat/src/main/resources/META-INF/org.apache.openejb.tomcat/ container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ container/openejb-core/src/main/java/org/a...
Date Tue, 02 Oct 2007 02:13:20 GMT
Author: dain
Date: Mon Oct  1 19:13:16 2007
New Revision: 581127

URL: http://svn.apache.org/viewvc?rev=581127&view=rev
Log:
Fixed Java6 compile and test errors

Added:
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/LocalCollection.java   (contents, props changed)
      - copied, changed from r580531, openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/LocalList.java
Removed:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/SharedLocalConnectionManager.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/BasicManagedConnectionFactory.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/DerbySystemHomeHack.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/ErrorCode.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/HsqldbPathHack.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/InstantdbPropertiesHack.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/JdbcConnection.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/JdbcConnectionFactory.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/JdbcConnectionRequestInfo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/JdbcLocalTransaction.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/JdbcManagedConnection.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/JdbcManagedConnectionFactory.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/JdbcManagedConnectionMetaData.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/JdbcUnmanagedConnection.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/ManagedConnectionFactoryAdapter.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/ManagedConnectionFactoryPathHack.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/resource/GeronimoConnectionManagerTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/resource/SharedLocalConnectionManagerTest.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/KeyedList.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/LocalList.java
Modified:
    openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/resources/META-INF/org.apache.openejb.tomcat/service-jar.xml
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java
    openejb/trunk/openejb3/container/openejb-core/src/main/resources/META-INF/org.apache.openejb/service-jar.xml
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/JdbcConfigTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/RedeployTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/JpaTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/UnenhancedTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/security/SecurityTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/Compat3to2Test.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulInterceptorTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSessionBeanTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/AutoConfigTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/CrossClassLoaderProxyTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxRpcWebServiceInvocationTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxWsWebServiceInvocationTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessContainerTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessInterceptorTest.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Application.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ApplicationClient.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbJar.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EntityBean.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Filter.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Icon.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JspPropertyGroup.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/MessageDrivenBean.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Servlet.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/SessionBean.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/TextMap.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WebApp.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/SuperInterceptedBean.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/ClassInterceptor.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DDInterceptor.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DefaultInterceptor.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/Interceptor.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/MethodInterceptor.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/SecondClassInterceptor.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/SuperClassInterceptor.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/BasicStatefulInterceptedBean.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessInterceptedBean.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessInterceptedLocal.java
    openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptorTests.java
    openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/SecondStatefulInterceptedBean.java
    openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptedBean.java
    openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/ThirdStatefulInterceptedBean.java
    openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/SecondStatelessInterceptedBean.java
    openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptedBean.java
    openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/ThirdStatelessInterceptedBean.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClientDataSource.java
    openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/JndiRequestHandler.java
    openejb/trunk/openejb3/server/openejb-hsql/src/main/java/org/apache/openejb/server/hsql/HsqlService.java

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/resources/META-INF/org.apache.openejb.tomcat/service-jar.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/resources/META-INF/org.apache.openejb.tomcat/service-jar.xml?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/resources/META-INF/org.apache.openejb.tomcat/service-jar.xml (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/resources/META-INF/org.apache.openejb.tomcat/service-jar.xml Mon Oct  1 19:13:16 2007
@@ -665,18 +665,6 @@
 
   <!--
   # ================================================
-  # Default JCA ConnectionManager
-  # ================================================
-  -->
-  <ServiceProvider
-          id="Default Local TX ConnectionManager"
-          service="ConnectionManager"
-          types="ConnectionManager"
-          constructor="transactionManager"
-          class-name="org.apache.openejb.resource.SharedLocalConnectionManager"/>
-
-  <!--
-  # ================================================
   # Default ORB
   # ================================================
   -->

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java Mon Oct  1 19:13:16 2007
@@ -26,7 +26,6 @@
 import org.apache.openejb.OpenEJBException;
 import org.apache.openejb.UndeployException;
 import org.apache.openejb.BeanType;
-import org.apache.openejb.resource.jdbc.JdbcManagedConnectionFactory;
 import org.apache.openejb.resource.GeronimoConnectionManagerFactory;
 import org.apache.openejb.core.ConnectorReference;
 import org.apache.openejb.core.CoreContainerSystem;
@@ -280,10 +279,6 @@
 
         createSecurityService(configInfo.facilities.securityService);
 
-        for (ConnectionManagerInfo connectionManagerInfo : configInfo.facilities.connectionManagers) {
-            createConnectionManager(connectionManagerInfo);
-        }
-
         for (ResourceInfo resourceInfo : configInfo.facilities.resources) {
             createResource(resourceInfo);
         }
@@ -836,20 +831,15 @@
             ManagedConnectionFactory managedConnectionFactory = (ManagedConnectionFactory) service;
 
             // get the connection manager
-            ConnectionManager connectionManager;
-            if ((ManagedConnectionFactory) service instanceof JdbcManagedConnectionFactory) {
-                connectionManager = SystemInstance.get().getComponent(ConnectionManager.class);
-            } else {
-                GeronimoConnectionManagerFactory connectionManagerFactory = new GeronimoConnectionManagerFactory();
-                // default transaction support is "local" and that doesn't seem to work
-                connectionManagerFactory.setTransactionSupport("xa");
-                connectionManagerFactory.setTransactionManager(transactionManager);
-                ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-                if (classLoader == null) classLoader = getClass().getClassLoader();
-                if (classLoader == null) classLoader = ClassLoader.getSystemClassLoader();
-                connectionManagerFactory.setClassLoader(classLoader);
-                connectionManager = connectionManagerFactory.create();
-            }
+            GeronimoConnectionManagerFactory connectionManagerFactory = new GeronimoConnectionManagerFactory();
+            // default transaction support is "local" and that doesn't seem to work
+            connectionManagerFactory.setTransactionSupport("xa");
+            connectionManagerFactory.setTransactionManager(transactionManager);
+            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+            if (classLoader == null) classLoader = getClass().getClassLoader();
+            if (classLoader == null) classLoader = ClassLoader.getSystemClassLoader();
+            connectionManagerFactory.setClassLoader(classLoader);
+            ConnectionManager connectionManager = connectionManagerFactory.create();
 
             if (connectionManager == null) {
                 throw new RuntimeException("Invalid connection manager specified for connector identity = " + serviceInfo.id);

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java Mon Oct  1 19:13:16 2007
@@ -241,8 +241,8 @@
             sys.facilities.resources.add(resourceInfo);
         }
 
-        ConnectionManagerInfo service = configureService(openejb.getConnectionManager(), ConnectionManagerInfo.class);
-        sys.facilities.connectionManagers.add(service);
+//        ConnectionManagerInfo service = configureService(openejb.getConnectionManager(), ConnectionManagerInfo.class);
+//        sys.facilities.connectionManagers.add(service);
 
         sys.facilities.intraVmServer = configureService(openejb.getProxyFactory(), ProxyFactoryInfo.class);
 

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/resources/META-INF/org.apache.openejb/service-jar.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/resources/META-INF/org.apache.openejb/service-jar.xml?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/resources/META-INF/org.apache.openejb/service-jar.xml (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/resources/META-INF/org.apache.openejb/service-jar.xml Mon Oct  1 19:13:16 2007
@@ -658,18 +658,6 @@
 
   <!--
   # ================================================
-  # Default JCA ConnectionManager
-  # ================================================
-  -->
-  <ServiceProvider
-          id="Default Local TX ConnectionManager"
-          service="ConnectionManager"
-          types="ConnectionManager"
-          constructor="transactionManager"
-          class-name="org.apache.openejb.resource.SharedLocalConnectionManager"/>
-
-  <!--
-  # ================================================
   # Default ORB
   # ================================================
   -->

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/JdbcConfigTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/JdbcConfigTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/JdbcConfigTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/JdbcConfigTest.java Mon Oct  1 19:13:16 2007
@@ -43,9 +43,6 @@
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
 
-        // connection manager
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
-
         // managed JDBC
         assembler.createResource(config.configureService("Default JDBC Database", ResourceInfo.class));
 

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/RedeployTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/RedeployTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/RedeployTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/RedeployTest.java Mon Oct  1 19:13:16 2007
@@ -54,8 +54,6 @@
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
 
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
-
         // managed JDBC
         assembler.createResource(config.configureService("Default JDBC Database", ResourceInfo.class));
 

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/JpaTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/JpaTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/JpaTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/JpaTest.java Mon Oct  1 19:13:16 2007
@@ -42,15 +42,14 @@
 import javax.transaction.TransactionSynchronizationRegistry;
 
 import junit.framework.TestCase;
-import org.apache.commons.dbcp.BasicDataSource;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.openejb.core.TemporaryClassLoader;
 import org.apache.openejb.javaagent.Agent;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.persistence.PersistenceClassLoaderHandler;
 import org.apache.openejb.persistence.PersistenceUnitInfoImpl;
-import org.apache.openejb.resource.SharedLocalConnectionManager;
-import org.apache.openejb.resource.jdbc.JdbcManagedConnectionFactory;
+import org.apache.openejb.resource.jdbc.BasicDataSource;
+import org.apache.openejb.resource.jdbc.BasicManagedDataSource;
 import org.apache.xbean.naming.context.ImmutableContext;
 import org.objectweb.asm.ClassAdapter;
 import org.objectweb.asm.ClassReader;
@@ -270,12 +269,16 @@
     }
 
     private DataSource createJtaDataSource(TransactionManager transactionManager) throws Exception {
-        JdbcManagedConnectionFactory mcf = new JdbcManagedConnectionFactory("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:JpaTest", "sa", "", false);
-
-        SharedLocalConnectionManager connectionManager = new SharedLocalConnectionManager(transactionManager);
-
-        DataSource connectionFactory = (DataSource) mcf.createConnectionFactory(connectionManager);
-        return connectionFactory;
+        BasicManagedDataSource ds = new BasicManagedDataSource();
+        ds.setTransactionManager(transactionManager);
+        ds.setDriverClassName("org.hsqldb.jdbcDriver");
+        ds.setUrl("jdbc:hsqldb:mem:JpaTest");
+        ds.setUsername("sa");
+        ds.setPassword("");
+        ds.setMaxActive(100);
+        ds.setMaxWait(10000);
+        ds.setTestOnBorrow(true);
+        return ds;
     }
 
     private DataSource createNonJtaDataSource() throws Exception {

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/UnenhancedTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/UnenhancedTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/UnenhancedTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/UnenhancedTest.java Mon Oct  1 19:13:16 2007
@@ -18,15 +18,14 @@
 package org.apache.openejb.core.cmp.jpa;
 
 import junit.framework.TestCase;
-import org.apache.commons.dbcp.BasicDataSource;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.openejb.core.TemporaryClassLoader;
 import org.apache.openejb.javaagent.Agent;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.persistence.PersistenceClassLoaderHandler;
 import org.apache.openejb.persistence.PersistenceUnitInfoImpl;
-import org.apache.openejb.resource.SharedLocalConnectionManager;
-import org.apache.openejb.resource.jdbc.JdbcManagedConnectionFactory;
+import org.apache.openejb.resource.jdbc.BasicDataSource;
+import org.apache.openejb.resource.jdbc.BasicManagedDataSource;
 
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.spi.PersistenceProvider;
@@ -250,12 +249,16 @@
     }
 
     private DataSource createJtaDataSource(TransactionManager transactionManager) throws Exception {
-        JdbcManagedConnectionFactory mcf = new JdbcManagedConnectionFactory("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:JpaTest", "sa", "", false);
-
-        SharedLocalConnectionManager connectionManager = new SharedLocalConnectionManager(transactionManager);
-
-        DataSource connectionFactory = (DataSource) mcf.createConnectionFactory(connectionManager);
-        return connectionFactory;
+        BasicManagedDataSource ds = new BasicManagedDataSource();
+        ds.setTransactionManager(transactionManager);
+        ds.setDriverClassName("org.hsqldb.jdbcDriver");
+        ds.setUrl("jdbc:hsqldb:mem:JpaTest");
+        ds.setUsername("sa");
+        ds.setPassword("");
+        ds.setMaxActive(100);
+        ds.setMaxWait(10000);
+        ds.setTestOnBorrow(true);
+        return ds;
     }
 
     private DataSource createNonJtaDataSource() throws Exception {

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/security/SecurityTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/security/SecurityTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/security/SecurityTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/security/SecurityTest.java Mon Oct  1 19:13:16 2007
@@ -23,7 +23,6 @@
 import org.apache.openejb.assembler.classic.ProxyFactoryInfo;
 import org.apache.openejb.assembler.classic.TransactionServiceInfo;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
-import org.apache.openejb.assembler.classic.ConnectionManagerInfo;
 import org.apache.openejb.assembler.classic.StatelessSessionContainerInfo;
 import org.apache.openejb.assembler.classic.EjbJarInfo;
 import org.apache.openejb.jee.EjbJar;
@@ -66,8 +65,6 @@
         serviceInfo.properties = new Properties();
 
         assembler.createSecurityService(serviceInfo);
-
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
 
         // containers
         assembler.createContainer(config.configureService(StatelessSessionContainerInfo.class));

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/Compat3to2Test.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/Compat3to2Test.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/Compat3to2Test.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/Compat3to2Test.java Mon Oct  1 19:13:16 2007
@@ -24,7 +24,6 @@
 import org.apache.openejb.assembler.classic.ProxyFactoryInfo;
 import org.apache.openejb.assembler.classic.TransactionServiceInfo;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
-import org.apache.openejb.assembler.classic.ConnectionManagerInfo;
 import org.apache.openejb.assembler.classic.StatefulSessionContainerInfo;
 import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.jee.StatefulBean;
@@ -39,7 +38,6 @@
 import javax.ejb.Init;
 import javax.ejb.Remove;
 import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
 import java.util.List;
 import java.util.Arrays;
 import java.util.ArrayList;
@@ -60,8 +58,6 @@
         assembler.createProxyFactory(config.configureService(ProxyFactoryInfo.class));
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
-
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
 
         // containers
         StatefulSessionContainerInfo statefulContainerInfo = config.configureService(StatefulSessionContainerInfo.class);

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java Mon Oct  1 19:13:16 2007
@@ -18,41 +18,30 @@
 package org.apache.openejb.core.stateful;
 
 import junit.framework.TestCase;
-import org.apache.openejb.jee.EjbJar;
-import org.apache.openejb.jee.StatefulBean;
-import org.apache.openejb.config.EjbModule;
-import org.apache.openejb.config.EjbJarInfoBuilder;
-import org.apache.openejb.config.JndiEncInfoBuilder;
-import org.apache.openejb.config.ConfigurationFactory;
-import org.apache.openejb.core.CoreDeploymentInfo;
-import org.apache.openejb.core.ivm.naming.InitContextFactory;
-import org.apache.openejb.OpenEJBException;
-import org.apache.openejb.DeploymentInfo;
-import org.apache.openejb.assembler.classic.EjbJarBuilder;
-import org.apache.openejb.assembler.classic.EjbJarInfo;
 import org.apache.openejb.assembler.classic.Assembler;
 import org.apache.openejb.assembler.classic.ProxyFactoryInfo;
-import org.apache.openejb.assembler.classic.TransactionServiceInfo;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
-import org.apache.openejb.assembler.classic.ConnectionManagerInfo;
 import org.apache.openejb.assembler.classic.StatefulSessionContainerInfo;
+import org.apache.openejb.assembler.classic.TransactionServiceInfo;
+import org.apache.openejb.config.ConfigurationFactory;
+import org.apache.openejb.core.ivm.naming.InitContextFactory;
+import org.apache.openejb.jee.EjbJar;
+import org.apache.openejb.jee.StatefulBean;
 
-import javax.ejb.SessionContext;
-import javax.ejb.Remote;
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.annotation.Resource;
 import javax.ejb.Local;
 import javax.ejb.PostActivate;
 import javax.ejb.PrePassivate;
+import javax.ejb.Remote;
 import javax.ejb.Remove;
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.annotation.Resource;
+import javax.ejb.SessionContext;
 import javax.naming.InitialContext;
-import java.util.HashMap;
-import java.util.Stack;
-import java.util.List;
-import java.util.Arrays;
-import java.util.Properties;
 import java.io.Serializable;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Stack;
 
 /**
  * @version $Revision$ $Date$
@@ -126,8 +115,6 @@
         assembler.createProxyFactory(config.configureService(ProxyFactoryInfo.class));
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
-
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
 
         // containers
         StatefulSessionContainerInfo statefulContainerInfo = config.configureService(StatefulSessionContainerInfo.class);

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulInterceptorTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulInterceptorTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulInterceptorTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulInterceptorTest.java Mon Oct  1 19:13:16 2007
@@ -18,7 +18,6 @@
 
 import junit.framework.TestCase;
 import org.apache.openejb.assembler.classic.Assembler;
-import org.apache.openejb.assembler.classic.ConnectionManagerInfo;
 import org.apache.openejb.assembler.classic.EjbJarInfo;
 import org.apache.openejb.assembler.classic.ProxyFactoryInfo;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
@@ -33,7 +32,6 @@
 import org.apache.openejb.jee.Interceptor;
 import org.apache.openejb.jee.InterceptorBinding;
 import org.apache.openejb.jee.NamedMethod;
-import org.apache.openejb.jee.StatelessBean;
 import org.apache.openejb.jee.StatefulBean;
 
 import javax.annotation.PostConstruct;
@@ -59,8 +57,6 @@
         assembler.createProxyFactory(config.configureService(ProxyFactoryInfo.class));
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
-
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
 
         // containers
         assembler.createContainer(config.configureService(StatefulSessionContainerInfo.class));

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSessionBeanTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSessionBeanTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSessionBeanTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSessionBeanTest.java Mon Oct  1 19:13:16 2007
@@ -24,7 +24,6 @@
 import org.apache.openejb.assembler.classic.ProxyFactoryInfo;
 import org.apache.openejb.assembler.classic.TransactionServiceInfo;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
-import org.apache.openejb.assembler.classic.ConnectionManagerInfo;
 import org.apache.openejb.assembler.classic.StatefulSessionContainerInfo;
 import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.jee.StatefulBean;
@@ -56,8 +55,6 @@
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
 
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
-
         // containers
         StatefulSessionContainerInfo statefulContainerInfo = config.configureService(StatefulSessionContainerInfo.class);
         statefulContainerInfo.properties.setProperty("PoolSize", "0");
@@ -130,11 +127,11 @@
         }
 
         public void ejbActivate() throws EJBException, RemoteException {
-            calls.add((Call) Enum.valueOf(Call.class, "EjbActivate" + (++activates)));
+            calls.add(Enum.valueOf(Call.class, "EjbActivate" + (++activates)));
         }
 
         public void ejbPassivate() throws EJBException, RemoteException {
-            calls.add((Call) Enum.valueOf(Call.class, "EjbPassivate" + (++passivates)));
+            calls.add(Enum.valueOf(Call.class, "EjbPassivate" + (++passivates)));
         }
 
         public void ejbRemove() throws EJBException, RemoteException {

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/AutoConfigTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/AutoConfigTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/AutoConfigTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/AutoConfigTest.java Mon Oct  1 19:13:16 2007
@@ -19,7 +19,6 @@
 import junit.framework.TestCase;
 
 import javax.annotation.Resource;
-import java.util.List;
 import java.util.Map;
 import java.util.HashMap;
 
@@ -29,7 +28,6 @@
 import org.apache.openejb.assembler.classic.ProxyFactoryInfo;
 import org.apache.openejb.assembler.classic.TransactionServiceInfo;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
-import org.apache.openejb.assembler.classic.ConnectionManagerInfo;
 import org.apache.openejb.assembler.classic.ResourceInfo;
 import org.apache.openejb.assembler.classic.EjbJarInfo;
 import org.apache.openejb.assembler.classic.EnterpriseBeanInfo;
@@ -52,8 +50,6 @@
         assembler.createProxyFactory(config.configureService(ProxyFactoryInfo.class));
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
-
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
 
         assembler.createResource(config.configureService(new org.apache.openejb.config.sys.Resource("defaultDataSource", null, "DataSource"), ResourceInfo.class));
         assembler.createResource(config.configureService(new org.apache.openejb.config.sys.Resource("yellowDataSource", null, "DataSource"), ResourceInfo.class));

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/CrossClassLoaderProxyTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/CrossClassLoaderProxyTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/CrossClassLoaderProxyTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/CrossClassLoaderProxyTest.java Mon Oct  1 19:13:16 2007
@@ -19,7 +19,6 @@
 
 import junit.framework.TestCase;
 import org.apache.openejb.assembler.classic.Assembler;
-import org.apache.openejb.assembler.classic.ConnectionManagerInfo;
 import org.apache.openejb.assembler.classic.ProxyFactoryInfo;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
 import org.apache.openejb.assembler.classic.StatelessSessionContainerInfo;
@@ -117,7 +116,7 @@
 
             InitialContext ctx = new InitialContext();
             EJBHome rawHome = (EJBHome) ctx.lookup("WidgetBeanRemoteHome");
-            ;
+            
             EJBHome home = (EJBHome) copy(rawHome);
             assertNotNull("home", home);
             assertEquals(widgetHomeClass.getClassLoader(), home.getClass().getClassLoader());
@@ -224,8 +223,6 @@
         assembler.createProxyFactory(config.configureService(ProxyFactoryInfo.class));
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
-
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
 
         // containers
         StatelessSessionContainerInfo statelessContainerInfo = config.configureService(StatelessSessionContainerInfo.class);

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxRpcWebServiceInvocationTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxRpcWebServiceInvocationTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxRpcWebServiceInvocationTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxRpcWebServiceInvocationTest.java Mon Oct  1 19:13:16 2007
@@ -24,7 +24,6 @@
 import org.apache.openejb.assembler.classic.ProxyFactoryInfo;
 import org.apache.openejb.assembler.classic.TransactionServiceInfo;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
-import org.apache.openejb.assembler.classic.ConnectionManagerInfo;
 import org.apache.openejb.assembler.classic.StatelessSessionContainerInfo;
 import org.apache.openejb.assembler.classic.EjbJarInfo;
 import org.apache.openejb.jee.EjbJar;
@@ -72,8 +71,6 @@
         assembler.createProxyFactory(config.configureService(ProxyFactoryInfo.class));
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class,"PseudoSecurityService",null,"PseudoSecurityService",null));
-
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
 
         assembler.createContainer(config.configureService(StatelessSessionContainerInfo.class));
 

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxWsWebServiceInvocationTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxWsWebServiceInvocationTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxWsWebServiceInvocationTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxWsWebServiceInvocationTest.java Mon Oct  1 19:13:16 2007
@@ -24,7 +24,6 @@
 import org.apache.openejb.assembler.classic.ProxyFactoryInfo;
 import org.apache.openejb.assembler.classic.TransactionServiceInfo;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
-import org.apache.openejb.assembler.classic.ConnectionManagerInfo;
 import org.apache.openejb.assembler.classic.StatelessSessionContainerInfo;
 import org.apache.openejb.assembler.classic.EjbJarInfo;
 import org.apache.openejb.jee.EjbJar;
@@ -76,8 +75,6 @@
         assembler.createProxyFactory(config.configureService(ProxyFactoryInfo.class));
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class,"PseudoSecurityService",null,"PseudoSecurityService",null));
-
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
 
         assembler.createContainer(config.configureService(StatelessSessionContainerInfo.class));
 

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessContainerTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessContainerTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessContainerTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessContainerTest.java Mon Oct  1 19:13:16 2007
@@ -19,7 +19,6 @@
 
 import junit.framework.TestCase;
 import org.apache.openejb.assembler.classic.Assembler;
-import org.apache.openejb.assembler.classic.ConnectionManagerInfo;
 import org.apache.openejb.assembler.classic.ProxyFactoryInfo;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
 import org.apache.openejb.assembler.classic.StatelessSessionContainerInfo;
@@ -92,8 +91,6 @@
         assembler.createProxyFactory(config.configureService(ProxyFactoryInfo.class));
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
-
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
 
         // containers
         StatelessSessionContainerInfo statelessContainerInfo = config.configureService(StatelessSessionContainerInfo.class);

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessInterceptorTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessInterceptorTest.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessInterceptorTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessInterceptorTest.java Mon Oct  1 19:13:16 2007
@@ -17,7 +17,6 @@
 package org.apache.openejb.core.stateless;
 
 import org.apache.openejb.assembler.classic.Assembler;
-import org.apache.openejb.assembler.classic.ConnectionManagerInfo;
 import org.apache.openejb.assembler.classic.ProxyFactoryInfo;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
 import org.apache.openejb.assembler.classic.StatelessSessionContainerInfo;
@@ -61,8 +60,6 @@
         assembler.createProxyFactory(config.configureService(ProxyFactoryInfo.class));
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
         assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
-
-        assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
 
         // containers
         assembler.createContainer(config.configureService(StatelessSessionContainerInfo.class));

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Application.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Application.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Application.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Application.java Mon Oct  1 19:13:16 2007
@@ -28,13 +28,15 @@
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Collection;
+import java.util.Map;
 
 @XmlRootElement(name = "application")
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "applicationType", propOrder = {
         "descriptions",
         "displayNames",
-        "icons",
+        "icon",
         "module",
         "securityRole",
         "libraryDirectory"
@@ -45,8 +47,8 @@
     protected TextMap description = new TextMap();
     @XmlTransient
     protected TextMap displayName = new TextMap();
-    @XmlTransient
-    protected LocalList<String, Icon> icon = new LocalList<String, Icon>(Icon.class);
+    @XmlElement(name = "icon", required = true)
+    protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
 
     @XmlElement(required = true)
     protected List<Module> module;
@@ -92,13 +94,18 @@
         return displayName.get();
     }
 
-    @XmlElement(name = "icon", required = true)
-    public Icon[] getIcons() {
-        return icon.toArray();
+    public Collection<Icon> getIcons() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon;
     }
 
-    public void setIcons(Icon[] text) {
-        icon.set(text);
+    public Map<String,Icon> getIconMap() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon.toMap();
     }
 
     public Icon getIcon() {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ApplicationClient.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ApplicationClient.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ApplicationClient.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ApplicationClient.java Mon Oct  1 19:13:16 2007
@@ -37,7 +37,7 @@
 @XmlType(name = "application-clientType", propOrder = {
         "descriptions",
         "displayNames",
-        "icons",
+        "icon",
         "envEntry",
         "ejbRef",
         "serviceRef",
@@ -56,8 +56,8 @@
     protected TextMap description = new TextMap();
     @XmlTransient
     protected TextMap displayName = new TextMap();
-    @XmlTransient
-    protected LocalList<String,Icon> icon = new LocalList<String,Icon>(Icon.class);
+    @XmlElement(name = "icon", required = true)
+    protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
 
     @XmlElement(name = "env-entry", required = true)
     protected KeyedCollection<String,EnvEntry> envEntry;
@@ -126,13 +126,18 @@
         return displayName.get();
     }
 
-    @XmlElement(name = "icon", required = true)
-    public Icon[] getIcons() {
-        return icon.toArray();
+    public Collection<Icon> getIcons() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon;
     }
 
-    public void setIcons(Icon[] text) {
-        icon.set(text);
+    public Map<String,Icon> getIconMap() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon.toMap();
     }
 
     public Icon getIcon() {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java Mon Oct  1 19:13:16 2007
@@ -26,6 +26,8 @@
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import java.util.Collection;
+import java.util.Map;
 
 /**
  * The connectorType defines a resource adapter.
@@ -35,7 +37,7 @@
 @XmlType(name = "connectorType", propOrder = {
         "descriptions",
         "displayNames",
-        "icons",
+        "icon",
         "vendorName",
         "eisType",
         "resourceAdapterVersion",
@@ -48,8 +50,8 @@
     protected TextMap description = new TextMap();
     @XmlTransient
     protected TextMap displayName = new TextMap();
-    @XmlTransient
-    protected LocalList<String, Icon> icon = new LocalList<String, Icon>(Icon.class);
+    @XmlElement(name = "icon", required = true)
+    protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
 
     @XmlElement(name = "vendor-name", required = true)
     protected String vendorName;
@@ -93,13 +95,18 @@
         return displayName.get();
     }
 
-    @XmlElement(name = "icon", required = true)
-    public Icon[] getIcons() {
-        return icon.toArray();
+    public Collection<Icon> getIcons() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon;
     }
 
-    public void setIcons(Icon[] text) {
-        icon.set(text);
+    public Map<String,Icon> getIconMap() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon.toMap();
     }
 
     public Icon getIcon() {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbJar.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbJar.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbJar.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbJar.java Mon Oct  1 19:13:16 2007
@@ -32,6 +32,7 @@
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import java.util.Map;
 import java.util.LinkedHashMap;
+import java.util.Collection;
 
 
 /**
@@ -57,7 +58,7 @@
 @XmlType(name = "ejb-jarType", propOrder = {
         "descriptions",
         "displayNames",
-        "icons",
+        "icon",
         "enterpriseBeans",
         "interceptors",
         "relationships",
@@ -70,8 +71,8 @@
     protected TextMap description = new TextMap();
     @XmlTransient
     protected TextMap displayName = new TextMap();
-    @XmlTransient
-    protected LocalList<String,Icon> icon = new LocalList<String,Icon>(Icon.class);
+    @XmlElement(name = "icon", required = true)
+    protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
     @XmlTransient
     protected Map<String,EnterpriseBean> enterpriseBeans = new LinkedHashMap<String,EnterpriseBean>();
 
@@ -124,13 +125,18 @@
         return displayName.get();
     }
 
-    @XmlElement(name = "icon", required = true)
-    public Icon[] getIcons() {
-        return icon.toArray();
+    public Collection<Icon> getIcons() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon;
     }
 
-    public void setIcons(Icon[] text) {
-        icon.set(text);
+    public Map<String,Icon> getIconMap() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon.toMap();
     }
 
     public Icon getIcon() {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EntityBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EntityBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EntityBean.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EntityBean.java Mon Oct  1 19:13:16 2007
@@ -130,7 +130,7 @@
 @XmlType(name = "entity-beanType", propOrder = {
         "descriptions",
         "displayNames",
-        "icons",
+        "icon",
         "ejbName",
         "mappedName",
         "home",
@@ -166,8 +166,8 @@
     protected TextMap description = new TextMap();
     @XmlTransient
     protected TextMap displayName = new TextMap();
-    @XmlTransient
-    protected LocalList<String,Icon> icon = new LocalList<String,Icon>(Icon.class);
+    @XmlElement(name = "icon", required = true)
+    protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
 
     @XmlElement(name = "ejb-name", required = true)
     protected String ejbName;
@@ -262,13 +262,18 @@
         return displayName.get();
     }
 
-    @XmlElement(name = "icon", required = true)
-    public Icon[] getIcons() {
-        return icon.toArray();
+    public Collection<Icon> getIcons() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon;
     }
 
-    public void setIcons(Icon[] text) {
-        icon.set(text);
+    public Map<String,Icon> getIconMap() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon.toMap();
     }
 
     public Icon getIcon() {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Filter.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Filter.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Filter.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Filter.java Mon Oct  1 19:13:16 2007
@@ -28,12 +28,14 @@
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Collection;
+import java.util.Map;
 
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "filterType", propOrder = {
         "descriptions",
         "displayNames",
-        "icons",
+        "icon",
         "filterName",
         "filterClass",
         "initParam"
@@ -44,8 +46,8 @@
     protected TextMap description = new TextMap();
     @XmlTransient
     protected TextMap displayName = new TextMap();
-    @XmlTransient
-    protected LocalList<String, Icon> icon = new LocalList<String, Icon>(Icon.class);
+    @XmlElement(name = "icon", required = true)
+    protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
 
     @XmlElement(name = "filter-name", required = true)
     protected String filterName;
@@ -84,13 +86,18 @@
         return displayName.get();
     }
 
-    @XmlElement(name = "icon", required = true)
-    public Icon[] getIcons() {
-        return icon.toArray();
+    public Collection<Icon> getIcons() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon;
     }
 
-    public void setIcons(Icon[] text) {
-        icon.set(text);
+    public Map<String,Icon> getIconMap() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon.toMap();
     }
 
     public Icon getIcon() {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Icon.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Icon.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Icon.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Icon.java Mon Oct  1 19:13:16 2007
@@ -43,7 +43,7 @@
         "smallIcon",
         "largeIcon"
         })
-public class Icon {
+public class Icon implements Keyable<String> {
 
     @XmlElement(name = "small-icon")
     protected String smallIcon;
@@ -88,4 +88,7 @@
         this.lang = value;
     }
 
+    public String getKey() {
+        return getLang();
+    }
 }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JspPropertyGroup.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JspPropertyGroup.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JspPropertyGroup.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JspPropertyGroup.java Mon Oct  1 19:13:16 2007
@@ -28,6 +28,8 @@
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Collection;
+import java.util.Map;
 
 /**
  * The jsp-property-groupType is used to group a number of
@@ -49,7 +51,7 @@
 @XmlType(name = "jsp-property-groupType", propOrder = {
         "descriptions",
         "displayNames",
-        "icons",
+        "icon",
         "urlPattern",
         "elIgnored",
         "pageEncoding",
@@ -66,8 +68,8 @@
     protected TextMap description = new TextMap();
     @XmlTransient
     protected TextMap displayName = new TextMap();
-    @XmlTransient
-    protected LocalList<String, Icon> icon = new LocalList<String, Icon>(Icon.class);
+    @XmlElement(name = "icon", required = true)
+    protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
 
     @XmlElement(name = "url-pattern", required = true)
     protected List<String> urlPattern;
@@ -118,13 +120,18 @@
         return displayName.get();
     }
 
-    @XmlElement(name = "icon", required = true)
-    public Icon[] getIcons() {
-        return icon.toArray();
+    public Collection<Icon> getIcons() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon;
     }
 
-    public void setIcons(Icon[] text) {
-        icon.set(text);
+    public Map<String,Icon> getIconMap() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon.toMap();
     }
 
     public Icon getIcon() {

Copied: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/LocalCollection.java (from r580531, openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/LocalList.java)
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/LocalCollection.java?p2=openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/LocalCollection.java&p1=openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/LocalList.java&r1=580531&r2=581127&rev=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/LocalList.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/LocalCollection.java Mon Oct  1 19:13:16 2007
@@ -18,22 +18,31 @@
 package org.apache.openejb.jee;
 
 import java.util.Locale;
+import java.util.Collection;
+import java.util.Map;
 
 /**
  * @version $Revision$ $Date$
  */
-public class LocalList<K,V> extends KeyedList<K,V> {
-    public LocalList(Class type, String key) {
-        super(type, key);
+public class LocalCollection<V> extends KeyedCollection<String,V> {
+    public LocalCollection() {
     }
 
-    public LocalList(Class type) {
-        super(type, "lang");
+    public LocalCollection(KeyExtractor<String, ? super V> keyExtractor) {
+        super(keyExtractor);
+    }
+
+    public LocalCollection(Collection<? extends V> c) {
+        super(c);
+    }
+
+    public LocalCollection(int initialCapacity) {
+        super(initialCapacity);
     }
 
     public V getLocal() {
         String lang = Locale.getDefault().getLanguage();
+        Map<String,V> map = toMap();
         return (map.get(lang) != null ? map.get(lang) : map.get(null));
     }
-
 }

Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/LocalCollection.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author Id Revision HeadURL

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/MessageDrivenBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/MessageDrivenBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/MessageDrivenBean.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/MessageDrivenBean.java Mon Oct  1 19:13:16 2007
@@ -84,7 +84,7 @@
 @XmlType(name = "message-driven-beanType", propOrder = {
         "descriptions",
         "displayNames",
-        "icons",
+        "icon",
         "ejbName",
         "mappedName",
         "ejbClass",
@@ -114,8 +114,8 @@
     protected TextMap description = new TextMap();
     @XmlTransient
     protected TextMap displayName = new TextMap();
-    @XmlTransient
-    protected LocalList<String,Icon> icon = new LocalList<String,Icon>(Icon.class);
+    @XmlElement(name = "icon", required = true)
+    protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
 
     @XmlElement(name = "ejb-name", required = true)
     protected String ejbName;
@@ -199,13 +199,18 @@
         return displayName.get();
     }
 
-    @XmlElement(name = "icon", required = true)
-    public Icon[] getIcons() {
-        return icon.toArray();
+    public Collection<Icon> getIcons() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon;
     }
 
-    public void setIcons(Icon[] text) {
-        icon.set(text);
+    public Map<String,Icon> getIconMap() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon.toMap();
     }
 
     public Icon getIcon() {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Servlet.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Servlet.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Servlet.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Servlet.java Mon Oct  1 19:13:16 2007
@@ -28,12 +28,14 @@
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Collection;
+import java.util.Map;
 
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "servletType", propOrder = {
         "descriptions",
         "displayNames",
-        "icons",
+        "icon",
         "servletName",
         "servletClass",
         "jspFile",
@@ -48,8 +50,8 @@
     protected TextMap description = new TextMap();
     @XmlTransient
     protected TextMap displayName = new TextMap();
-    @XmlTransient
-    protected LocalList<String, Icon> icon = new LocalList<String, Icon>(Icon.class);
+    @XmlElement(name = "icon", required = true)
+    protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
 
     @XmlElement(name = "servlet-name", required = true)
     protected String servletName;
@@ -96,13 +98,18 @@
         return displayName.get();
     }
 
-    @XmlElement(name = "icon", required = true)
-    public Icon[] getIcons() {
-        return icon.toArray();
+    public Collection<Icon> getIcons() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon;
     }
 
-    public void setIcons(Icon[] text) {
-        icon.set(text);
+    public Map<String,Icon> getIconMap() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon.toMap();
     }
 
     public Icon getIcon() {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/SessionBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/SessionBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/SessionBean.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/SessionBean.java Mon Oct  1 19:13:16 2007
@@ -97,7 +97,7 @@
 @XmlType(name = "session-beanType", propOrder = {
         "descriptions",
         "displayNames",
-        "icons",
+        "icon",
         "ejbName",
         "mappedName",
         "home",
@@ -135,8 +135,8 @@
     protected TextMap description = new TextMap();
     @XmlTransient
     protected TextMap displayName = new TextMap();
-    @XmlTransient
-    protected LocalList<String,Icon> icon = new LocalList<String,Icon>(Icon.class);
+    @XmlElement(name = "icon", required = true)
+    protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
 
     @XmlElement(name = "ejb-name", required = true)
     protected String ejbName;
@@ -237,13 +237,18 @@
         return displayName.get();
     }
 
-    @XmlElement(name = "icon", required = true)
-    public Icon[] getIcons() {
-        return icon.toArray();
+    public Collection<Icon> getIcons() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon;
     }
 
-    public void setIcons(Icon[] text) {
-        icon.set(text);
+    public Map<String,Icon> getIconMap() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon.toMap();
     }
 
     public Icon getIcon() {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/TextMap.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/TextMap.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/TextMap.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/TextMap.java Mon Oct  1 19:13:16 2007
@@ -17,21 +17,21 @@
  */
 package org.apache.openejb.jee;
 
-import java.util.List;
 import java.util.ArrayList;
-import java.util.Map;
+import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Locale;
-import java.util.HashMap;
+import java.util.Map;
 
 /**
  * @version $Revision$ $Date$
  */
 public class TextMap {
 
-    protected Map<String, String> string = new HashMap<String, String>();
+    protected Map<String, String> string = new LinkedHashMap<String, String>();
 
     public Text[] toArray() {
-        List<Text> list = new ArrayList();
+        List<Text> list = new ArrayList<Text>();
         for (Map.Entry<String, String> entry : string.entrySet()) {
             list.add(new Text(entry.getKey(), entry.getValue()));
         }
@@ -46,7 +46,7 @@
     }
 
     public String get() {
-        return (String) getLocal(string);
+        return getLocal(string);
     }
 
     private String getLocal(Map<String, ?> map) {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WebApp.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WebApp.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WebApp.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WebApp.java Mon Oct  1 19:13:16 2007
@@ -37,7 +37,7 @@
 @XmlType(name = "web-appType", propOrder = {
         "descriptions",
         "displayNames",
-        "icons",
+        "icon",
         "distributable",
         "contextParam",
         "filter",
@@ -72,8 +72,8 @@
     protected TextMap description = new TextMap();
     @XmlTransient
     protected TextMap displayName = new TextMap();
-    @XmlTransient
-    protected LocalList<String, Icon> icon = new LocalList<String, Icon>(Icon.class);
+    @XmlElement(name = "icon", required = true)
+    protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
 
     protected List<EmptyType> distributable;
     @XmlElement(name = "context-param")
@@ -167,13 +167,18 @@
         return displayName.get();
     }
 
-    @XmlElement(name = "icon", required = true)
-    public Icon[] getIcons() {
-        return icon.toArray();
+    public Collection<Icon> getIcons() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon;
     }
 
-    public void setIcons(Icon[] text) {
-        icon.set(text);
+    public Map<String,Icon> getIconMap() {
+        if (icon == null) {
+            icon = new LocalCollection<Icon>();
+        }
+        return icon.toMap();
     }
 
     public Icon getIcon() {

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/SuperInterceptedBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/SuperInterceptedBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/SuperInterceptedBean.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/SuperInterceptedBean.java Mon Oct  1 19:13:16 2007
@@ -53,7 +53,7 @@
      */
     @AroundInvoke
     public Object superBeanInterceptor(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);        
+        Interceptor.profile(ctx, "superBeanInterceptor");
         return ctx.proceed();
     }
     
@@ -65,7 +65,7 @@
      */    
     @PostConstruct
     public void superBeanInterceptorPostConstruct() throws Exception {
-        Interceptor.profile(this);
+        Interceptor.profile(this, "superBeanInterceptorPostConstruct");
         return;
     }
     
@@ -78,7 +78,7 @@
      */    
     @PreDestroy
     public void superBeanInterceptorPreDestroy() throws Exception {
-        Interceptor.profile(this);        
+        Interceptor.profile(this, "superBeanInterceptorPreDestroy");
         return;
     }
 

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/ClassInterceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/ClassInterceptor.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/ClassInterceptor.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/ClassInterceptor.java Mon Oct  1 19:13:16 2007
@@ -48,7 +48,7 @@
      */    
     @AroundInvoke
     public Object classInterceptor(InvocationContext ctx) throws Exception {        
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "classInterceptor");
         return ctx.proceed();
     }
     
@@ -62,7 +62,7 @@
      */    
     @PostConstruct
     public void classInterceptorPostConstruct(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "classInterceptorPostConstruct");
         ctx.proceed();
         return;
     }
@@ -78,7 +78,7 @@
      */    
     @PostActivate
     public void classInterceptorPostActivate(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "classInterceptorPostActivate");
         ctx.proceed();
         return;
     }
@@ -93,7 +93,7 @@
      */    
     @PrePassivate
     public void classInterceptorPrePassivate(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "classInterceptorPrePassivate");
         ctx.proceed();
         return;
     }
@@ -108,7 +108,7 @@
      */    
     @PreDestroy
     public void classInterceptorPreDestroy(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "classInterceptorPreDestroy");
         ctx.proceed();
         return;
     }

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DDInterceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DDInterceptor.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DDInterceptor.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DDInterceptor.java Mon Oct  1 19:13:16 2007
@@ -42,7 +42,7 @@
      * @throws runtime exceptions or application exceptions that are allowed in the throws clause of the business method.
      */    
     public Object ddInterceptor(InvocationContext ctx) throws Exception {        
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "ddInterceptor");
         return ctx.proceed();
     }
     
@@ -55,7 +55,7 @@
      * @throws runtime exceptions.
      */    
     public void ddInterceptorPostConstruct(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "ddInterceptorPostConstruct");
         ctx.proceed();
         return;
     }
@@ -70,7 +70,7 @@
      * @throws runtime exceptions.
      */    
     public void ddInterceptorPostActivate(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "ddInterceptorPostActivate");
         ctx.proceed();
         return;
     }
@@ -84,7 +84,7 @@
      * @throws runtime exceptions.
      */    
     public void ddInterceptorPrePassivate(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "ddInterceptorPrePassivate");
         ctx.proceed();
         return;
     }
@@ -98,7 +98,7 @@
      * @throws runtime exceptions.
      */    
     public void ddInterceptorPreDestroy(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "ddInterceptorPreDestroy");
         ctx.proceed();
         return;
     }

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DefaultInterceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DefaultInterceptor.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DefaultInterceptor.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DefaultInterceptor.java Mon Oct  1 19:13:16 2007
@@ -48,7 +48,7 @@
      */    
     @AroundInvoke
     public Object defaultInterceptor(InvocationContext ctx) throws Exception {        
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "defaultInterceptor");
         return ctx.proceed();
     }
     
@@ -62,7 +62,7 @@
      */    
     @PostConstruct
     public void defaultInterceptorPostConstruct(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "defaultInterceptorPostConstruct");
         ctx.proceed();
         return;
     }
@@ -78,7 +78,7 @@
      */    
     @PostActivate
     public void defaultInterceptorPostActivate(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "defaultInterceptorPostActivate");
         ctx.proceed();
         return;
     }
@@ -93,7 +93,7 @@
      */    
     @PrePassivate
     public void defaultInterceptorPrePassivate(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "defaultInterceptorPrePassivate");
         ctx.proceed();
         return;
     }
@@ -108,7 +108,7 @@
      */    
     @PreDestroy
     public void defaultInterceptorPreDestroy(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "defaultInterceptorPreDestroy");
         ctx.proceed();
         return;
     }

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/Interceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/Interceptor.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/Interceptor.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/Interceptor.java Mon Oct  1 19:13:16 2007
@@ -20,8 +20,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.annotation.Resource;
-import javax.ejb.SessionContext;
 import javax.interceptor.InvocationContext;
 
 import org.apache.openejb.test.SuperInterceptedBean;
@@ -43,18 +41,19 @@
      * The inner map is put back into the contextData against the method name as the key.
      * 
      * @param ctx - InvocationContext
-     * @return contextData - the contextData which now has been filled with a hashmap of hashmap. 
+     * @param interceptorName
+     * @return contextData - the contextData which now has been filled with a hashmap of hashmap.
      */
     @SuppressWarnings("unchecked")
-    public static Map<String, Object> profile(InvocationContext ctx) {
+    public static Map<String, Object> profile(InvocationContext ctx, String interceptorName) {
         /*if (sessionContext != null) {
             System.out.println(sessionContext.lookup("java:comp/env"));        
         }
         else {
             System.out.println("SessionContext is null");
         }*/
-        
-        
+
+
         Map<String, Object> ctxData = ctx.getContextData();
 
         String KEY;
@@ -67,7 +66,7 @@
         System.out.print("Intercepting " + KEY);
         
         Map<String, Object> innerMap = (HashMap<String, Object>) ctxData.get(KEY);
-        innerMap = updateInterceptorsList(innerMap);
+        innerMap = updateInterceptorsList(innerMap, interceptorName);
 
         // don't try to get parameters for call back methods (you'll get an IllegalStateException)
         if (ctx.getMethod() != null) {
@@ -84,14 +83,14 @@
      * This is invoked by the lifecycle interceptor callback methods that are defined inside a bean.
      */
     @SuppressWarnings("unchecked")
-    public static Map<String, Object> profile(SuperInterceptedBean bean) {
+    public static Map<String, Object> profile(SuperInterceptedBean bean, String interceptorName) {
         Map<String, Object> ctxData = new HashMap<String, Object>();
         
         String KEY = bean.getClass().getSimpleName();
         System.out.print("Intercepting " + KEY);
         
         Map<String, Object> innerMap = (HashMap<String, Object>) ctxData.get(KEY);
-        innerMap = updateInterceptorsList(innerMap);
+        innerMap = updateInterceptorsList(innerMap, interceptorName);
         
         ctxData.put(KEY, innerMap);
         return ctxData;        
@@ -99,10 +98,11 @@
 
     /**
      * @param innerMap
+     * @param interceptorName
      * @return innerMap
      */
     @SuppressWarnings("unchecked")
-    private static Map<String, Object> updateInterceptorsList(Map<String, Object> innerMap) {
+    private static Map<String, Object> updateInterceptorsList(Map<String, Object> innerMap, String interceptorName) {
         if(innerMap == null) {
             innerMap = new HashMap<String, Object>();
         }        
@@ -111,10 +111,9 @@
         if(interceptorsList == null) {
             interceptorsList = new ArrayList<String>();            
         }
-        
-        String interceptor = Thread.currentThread().getStackTrace()[4].getMethodName();
-        System.out.println(" by " + interceptor + "()");
-        interceptorsList.add(interceptor);
+
+        System.out.println(" by " + interceptorName + "()");
+        interceptorsList.add(interceptorName);
         innerMap.put("INTERCEPTORS", interceptorsList);
         
         return innerMap;

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/MethodInterceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/MethodInterceptor.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/MethodInterceptor.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/MethodInterceptor.java Mon Oct  1 19:13:16 2007
@@ -44,7 +44,7 @@
      */    
     @AroundInvoke
     public Object methodInterceptor(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "methodInterceptor");
         return ctx.proceed();
     }
     
@@ -57,7 +57,7 @@
      */    
     @PostConstruct
     public void methodInterceptorPostConstruct(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "methodInterceptorPostConstruct");
         ctx.proceed();
         return;
     }

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/SecondClassInterceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/SecondClassInterceptor.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/SecondClassInterceptor.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/SecondClassInterceptor.java Mon Oct  1 19:13:16 2007
@@ -48,7 +48,7 @@
      */    
     @AroundInvoke
     public Object secondClassInterceptor(InvocationContext ctx) throws Exception {        
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "secondClassInterceptor");
         return ctx.proceed();
     }
     
@@ -62,7 +62,7 @@
      */    
     @PostConstruct
     public void secondClassInterceptorPostConstruct(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "secondClassInterceptorPostConstruct");
         ctx.proceed();
         return;
     }
@@ -78,7 +78,7 @@
      */    
     @PostActivate
     public void secondClassInterceptorPostActivate(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "secondClassInterceptorPostActivate");
         ctx.proceed();
         return;
     }
@@ -93,7 +93,7 @@
      */    
     @PrePassivate
     public void secondClassInterceptorPrePassivate(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "secondClassInterceptorPrePassivate");
         ctx.proceed();
         return;
     }
@@ -108,7 +108,7 @@
      */    
     @PreDestroy
     public void secondClassInterceptorPreDestroy(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "secondClassInterceptorPreDestroy");
         ctx.proceed();
         return;
     }



Mime
View raw message