geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r827970 - in /geronimo/server/trunk/framework/modules: geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebContainer.java
Date Wed, 21 Oct 2009 11:51:10 GMT
Author: rickmcguire
Date: Wed Oct 21 11:51:10 2009
New Revision: 827970

URL: http://svn.apache.org/viewvc?rev=827970&view=rev
Log:
add new methods to WebContainer, have MockBundle create MockBundleContext

Modified:
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java
    geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebContainer.java

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java?rev=827970&r1=827969&r2=827970&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java
Wed Oct 21 11:51:10 2009
@@ -25,9 +25,12 @@
 import java.net.URL;
 import java.util.Dictionary;
 import java.util.Enumeration;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Vector;
 
+import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
@@ -136,6 +139,10 @@
     }
 
     public BundleContext getBundleContext() {
+        // if no bundle context was provided, just give an empty Mock one
+        if (bundleContext == null) {
+            bundleContext = new MockBundleContext(classLoader, location, new HashMap<Artifact,
ConfigurationData>(), null);
+        }
         return bundleContext;
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebContainer.java?rev=827970&r1=827969&r2=827970&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebContainer.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebContainer.java
Wed Oct 21 11:51:10 2009
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.management.geronimo;
 
+import org.osgi.framework.BundleContext;
+
 /**
  * The common configuration settings for a web container (currently, Tomcat or
  * Jetty).
@@ -23,4 +25,11 @@
  * @version $Rev$ $Date$
  */
 public interface WebContainer extends NetworkContainer {
+    /**
+     * Returns the configuration BundleContext associated with
+     * this network container.
+     *
+     * @return The BundleContext instance for the container's configuration.
+     */
+    public BundleContext getBundleContext();
 }



Mime
View raw message