geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r535506 - in /geronimo/server/trunk/modules: geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/MessageDestinationTest.java geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARContext.java
Date Sat, 05 May 2007 11:12:53 GMT
Author: gdamour
Date: Sat May  5 04:12:52 2007
New Revision: 535506

URL: http://svn.apache.org/viewvc?view=rev&rev=535506
Log:
Fix compilation error. Also, refactor and reformat a little bit the code for better readability.

Modified:
    geronimo/server/trunk/modules/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/MessageDestinationTest.java
    geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARContext.java

Modified: geronimo/server/trunk/modules/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/MessageDestinationTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/MessageDestinationTest.java?view=diff&rev=535506&r1=535505&r2=535506
==============================================================================
--- geronimo/server/trunk/modules/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/MessageDestinationTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/MessageDestinationTest.java
Sat May  5 04:12:52 2007
@@ -18,12 +18,14 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.HashMap;
 
 import junit.framework.TestCase;
+
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.connector.AdminObjectWrapperGBean;
 import org.apache.geronimo.gbean.AbstractName;
@@ -39,7 +41,6 @@
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
-import org.apache.geronimo.kernel.config.ConfigurationResolver;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.config.LifecycleException;
 import org.apache.geronimo.kernel.config.LifecycleMonitor;
@@ -72,148 +73,21 @@
         super.setUp();
         Artifact id = new Artifact("test", "test", "", "car");
         module  = new ConnectorModule(false, new AbstractName(id, Collections.singletonMap("name",
"test")), null, null, "foo", null, null, null, null);
-        EARContext earContext = new EARContext(new File("foo"), null, new Environment(new
Artifact("foo", "bar", "1.0", "car")), ConfigurationModuleType.EAR, naming,
-                new ConfigurationManager() {
-                    public boolean isInstalled(Artifact configurationId) {
-                        return false;
-                    }
-
-                    public Artifact[] getInstalled(Artifact query) {
-                        return new Artifact[0];
-                    }
-
-                    public Artifact[] getLoaded(Artifact query) {
-                        return new Artifact[0];
-                    }
-
-                    public Artifact[] getRunning(Artifact query) {
-                        return new Artifact[0];
-                    }
-
-                    public boolean isLoaded(Artifact configID) {
-                        return false;
-                    }
-
-                    public List listStores() {
-                        return Collections.EMPTY_LIST;
-                    }
-
-                    public ConfigurationStore[] getStores() {
-                        return new ConfigurationStore[0];
-                    }
-
-                    public ConfigurationStore getStoreForConfiguration(Artifact configuration)
{
-                        return null;
-                    }
-
-                    public List listConfigurations(AbstractName store) throws NoSuchStoreException
{
-                        return Collections.EMPTY_LIST;
-                    }
-
-                    public boolean isRunning(Artifact configurationId) {
-                        return false;
-                    }
-
-                    public List listConfigurations() {
-                        return null;
-                    }
-
-                    public boolean isConfiguration(Artifact artifact) {
-                        return false;
-                    }
-
-                    public Configuration getConfiguration(Artifact configurationId) {
-                        return null;
-                    }
-
-                    public LifecycleResults loadConfiguration(Artifact configurationId) throws
NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults loadConfiguration(ConfigurationData configurationData)
throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults loadConfiguration(Artifact configurationId, LifecycleMonitor
monitor) throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults loadConfiguration(ConfigurationData configurationData,
LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults unloadConfiguration(Artifact configurationId)
throws NoSuchConfigException {
-                        return null;
-                    }
-
-                    public LifecycleResults unloadConfiguration(Artifact configurationId,
LifecycleMonitor monitor) throws NoSuchConfigException {
-                        return null;
-                    }
-
-                    public LifecycleResults startConfiguration(Artifact configurationId)
throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults startConfiguration(Artifact configurationId,
LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults stopConfiguration(Artifact configurationId) throws
NoSuchConfigException {
-                        return null;
-                    }
-
-                    public LifecycleResults stopConfiguration(Artifact configurationId, LifecycleMonitor
monitor) throws NoSuchConfigException {
-                        return null;
-                    }
-
-                    public LifecycleResults restartConfiguration(Artifact configurationId)
throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults restartConfiguration(Artifact configurationId,
LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults reloadConfiguration(Artifact configurationId)
throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults reloadConfiguration(Artifact configurationId,
LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults reloadConfiguration(Artifact configurationId,
Version version) throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults reloadConfiguration(Artifact configurationId,
Version version, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
{
-                        return null;
-                    }
-
-                    public LifecycleResults reloadConfiguration(ConfigurationData configurationData)
throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public LifecycleResults reloadConfiguration(ConfigurationData configurationData,
LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException {
-                        return null;
-                    }
-
-                    public void uninstallConfiguration(Artifact configurationId) throws IOException,
NoSuchConfigException {
-
-                    }
-
-                    public ArtifactResolver getArtifactResolver() {
-                        return null;
-                    }
-
-                    public boolean isOnline() {
-                        return true;
-                    }
-
-                    public void setOnline(boolean online) {
-                    }
-
-                }, null, null, null, null, null, null, null, null);
+        ConfigurationManager configurationManager = new MockConfigurationManager();
+        EARContext earContext = new EARContext(new File("foo"),
+            null,
+            new Environment(new Artifact("foo", "bar", "1.0", "car")),
+            ConfigurationModuleType.EAR,
+            naming,
+            configurationManager,
+            (Collection) null,
+            null,
+            null,
+            null,
+            null,
+            null,
+            null,
+            null);
         module.setEarContext(earContext);
         module.setRootEarContext(earContext);
         configuration = earContext.getConfiguration();
@@ -310,6 +184,146 @@
         }
     }
 
+    private final class MockConfigurationManager implements ConfigurationManager {
+        public boolean isInstalled(Artifact configurationId) {
+            return false;
+        }
+
+        public Artifact[] getInstalled(Artifact query) {
+            return new Artifact[0];
+        }
+
+        public Artifact[] getLoaded(Artifact query) {
+            return new Artifact[0];
+        }
+
+        public Artifact[] getRunning(Artifact query) {
+            return new Artifact[0];
+        }
+
+        public boolean isLoaded(Artifact configID) {
+            return false;
+        }
+
+        public List listStores() {
+            return Collections.EMPTY_LIST;
+        }
+
+        public ConfigurationStore[] getStores() {
+            return new ConfigurationStore[0];
+        }
+
+        public ConfigurationStore getStoreForConfiguration(Artifact configuration) {
+            return null;
+        }
+
+        public List listConfigurations(AbstractName store) throws NoSuchStoreException {
+            return Collections.EMPTY_LIST;
+        }
+
+        public boolean isRunning(Artifact configurationId) {
+            return false;
+        }
+
+        public List listConfigurations() {
+            return null;
+        }
+
+        public boolean isConfiguration(Artifact artifact) {
+            return false;
+        }
+
+        public Configuration getConfiguration(Artifact configurationId) {
+            return null;
+        }
+
+        public LifecycleResults loadConfiguration(Artifact configurationId) throws NoSuchConfigException,
LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults loadConfiguration(ConfigurationData configurationData) throws
NoSuchConfigException, LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults loadConfiguration(Artifact configurationId, LifecycleMonitor
monitor) throws NoSuchConfigException, LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults loadConfiguration(ConfigurationData configurationData, LifecycleMonitor
monitor) throws NoSuchConfigException, LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults unloadConfiguration(Artifact configurationId) throws NoSuchConfigException
{
+            return null;
+        }
+
+        public LifecycleResults unloadConfiguration(Artifact configurationId, LifecycleMonitor
monitor) throws NoSuchConfigException {
+            return null;
+        }
+
+        public LifecycleResults startConfiguration(Artifact configurationId) throws NoSuchConfigException,
LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults startConfiguration(Artifact configurationId, LifecycleMonitor
monitor) throws NoSuchConfigException, LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults stopConfiguration(Artifact configurationId) throws NoSuchConfigException
{
+            return null;
+        }
+
+        public LifecycleResults stopConfiguration(Artifact configurationId, LifecycleMonitor
monitor) throws NoSuchConfigException {
+            return null;
+        }
+
+        public LifecycleResults restartConfiguration(Artifact configurationId) throws NoSuchConfigException,
LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults restartConfiguration(Artifact configurationId, LifecycleMonitor
monitor) throws NoSuchConfigException, LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults reloadConfiguration(Artifact configurationId) throws NoSuchConfigException,
LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults reloadConfiguration(Artifact configurationId, LifecycleMonitor
monitor) throws NoSuchConfigException, LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults reloadConfiguration(Artifact configurationId, Version version)
throws NoSuchConfigException, LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults reloadConfiguration(Artifact configurationId, Version version,
LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults reloadConfiguration(ConfigurationData configurationData)
throws NoSuchConfigException, LifecycleException {
+            return null;
+        }
+
+        public LifecycleResults reloadConfiguration(ConfigurationData configurationData,
LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException {
+            return null;
+        }
+
+        public void uninstallConfiguration(Artifact configurationId) throws IOException,
NoSuchConfigException {
+        
+        }
+
+        public ArtifactResolver getArtifactResolver() {
+            return null;
+        }
+
+        public boolean isOnline() {
+            return true;
+        }
+
+        public void setOnline(boolean online) {
+        }
+    }
 
 }
 

Modified: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARContext.java?view=diff&rev=535506&r1=535505&r2=535506
==============================================================================
--- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARContext.java
(original)
+++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARContext.java
Sat May  5 04:12:52 2007
@@ -55,7 +55,8 @@
             Environment environment,
             ConfigurationModuleType moduleType,
             Naming naming,
-            ConfigurationManager configurationManager, Collection repositories,
+            ConfigurationManager configurationManager, 
+            Collection repositories,
             AbstractNameQuery serverName,
             AbstractName baseName,
             AbstractNameQuery transactionManagerObjectName,



Mime
View raw message