geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1096945 [4/4] - in /geronimo/server/trunk: framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ framework/configs/client-system/src/main/plan/ framework/configs/j2ee-system/ framework/configs/j2ee-sys...
Date Tue, 26 Apr 2011 23:15:33 GMT
Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java?rev=1096945&r1=1096944&r2=1096945&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
(original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
Tue Apr 26 23:15:32 2011
@@ -41,11 +41,13 @@ import org.apache.geronimo.console.util.
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.DependencyManager;
 import org.apache.geronimo.kernel.InternalKernelException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelRegistry;
 import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationInfo;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
@@ -76,7 +78,7 @@ public class ConfigManagerPortlet extend
     private static final String CONFIG_INIT_PARAM = "config-type";
 
     private static final String SHOW_DEPENDENCIES_COOKIE = "org.apache.geronimo.configmanager.showDependencies";
-    
+
     private Kernel kernel;
 
     private PortletRequestDispatcher normalView;
@@ -144,12 +146,12 @@ public class ConfigManagerPortlet extend
     public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortletException, IOException {
         String action = actionRequest.getParameter("action");
         actionResponse.setRenderParameter("message", ""); // set to blank first
-        
+
         try {
             ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
             String config = getConfigID(actionRequest);
             Artifact configId = Artifact.create(config);
-            
+
             if (START_ACTION.equals(action)) {
 
                 if (!configurationManager.isLoaded(configId)) {
@@ -163,28 +165,28 @@ public class ConfigManagerPortlet extend
                 }
 
             } else if (STOP_ACTION.equals(action)) {
-                
+
                 if(configurationManager.isLoaded(configId)) {
                     LifecycleResults lcresult = configurationManager.unloadConfiguration(configId);
                     addInfoMessage(actionRequest, getLocalizedString(actionRequest, "consolebase.infoMsg02")
+ printResults(lcresult.getStopped()));
                 }
 
             } else if (UNINSTALL_ACTION.equals(action)) {
-                
+
                 configurationManager.uninstallConfiguration(configId);
-                
+
                 addInfoMessage(actionRequest, getLocalizedString(actionRequest, "consolebase.infoMsg04")
+ "<br />" + configId);
-                
+
             } else if (RESTART_ACTION.equals(action)) {
-                
+
                 LifecycleResults lcresult = configurationManager.restartConfiguration(configId);
                 addInfoMessage(actionRequest, getLocalizedString(actionRequest, "consolebase.infoMsg03")
+ printResults(lcresult.getStarted()));
-                
+
             } else {
                 addWarningMessage(actionRequest, getLocalizedString(actionRequest, "consolebase.warnMsg01")
+ action + "<br />");
                 throw new PortletException("Invalid value for changeState: " + action);
             }
-            
+
         } catch (NoSuchConfigException e) {
             // ignore this for now
             addErrorMessage(actionRequest, getLocalizedString(actionRequest, "consolebase.errorMsg01"));
@@ -198,7 +200,7 @@ public class ConfigManagerPortlet extend
             logger.error("Exception", e);
         }
     }
-    
+
     /**
      * Check if a configuration should be listed here. This method depends on the "config-type"
portlet parameter
      * which is set in portle.xml.
@@ -223,107 +225,40 @@ public class ConfigManagerPortlet extend
         List<ModuleDetails> moduleDetails = new ArrayList<ModuleDetails>();
         ConfigurationManager configManager = PortletManager.getConfigurationManager();
         List<ConfigurationInfo> infos = configManager.listConfigurations();
-    
+
         for (ConfigurationInfo info : infos) {
             if (ConfigurationModuleType.WAR.getName().equalsIgnoreCase(moduleType)) {
-
                 if (info.getType().getValue() == ConfigurationModuleType.WAR.getValue())
{
-                    ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(),
info.getState());
-                    try {
-                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
-                        boolean loaded = loadModule(configManager, configObjName);
-
-                        WebModule webModule = (WebModule) PortletManager.getModule(renderRequest,
info.getConfigID());
-
-                        if (webModule != null) {
-                            details.getContextPaths().add(webModule.getContextPath());
-                            details.setDisplayName(webModule.getDisplayName());
-                        }
-
-                        if (showDependencies) {
-                            addDependencies(details, configObjName);
-                        }
-
-                        if (loaded) {
-                            unloadModule(configManager, configObjName);
-                        }
-                    } catch (InvalidConfigException ice) {
-                        // Should not occur
-                        ice.printStackTrace();
+                    ModuleDetails webModuleDetails = loadWebModuleDetails(renderRequest,
info, showDependencies, configManager);
+                    if (webModuleDetails != null) {
+                        moduleDetails.add(webModuleDetails);
                     }
-                    moduleDetails.add(details);
                 } else if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue())
{
-                    try {
-                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
-                        boolean loaded = loadModule(configManager, configObjName);
-
-                        Configuration config = configManager.getConfiguration(info.getConfigID());
-                        if(config != null){
-                            for (Configuration child : config.getChildren()) {
-                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue())
{
-                                    ModuleDetails childDetails = new ModuleDetails(info.getConfigID(),
child.getModuleType(), info.getState());
-                                    childDetails.setComponentName(child.getId().toString());
-                                    WebModule webModule = getWebModule(config, child);
-                                    if (webModule != null) {
-                                        childDetails.getContextPaths().add(webModule.getContextPath());
-                                        childDetails.setDisplayName(webModule.getDisplayName());
-                                    }
-                                    if (showDependencies) {
-                                        addDependencies(childDetails, configObjName);
-                                    }
-                                    moduleDetails.add(childDetails);
-                                }
-                            }
-                        }
-
-                        if (loaded) {
-                            unloadModule(configManager, configObjName);
-                        }
-                    } catch (InvalidConfigException ice) {
-                        // Should not occur
-                        ice.printStackTrace();
+                    List<ModuleDetails> childrenWebModuleDetails = loadWebModuleDetailsFromEARModule(renderRequest,
info, showDependencies, configManager);
+                    if (childrenWebModuleDetails != null) {
+                        moduleDetails.addAll(childrenWebModuleDetails);
                     }
                 }
-
             } else if (shouldListConfig(info.getType())) {
-                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(),
getConfigurationState(info));
-                try {
-                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
-                    boolean loaded = loadModule(configManager, configObjName);
-
                     if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue())
{
-                        Configuration config = configManager.getConfiguration(info.getConfigID());
-                        if(config != null){
-                            Iterator childs = config.getChildren().iterator();
-                            while (childs.hasNext()) {
-                                Configuration child = (Configuration) childs.next();
-                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue())
{
-                                    WebModule webModule = getWebModule(config, child);
-                                    if (webModule != null) {
-                                        details.getContextPaths().add(webModule.getContextPath());
-                                    }
-                                }
-                            }
+                        ModuleDetails earModuleDetails = loadEARModuleDetails(renderRequest,
info, showDependencies, configManager);
+                        if(earModuleDetails != null) {
+                            moduleDetails.add(earModuleDetails);
                         }
                     } else if (info.getType().equals(ConfigurationModuleType.CAR)) {
-                        Configuration config = configManager.getConfiguration(info.getConfigID());
-                        details.setClientAppServerSide(config.getOwnedConfigurations().size()
> 0);
-                    }
-                    if (showDependencies) {
-                        addDependencies(details, configObjName);
-                    }
-                    if (loaded) {
-                        unloadModule(configManager, configObjName);
+                        ModuleDetails clientModuleDetails = loadCARModuleDetails(renderRequest,info,showDependencies,
configManager);
+                        if(clientModuleDetails != null) {
+                            moduleDetails.add(clientModuleDetails);
+                        }
+                    } else {
+                        ModuleDetails commonModuleDetails = loadCommonModuleDetails(renderRequest,
info, showDependencies, configManager);
+                        if(commonModuleDetails != null) {
+                            moduleDetails.add(commonModuleDetails);
+                        }
                     }
-                } catch (InvalidConfigException ice) {
-                    // Should not occur
-                    ice.printStackTrace();
-                }
-                moduleDetails.add(details);
-            }  
-            
-        }            
-        
+            }
+        }
+
         Collections.sort(moduleDetails);
         renderRequest.setAttribute("configurations", moduleDetails);
         renderRequest.setAttribute("showWebInfo", Boolean.valueOf(showWebInfo()));
@@ -339,6 +274,206 @@ public class ConfigManagerPortlet extend
         }
     }
 
+    private ModuleDetails loadCommonModuleDetails(RenderRequest renderRequest, ConfigurationInfo
info, boolean showDependencies, ConfigurationManager configurationManager) {
+        boolean loaded = false;
+        AbstractName configObjName = null;
+        try {
+            configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
+            loaded = loadModule(configurationManager, configObjName);
+            ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(),
getConfigurationState(info));
+            if (!loaded && showDependencies) {
+                addDependencies(details, configObjName);
+            }
+            return details;
+        } catch (Exception e) {
+            logger.error("Fail to load Client side CAR module " + info.getConfigID(), e);
+            return null;
+        } finally {
+            if (loaded) {
+                try {
+                    unloadModule(configurationManager, configObjName);
+                } catch (Exception e) {
+                }
+            }
+        }
+    }
+
+    private ModuleDetails loadCARModuleDetails(RenderRequest renderRequest, ConfigurationInfo
info, boolean showDependencies, ConfigurationManager configurationManager) {
+        boolean loaded = false;
+        AbstractName configObjName = null;
+        try {
+            configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
+            loaded = loadModule(configurationManager, configObjName);
+            ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(),
getConfigurationState(info));
+            ConfigurationData configurationData = configurationManager.getLoadedConfigurationData(info.getConfigID());
+            if (configurationData == null) {
+                return null;
+            }
+            details.setClientAppServerSide(configurationData.getOwnedConfigurations().size()
> 0);
+            if (!loaded && showDependencies) {
+                addDependencies(details, configObjName);
+            }
+            return details;
+        } catch (Exception e) {
+            logger.error("Fail to load Client side CAR module " + info.getConfigID(), e);
+            return null;
+        } finally {
+            if (loaded) {
+                try {
+                    unloadModule(configurationManager, configObjName);
+                } catch (Exception e) {
+                }
+            }
+        }
+    }
+
+    private ModuleDetails loadEARModuleDetails(RenderRequest renderRequest, ConfigurationInfo
info, boolean showDependencies, ConfigurationManager configurationManager) {
+        boolean loaded = false;
+        AbstractName configObjName = null;
+        try {
+            configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
+            loaded = loadModule(configurationManager, configObjName);
+            ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(),
getConfigurationState(info));
+            ConfigurationData configurationData = configurationManager.getLoadedConfigurationData(info.getConfigID());
+            if (configurationData == null) {
+                return null;
+            }
+            for (Map.Entry<String, ConfigurationData> entry : configurationData.getChildConfigurations().entrySet())
{
+                ConfigurationData childConfigurationData = entry.getValue();
+                if (childConfigurationData.getModuleType().getValue() != ConfigurationModuleType.WAR.getValue())
{
+                    continue;
+                }
+                List<GBeanData> gbeanDatas = configurationData.getGBeans(configurationData.getBundle());
+                for (GBeanData gbeanData : gbeanDatas) {
+                    if (gbeanData.getGBeanInfo().getJ2eeType().equals(NameFactory.WEB_MODULE))
{
+                        details.getContextPaths().add((String) gbeanData.getAttribute("contextPath"));
+                        break;
+                    }
+                }
+            }
+            if (!loaded && showDependencies) {
+                    addDependencies(details, configObjName);
+            }
+            return details;
+        } catch (Exception e) {
+            logger.error("Fail to load EAR module " + info.getConfigID(), e);
+            return null;
+        } finally {
+            if (loaded) {
+                try {
+                    unloadModule(configurationManager, configObjName);
+                } catch (Exception e) {
+                }
+            }
+        }
+    }
+
+    private ModuleDetails loadWebModuleDetails(RenderRequest renderRequest, ConfigurationInfo
info, boolean showDependencies, ConfigurationManager configurationManager) {
+        boolean loaded = false;
+        AbstractName configObjName = null;
+        try {
+            ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(),
info.getState());
+            configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
+            loaded = loadModule(configurationManager, configObjName);
+            if (loaded) {
+                ConfigurationData configurationData = configurationManager.getLoadedConfigurationData(info.getConfigID());
+                if (configurationData != null) {
+                    List<GBeanData> gbeanDatas = configurationData.getGBeans(configurationData.getBundle());
+                    for (GBeanData gbeanData : gbeanDatas) {
+                        if (gbeanData.getGBeanInfo().getJ2eeType().equals(NameFactory.WEB_MODULE))
{
+                            details.getContextPaths().add((String) gbeanData.getAttribute("contextPath"));
+                            break;
+                        }
+                    }
+                }
+            } else {
+                WebModule webModule = (WebModule) PortletManager.getModule(renderRequest,
info.getConfigID());
+                if (webModule != null) {
+                    details.getContextPaths().add(webModule.getContextPath());
+                    details.setDisplayName(webModule.getDisplayName());
+                }
+
+                if (showDependencies) {
+                    addDependencies(details, configObjName);
+                }
+            }
+            return details;
+        } catch (InvalidConfigException ice) {
+            logger.error("Fail to load web module " + info.getConfigID(), ice);
+            return null;
+        } finally {
+            if (loaded) {
+                try {
+                    unloadModule(configurationManager, configObjName);
+                } catch (Exception e) {
+                }
+            }
+        }
+    }
+
+    private List<ModuleDetails> loadWebModuleDetailsFromEARModule(RenderRequest renderRequest,
ConfigurationInfo info, boolean showDependencies, ConfigurationManager configurationManager)
{
+        boolean loaded = false;
+        AbstractName configObjName = null;
+        try {
+            configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
+            loaded = loadModule(configurationManager, configObjName);
+            List<ModuleDetails> childrenModuleDetails = new ArrayList<ModuleDetails>();
+            if (loaded) {
+                ConfigurationData configurationData = configurationManager.getLoadedConfigurationData(info.getConfigID());
+                if (configurationData == null) {
+                    return Collections.<ModuleDetails> emptyList();
+                }
+                for (Map.Entry<String, ConfigurationData> entry : configurationData.getChildConfigurations().entrySet())
{
+                    ConfigurationData childConfigurationData = entry.getValue();
+                    if (childConfigurationData.getModuleType().getValue() != ConfigurationModuleType.WAR.getValue())
{
+                        continue;
+                    }
+                    ModuleDetails childWebModuleDetails = new ModuleDetails(info.getConfigID(),
childConfigurationData.getModuleType(), info.getState());
+                    childrenModuleDetails.add(childWebModuleDetails);
+
+                    List<GBeanData> gbeanDatas = configurationData.getGBeans(configurationData.getBundle());
+                    for (GBeanData gbeanData : gbeanDatas) {
+                        if (gbeanData.getGBeanInfo().getJ2eeType().equals(NameFactory.WEB_MODULE))
{
+                            childWebModuleDetails.getContextPaths().add((String) gbeanData.getAttribute("contextPath"));
+                            break;
+                        }
+                    }
+
+                }
+            } else {
+                Configuration config = configurationManager.getConfiguration(info.getConfigID());
+                if (config != null) {
+                    for (Configuration child : config.getChildren()) {
+                        if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue())
{
+                            ModuleDetails childDetails = new ModuleDetails(info.getConfigID(),
child.getModuleType(), info.getState());
+                            childDetails.setComponentName(child.getId().toString());
+                            WebModule webModule = getWebModule(config, child);
+                            if (webModule != null) {
+                                childDetails.getContextPaths().add(webModule.getContextPath());
+                                childDetails.setDisplayName(webModule.getDisplayName());
+                            }
+                            if (showDependencies) {
+                                addDependencies(childDetails, configObjName);
+                            }
+                            childrenModuleDetails.add(childDetails);
+                        }
+                    }
+                }
+            }
+            return childrenModuleDetails;
+        } catch (InvalidConfigException ice) {
+            logger.error("Fail to load ear module ", ice);
+            return null;
+        } finally {
+            if (loaded) {
+                try {
+                    unloadModule(configurationManager, configObjName);
+                } catch (Exception e) {
+                }
+            }
+        }
+    }
+
     private State getConfigurationState(ConfigurationInfo configurationInfo) {
         State configurationState = configurationInfo.getState();
         if (configurationState.isRunning()) {
@@ -362,7 +497,7 @@ public class ConfigManagerPortlet extend
         }
         return configurationState;
     }
-    
+
     private WebModule getWebModule(Configuration config, Configuration child) {
         try {
             Map<String, String> query1 = new HashMap<String, String>();

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/BundleDeploymentContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/BundleDeploymentContext.java?rev=1096945&r1=1096944&r2=1096945&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/BundleDeploymentContext.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/BundleDeploymentContext.java
Tue Apr 26 23:15:32 2011
@@ -37,9 +37,9 @@ import org.osgi.framework.BundleContext;
  * @version $Rev:386276 $ $Date$
  */
 public class BundleDeploymentContext extends EARContext {
-      
+
     private Bundle bundle;
-    
+
     public BundleDeploymentContext(Environment environment,
                                    ConfigurationModuleType moduleType,
                                    Naming naming,
@@ -52,31 +52,31 @@ public class BundleDeploymentContext ext
                                    AbstractNameQuery corbaGBeanObjectName,
                                    Map messageDestinations,
                                    Bundle bundle) throws DeploymentException {
-        super(null, null, 
+        super(null, null,
               environment, moduleType, naming, configurationManager, new BundleResourceContext(bundle),
bundleContext,
-              serverName, baseName, transactionManagerObjectName, connectionTrackerObjectName,

+              serverName, baseName, transactionManagerObjectName, connectionTrackerObjectName,
               corbaGBeanObjectName, messageDestinations);
         this.bundle = bundle;
     }
-   
+
     @Override
     public void initializeConfiguration() throws DeploymentException {
         try {
             ConfigurationData configurationData = new ConfigurationData(moduleType, null,
childConfigurationDatas, environment, baseDir, inPlaceConfigurationDir, naming);
-            configurationData.setBundleContext(bundle.getBundleContext());
+            configurationData.setBundle(bundle);
             configurationManager.loadConfiguration(configurationData);
             this.configuration = configurationManager.getConfiguration(environment.getConfigId());
         } catch (Exception e) {
             throw new DeploymentException("Unable to create configuration for deployment",
e);
         }
     }
-    
+
     @Override
-    public void getCompleteManifestClassPath(Deployable deployable, 
-                                             URI moduleBaseUri, 
-                                             URI resolutionUri, 
-                                             Collection<String> classpath, 
+    public void getCompleteManifestClassPath(Deployable deployable,
+                                             URI moduleBaseUri,
+                                             URI resolutionUri,
+                                             Collection<String> classpath,
                                              Collection<String> exclusions) throws
DeploymentException {
     }
-    
+
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/WebFragmentTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/WebFragmentTest.java?rev=1096945&r1=1096944&r2=1096945&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/WebFragmentTest.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/WebFragmentTest.java
Tue Apr 26 23:15:32 2011
@@ -21,6 +21,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
@@ -237,7 +238,7 @@ public class WebFragmentTest extends Xml
 
         @Override
         public Collection<? extends Repository> getRepositories() {
-            return null;
+            return Collections.<Repository>emptyList();
         }
 
         @Override
@@ -252,7 +253,7 @@ public class WebFragmentTest extends Xml
 
         @Override
         public ConfigurationStore[] getStores() {
-            return null;
+            return new ConfigurationStore[0];
         }
 
         @Override
@@ -407,6 +408,12 @@ public class WebFragmentTest extends Xml
         public LifecycleResults unloadConfiguration(Artifact configurationId, LifecycleMonitor
monitor) throws NoSuchConfigException {
             return null;
         }
+
+        @Override
+        public ConfigurationData getLoadedConfigurationData(Artifact arg0) {
+            // TODO Auto-generated method stub
+            return null;
+        }
     }
 
     private static class DummyEARContext extends EARContext {

Modified: geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/extender/WebApplication.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/extender/WebApplication.java?rev=1096945&r1=1096944&r2=1096945&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/extender/WebApplication.java
(original)
+++ geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/extender/WebApplication.java
Tue Apr 26 23:15:32 2011
@@ -198,12 +198,12 @@ public class WebApplication implements R
                         bundle);
                 webModule.setEarContext(deploymentContext);
                 webModule.setRootEarContext(deploymentContext);
-                
+
                 deploymentContext.flush();
                 deploymentContext.initializeConfiguration();
 
                 webModule.getJndiScope(JndiScope.app).put("app/AppName", webModule.getName());
-                
+
                 webModuleBuilder.initContext(deploymentContext, webModule, bundle);
 
                 AbstractName appJndiName = naming.createChildName(deploymentContext.getModuleName(),
"ApplicationJndi", "ApplicationJndi");
@@ -232,7 +232,7 @@ public class WebApplication implements R
             }
 
             configurationData.setUseEnvironment(true);
-            configurationData.setBundleContext(bundle.getBundleContext());
+            configurationData.setBundle(bundle);
 
             configurationManager.loadConfiguration(configurationData);
             configurationManager.startConfiguration(configurationData.getId());



Mime
View raw message