geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1213810 [3/6] - in /geronimo/server/branches/3.0-beta: ./ framework/ framework/configs/karaf-framework/src/main/distribution/text/ framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/ framework/configs/karaf-framework/sr...
Date Tue, 13 Dec 2011 18:00:12 GMT
Propchange: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.2/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf:826768
 /geronimo/server/branches/3.0-M1/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client:948864,951792
+/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client:1184839-1213689
 /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf:749113,749116-807432,809079-825588

Propchange: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.2/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf:826768
 /geronimo/server/branches/3.0-M1/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo:948864,951792
+/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo:1184839-1213689
 /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf:749113,749116-807432,809079-825588

Propchange: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/shutdown
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.2/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf:826768
 /geronimo/server/branches/3.0-M1/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/shutdown:948864,951792
 /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/shutdown:1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.2/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat:826768
 /geronimo/server/branches/3.0-M1/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat:948864,951792
+/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat:1184839-1213689
 /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat:749113,749116-807432,809079-825588

Propchange: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.2/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat:826768
 /geronimo/server/branches/3.0-M1/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat:948864,951792
+/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat:1184839-1213689
 /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat:749113,749116-807432,809079-825588

Propchange: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/shutdown.bat
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.2/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat:826768
 /geronimo/server/branches/3.0-M1/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/shutdown.bat:948864,951792
 /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/shutdown.bat:1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties:948864,951792
-/geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties:809079-825588
+/geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties:809079-825588,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-config/src/main/java/org/apache/geronimo/deployment/spi/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-deploy-config/src/main/java/org/apache/geronimo/deployment/spi:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-deploy-config/src/main/java/org/apache/geronimo/deployment/spi:749113,749116-807432,809079-825588*
+/geronimo/server/trunk/framework/modules/geronimo-deploy-config/src/main/java/org/apache/geronimo/deployment/spi:749113,749116-807432,809079-825588*,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-config/src/main/java/org/apache/geronimo/deployment/spi/ModuleConfigurer.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-deploy-config/src/main/java/org/apache/geronimo/deployment/spi/ModuleConfigurer.java:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-deploy-config/src/main/java/org/apache/geronimo/deployment/spi/ModuleConfigurer.java:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-deploy-config/src/main/java/org/apache/geronimo/deployment/spi/ModuleConfigurer.java:749113,749116-807432,809079-825588,1184839-1213689

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/GeronimoDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/GeronimoDeploymentManager.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/GeronimoDeploymentManager.java (original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/GeronimoDeploymentManager.java Tue Dec 13 18:00:08 2011
@@ -34,4 +34,6 @@ public interface GeronimoDeploymentManag
 
     public <T> T getImplementation(Class<T> clazz);
     public URL[] getRepositories();
+    public boolean isRedefineClassesSupported();
+    
 }

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/eba/EBADeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/eba/EBADeploymentManager.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/eba/EBADeploymentManager.java (original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/eba/EBADeploymentManager.java Tue Dec 13 18:00:08 2011
@@ -20,20 +20,19 @@ package org.apache.geronimo.deployment.p
 import java.io.File;
 
 import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.kernel.GBeanNotFoundException;
-import org.apache.geronimo.kernel.NoSuchOperationException;
 import org.apache.geronimo.kernel.repository.Artifact;
 
-
 public interface EBADeploymentManager {
     
     public Artifact[] getEBAConfigurationIds();
     
-    public long[] getEBAContentBundleIds(AbstractName applicationGBeanName) throws GBeanNotFoundException, NoSuchOperationException, Exception;
+    public long[] getEBAContentBundleIds(AbstractName applicationGBeanName) throws Exception;
+    
+    public String getEBAContentBundleSymbolicName(AbstractName applicationGBeanName, long bundleId) throws Exception;
     
-    public String getEBAContentBundleSymbolicName(AbstractName applicationGBeanName, long bundleId) throws GBeanNotFoundException, NoSuchOperationException, Exception;
+    public void updateEBAContent(AbstractName applicationGBeanName, long bundleId, File bundleFile) throws Exception;
     
-    public void updateEBAContent(AbstractName applicationGBeanName, long bundleId, File bundleFile) throws GBeanNotFoundException, NoSuchOperationException, Exception;
+    public boolean hotSwapEBAContent(AbstractName applicationGBeanName, long bundleId, File changesFile, boolean updateArchive) throws Exception;
     
     public AbstractName getApplicationGBeanName(Artifact configurationId);
     

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/ExtendedDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/ExtendedDeploymentManager.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/ExtendedDeploymentManager.java (original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/ExtendedDeploymentManager.java Tue Dec 13 18:00:08 2011
@@ -34,7 +34,6 @@ import org.apache.geronimo.gbean.Abstrac
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.InvalidGBeanException;
-import org.apache.geronimo.kernel.NoSuchOperationException;
 import org.apache.geronimo.kernel.config.ConfigurationInfo;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.NoSuchStoreException;
@@ -284,13 +283,13 @@ public abstract class ExtendedDeployment
         return result.size() == 0 ? null : result.toArray(new Artifact[result.size()]);
     }
     
-    public long[] getEBAContentBundleIds(AbstractName applicationGBeanName) throws GBeanNotFoundException, NoSuchOperationException, Exception{
+    public long[] getEBAContentBundleIds(AbstractName applicationGBeanName) throws Exception {
         long[] ids = (long[])kernel.getAttribute(applicationGBeanName, "applicationContentBundleIds");
         
         return ids;
     }
     
-    public String getEBAContentBundleSymbolicName(AbstractName applicationGBeanName, long bundleId) throws GBeanNotFoundException, NoSuchOperationException, Exception{
+    public String getEBAContentBundleSymbolicName(AbstractName applicationGBeanName, long bundleId) throws Exception {
         Object name = kernel.invoke(applicationGBeanName, "getApplicationContentBundleSymbolicName", new Object[]{bundleId}, new String[]{long.class.getName()});
         if (name!=null) return (String)name;
         
@@ -300,8 +299,19 @@ public abstract class ExtendedDeployment
     /**
      * Only support local bundle update
      */
-    public void updateEBAContent(AbstractName applicationGBeanName, long bundleId, File bundleFile) throws GBeanNotFoundException, NoSuchOperationException, Exception{
-        kernel.invoke(applicationGBeanName, "updateApplicationContent", new Object[]{bundleId, bundleFile}, new String[]{long.class.getName(), bundleFile.getClass().getName()});
+    public void updateEBAContent(AbstractName applicationGBeanName, long bundleId, File bundleFile) throws Exception {
+        Object[] arguments = new Object[] {bundleId, bundleFile};
+        String[] argumentTypes = new String[] {long.class.getName(), File.class.getName()};
+        kernel.invoke(applicationGBeanName, "updateApplicationContent", arguments, argumentTypes);
+    }
+    
+    /**
+     * Only support local bundle update
+     */
+    public boolean hotSwapEBAContent(AbstractName applicationGBeanName, long bundleId, File changesFile, boolean updateArchive) throws Exception {
+        Object[] arguments = new Object[] {bundleId, changesFile, updateArchive};
+        String[] argumentTypes = new String[] {long.class.getName(), File.class.getName(), boolean.class.getName()};
+        return (Boolean) kernel.invoke(applicationGBeanName, "hotSwapApplicationContent", arguments, argumentTypes);
     }
     
     public AbstractName getApplicationGBeanName(Artifact configurationId) {
@@ -384,4 +394,19 @@ public abstract class ExtendedDeployment
             return null;
         }
     }
+    
+    public boolean isRedefineClassesSupported() {
+        AbstractNameQuery jvmBeanQueary = new AbstractNameQuery("org.apache.geronimo.management.JVM");
+        Set<AbstractName> beanNames = kernel.listGBeans(jvmBeanQueary);
+        if (beanNames == null || beanNames.isEmpty()) {
+            return false;
+        }
+        try {
+            Boolean value = (Boolean) kernel.getAttribute(beanNames.iterator().next(), "redefineClassesSupported");
+            return (value != null) ? value.booleanValue() : false;
+        } catch (Exception e) {
+            log.debug("Error invoking JVM MBean", e);
+            return false;
+        }
+    }
 }

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java (original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java Tue Dec 13 18:00:08 2011
@@ -204,12 +204,21 @@ public class RemoteDeploymentManager ext
     }
 
     @Override
-    public void updateEBAContent(AbstractName applicationGBeanName, long bundleId, File newfile) throws GBeanNotFoundException, NoSuchOperationException, Exception{
+    public void updateEBAContent(AbstractName applicationGBeanName, long bundleId, File bundleFile) throws GBeanNotFoundException, NoSuchOperationException, Exception{
         if(!isSameMachine) {
             throw new UnsupportedOperationException("Update EBA content operation is not supportted from a remote JMX connection");
         }
         
-        super.updateEBAContent(applicationGBeanName, bundleId, newfile);
+        super.updateEBAContent(applicationGBeanName, bundleId, bundleFile);
+    }
+    
+    @Override
+    public boolean hotSwapEBAContent(AbstractName applicationGBeanName, long bundleId, File changesFile, boolean updateArchive) throws GBeanNotFoundException, NoSuchOperationException, Exception{
+        if(!isSameMachine) {
+            throw new UnsupportedOperationException("Update EBA content operation is not supportted from a remote JMX connection");
+        }
+        
+        return super.hotSwapEBAContent(applicationGBeanName, bundleId, changesFile, updateArchive);
     }
     
     @Override

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-deploy-tool/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,3 @@
 /geronimo/server/branches/2.2/framework/modules/geronimo-deploy-tool:826768,832538,885058,917413
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-deploy-tool:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-deploy-tool:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-deploy-tool:749113,749116-807432,809079-825588,1184839-1213689

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-hook/src/main/java/org/apache/geronimo/hook/equinox/SharedLibClassLoaderDelegateHook.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-hook/src/main/java/org/apache/geronimo/hook/equinox/SharedLibClassLoaderDelegateHook.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-hook/src/main/java/org/apache/geronimo/hook/equinox/SharedLibClassLoaderDelegateHook.java (original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-hook/src/main/java/org/apache/geronimo/hook/equinox/SharedLibClassLoaderDelegateHook.java Tue Dec 13 18:00:08 2011
@@ -18,9 +18,13 @@
 package org.apache.geronimo.hook.equinox;
 
 import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.net.URL;
+import java.util.Collections;
 import java.util.Enumeration;
+import java.util.LinkedHashSet;
 import java.util.List;
+import java.util.Set;
 
 import org.apache.geronimo.hook.BundleHelper;
 import org.apache.geronimo.hook.SharedLibraryRegistry;
@@ -81,7 +85,29 @@ public class SharedLibClassLoaderDelegat
     }
 
     public Enumeration<URL> postFindResources(String name, BundleClassLoader classLoader, BundleData data) throws FileNotFoundException {
-        return null;
+        SharedLibraryRegistry sharedLibraryRegistry = BundleHelper.getSharedLibraryRegistry();
+        if (sharedLibraryRegistry == null) {
+            return null;
+        }
+        List<Bundle> dependentSharedLibBundles = sharedLibraryRegistry.getDependentSharedLibBundles(data.getBundleID());
+        if (dependentSharedLibBundles == null || dependentSharedLibBundles.isEmpty()) {
+            return null;
+        }
+        Set<URL> foundResources = new LinkedHashSet<URL>();
+        for (Bundle sharedLibBundle : dependentSharedLibBundles) {
+            try {
+                Enumeration<URL> en = sharedLibBundle.getResources(name);
+                if (en == null) {
+                    continue;
+                }
+                while (en.hasMoreElements()) {
+                    foundResources.add(en.nextElement());
+                }
+            } catch (IOException e) {
+                //ignore this bundle
+            }
+        }
+        return Collections.enumeration(foundResources);
     }
 
     public String preFindLibrary(String name, BundleClassLoader classLoader, BundleData data) throws FileNotFoundException {

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/pom.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,3 @@
 /geronimo/server/branches/2.2/framework/modules/geronimo-kernel/pom.xml:832538,885058
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-kernel/pom.xml:948864,951792
+/geronimo/server/trunk/framework/modules/geronimo-kernel/pom.xml:1184839-1213689

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java (original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java Tue Dec 13 18:00:08 2011
@@ -36,8 +36,6 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
@@ -56,7 +54,13 @@ import org.apache.geronimo.kernel.reposi
 import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
 import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
 import org.apache.geronimo.kernel.repository.Maven2Repository;
+import org.apache.geronimo.kernel.util.CircularReferencesException;
+import org.apache.geronimo.kernel.util.IllegalNodeConfigException;
+import org.apache.geronimo.kernel.util.SortUtils;
+import org.apache.geronimo.kernel.util.SortUtils.Visitor;
 import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Rev:386276 $ $Date$
@@ -523,4 +527,82 @@ public final class ConfigurationUtil {
             throw new InvalidConfigException("Unknown start exception", e);
         }
     }
+
+    public static List<GBeanData> sortGBeanDataByDependency(final Collection<GBeanData> gbeanDatas) throws IllegalNodeConfigException, CircularReferencesException {
+
+        return SortUtils.sort(gbeanDatas, new Visitor<GBeanData>() {
+
+            @Override
+            public String getName(GBeanData t) {
+                return t.getAbstractName().toString();
+            }
+
+            @Override
+            public List<String> getAfterNames(GBeanData t) {
+                List<String> afterNames = new ArrayList<String>();
+                for (GBeanData gbeanData : gbeanDatas) {
+                    if (gbeanData == t) {
+                        continue;
+                    }
+                    if (isDependent(gbeanData, t)) {
+                        afterNames.add(gbeanData.getAbstractName().toString());
+                    }
+                }
+                return afterNames;
+            }
+
+            @Override
+            public List<String> getBeforeNames(GBeanData t) {
+                return Collections.<String>emptyList();
+            }
+
+            @Override
+            public boolean afterOthers(GBeanData t) {
+                return false;
+            }
+
+            @Override
+            public boolean beforeOthers(GBeanData t) {
+                return false;
+            }
+
+            /**
+            *
+            * @param o1
+            * @param o2
+            * @return true if o1 is dependent on o2
+            */
+           private boolean isDependent(GBeanData o1, GBeanData o2) {
+               for (ReferencePatterns referencePatterns : o1.getDependencies()) {
+                   if (match(referencePatterns, o2)) {
+                       return true;
+                   }
+               }
+               for (Map.Entry<String, ReferencePatterns> entry : o1.getReferences().entrySet()) {
+                   if (o1.getGBeanInfo().getReference(entry.getKey()).getProxyType().equals(Collection.class.getName())) {
+                       continue;
+                   }
+                   if (match(entry.getValue(), o2)) {
+                       return true;
+                   }
+               }
+               return false;
+           }
+
+           private boolean match(ReferencePatterns referencePatterns, GBeanData targetGBeanData) {
+               AbstractName targetAbstractName = targetGBeanData.getAbstractName();
+               if (referencePatterns.isResolved()) {
+                   return referencePatterns.getAbstractName().equals(targetAbstractName);
+               } else if (referencePatterns.getPatterns() != null) {
+                   for (AbstractNameQuery abstractNameQuery : referencePatterns.getPatterns()) {
+                       if (abstractNameQuery.matches(targetAbstractName, targetGBeanData.getGBeanInfo().getInterfaces())) {
+                           return true;
+                       }
+                   }
+               }
+               return false;
+           }
+        });
+
+    }
 }

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java (original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java Tue Dec 13 18:00:08 2011
@@ -22,21 +22,20 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.gbean.InvalidConfigurationException;
+import org.apache.geronimo.gbean.annotation.GBean;
 import org.apache.geronimo.gbean.annotation.OsgiService;
 import org.apache.geronimo.gbean.annotation.ParamReference;
 import org.apache.geronimo.gbean.annotation.ParamSpecial;
 import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
-import org.apache.geronimo.gbean.annotation.GBean;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.InternalKernelException;
@@ -48,8 +47,8 @@ import org.apache.geronimo.kernel.reposi
 import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
 import org.apache.geronimo.kernel.repository.ListableRepository;
 import org.apache.geronimo.kernel.repository.MissingDependencyException;
-import org.apache.geronimo.kernel.repository.Repository;
-import org.osgi.framework.Bundle;
+import org.apache.geronimo.kernel.util.CircularReferencesException;
+import org.apache.geronimo.kernel.util.IllegalNodeConfigException;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -252,12 +251,19 @@ public class KernelConfigurationManager 
             Configuration childConfiguration = (Configuration) iterator.next();
             stopRecursive(childConfiguration);
         }
-
-        Collection gbeans = configuration.getGBeans().values();
-
+        Collection<GBeanData> gbeans;
+        try {
+            List<GBeanData> sortedGBeans = ConfigurationUtil.sortGBeanDataByDependency(configuration.getGBeans().values());
+            Collections.reverse(sortedGBeans);
+            gbeans = sortedGBeans;
+        } catch (IllegalNodeConfigException e) {
+            gbeans = configuration.getGBeans().values();
+        } catch (CircularReferencesException e) {
+            gbeans = configuration.getGBeans().values();
+        }
         // stop the gbeans
-        for (Iterator iterator = gbeans.iterator(); iterator.hasNext();) {
-            GBeanData gbeanData = (GBeanData) iterator.next();
+        for (Iterator<GBeanData> iterator = gbeans.iterator(); iterator.hasNext();) {
+            GBeanData gbeanData = iterator.next();
             AbstractName gbeanName = gbeanData.getAbstractName();
             try {
                 kernel.stopGBean(gbeanName);
@@ -269,8 +275,8 @@ public class KernelConfigurationManager 
         }
 
         // unload the gbeans
-        for (Iterator iterator = gbeans.iterator(); iterator.hasNext();) {
-            GBeanData gbeanData = (GBeanData) iterator.next();
+        for (Iterator<GBeanData> iterator = gbeans.iterator(); iterator.hasNext();) {
+            GBeanData gbeanData = iterator.next();
             AbstractName gbeanName = gbeanData.getAbstractName();
             try {
                 kernel.unloadGBean(gbeanName);

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/JarUtils.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/JarUtils.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/JarUtils.java (original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/JarUtils.java Tue Dec 13 18:00:08 2011
@@ -55,18 +55,28 @@ public final class JarUtils {
     }
 
     public static final File DUMMY_JAR_FILE;
+    public static final String TEMP_FILE_NAME;
 
     private static final boolean jarUrlRewrite;
     static {
         //Why not always set this with true ? Online deployer also lock the jar files
-        jarUrlRewrite = new Boolean(System.getProperty("org.apache.geronimo.kernel.util.JarUtils.jarUrlRewrite", "true"));
+        jarUrlRewrite = Boolean.valueOf(System.getProperty("org.apache.geronimo.kernel.util.JarUtils.jarUrlRewrite", "true"));
         try {
             DUMMY_JAR_FILE = FileUtils.createTempFile(false);
+            TEMP_FILE_NAME = DUMMY_JAR_FILE.getCanonicalPath();
             new JarOutputStream(new FileOutputStream(JarUtils.DUMMY_JAR_FILE), new Manifest()).close();
         } catch (IOException e) {
             throw new ExceptionInInitializerError(e);
         }
     }
+    
+    public static void assertTempFile() throws IOException {
+    	if(DUMMY_JAR_FILE.exists()) {
+    		return;
+    	} else {
+    		new JarOutputStream(new FileOutputStream(new File(JarUtils.TEMP_FILE_NAME)), new Manifest()).close();
+    	}
+    }
 
     public static File toTempFile(JarFile jarFile, String path) throws IOException {
         return toTempFile(createJarURL(jarFile, path));

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi:749113,749116-807432,809079-825588*
+/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi:749113,749116-807432,809079-825588*,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java:749113,749116-807432,809079-825588,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundleContext.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundleContext.java:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundleContext.java:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundleContext.java:749113,749116-807432,809079-825588,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockRespository.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockRespository.java:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockRespository.java:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockRespository.java:749113,749116-807432,809079-825588,1184839-1213689

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/JVM.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/JVM.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/JVM.java (original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/JVM.java Tue Dec 13 18:00:08 2011
@@ -44,4 +44,6 @@ public interface JVM extends org.apache.
      */
     SystemLog getSystemLog();
 
+    boolean isRedefineClassesSupported();
+    
 }

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-pax-logging/src/main/java/org/apache/geronimo/logging/SystemLog.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/SystemLog.java:826768
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-pax-logging/src/main/java/org/apache/geronimo/logging/SystemLog.java:948864,951792
+/geronimo/server/trunk/framework/modules/geronimo-pax-logging/src/main/java/org/apache/geronimo/logging/SystemLog.java:1184839-1213689
 /geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/SystemLog.java:749113,749116-807432,809079-825588

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-pax-logging/src/main/java/org/apache/geronimo/logging/impl/Log4jService.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java:826768
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-pax-logging/src/main/java/org/apache/geronimo/logging/impl/Log4jService.java:948864,951792
+/geronimo/server/trunk/framework/modules/geronimo-pax-logging/src/main/java/org/apache/geronimo/logging/impl/Log4jService.java:1184839-1213689
 /geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java:749113,749116-807432,809079-825588

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-rmi-loader/src/main/java/org/apache/geronimo/kernel/rmi/RMIClassLoaderSpiImpl.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,3 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-rmi-loader/src/main/java/org/apache/geronimo/kernel/rmi/RMIClassLoaderSpiImpl.java:948864,951792
 /geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/RMIClassLoaderSpiImpl.java:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-rmi-loader/src/main/java/org/apache/geronimo/kernel/rmi/RMIClassLoaderSpiImpl.java:1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean:749113,749116-807432,809079-825588*
+/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean:749113,749116-807432,809079-825588*,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DConfigBeanRootSupport.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DConfigBeanRootSupport.java:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DConfigBeanRootSupport.java:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DConfigBeanRootSupport.java:749113,749116-807432,809079-825588,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DConfigBeanSupport.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DConfigBeanSupport.java:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DConfigBeanSupport.java:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DConfigBeanSupport.java:749113,749116-807432,809079-825588,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DeploymentConfigurationSupport.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DeploymentConfigurationSupport.java:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DeploymentConfigurationSupport.java:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/DeploymentConfigurationSupport.java:749113,749116-807432,809079-825588,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/XmlBeanSupport.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/XmlBeanSupport.java:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/XmlBeanSupport.java:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/dconfigbean/XmlBeanSupport.java:749113,749116-807432,809079-825588,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi:749113,749116-807432,809079-825588*
+/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi:749113,749116-807432,809079-825588*,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi/BootActivator.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,2 @@
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi/BootActivator.java:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi/BootActivator.java:749113,749116-807432,809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi/BootActivator.java:749113,749116-807432,809079-825588,1184839-1213689

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-transformer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-transformer/pom.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-transformer/pom.xml (original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-transformer/pom.xml Tue Dec 13 18:00:08 2011
@@ -48,6 +48,7 @@
                 <configuration>
                     <instructions>
                         <Premain-Class>org.apache.geronimo.transformer.TransformerAgent</Premain-Class>
+                        <Can-Redefine-Classes>true</Can-Redefine-Classes>
                     </instructions>
                 </configuration>
             </plugin>

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-transformer/src/main/java/org/apache/geronimo/transformer/TransformerAgent.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-transformer/src/main/java/org/apache/geronimo/transformer/TransformerAgent.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-transformer/src/main/java/org/apache/geronimo/transformer/TransformerAgent.java (original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-transformer/src/main/java/org/apache/geronimo/transformer/TransformerAgent.java Tue Dec 13 18:00:08 2011
@@ -16,18 +16,28 @@
  */
 package org.apache.geronimo.transformer;
 
+import java.lang.instrument.ClassDefinition;
 import java.lang.instrument.Instrumentation;
 import java.lang.instrument.ClassFileTransformer;
+import java.lang.instrument.UnmodifiableClassException;
 
 /**
  * @version $Rev$ $Date$
  */
 public class TransformerAgent {
 
+    private static final String REDEFINE_CLASSES_PROPERTY = "org.apache.geronimo.transformer.redefineClasses";
+    
+    private static Instrumentation instrumentation;
     private static final TransformerCollection transformerCollection = new TransformerCollection();
 
     public static void premain(String args, Instrumentation inst) {
         inst.addTransformer(transformerCollection);
+        
+        String redefineClasses = System.getProperty(REDEFINE_CLASSES_PROPERTY, "true");        
+        if ("true".equalsIgnoreCase(redefineClasses)) {
+            instrumentation = inst;
+        }
     }
 
     public static void addTransformer(ClassFileTransformer classFileTransformer) {
@@ -37,4 +47,21 @@ public class TransformerAgent {
     public static void removeTransformer(ClassFileTransformer classFileTransformer) {
         transformerCollection.removeTransformer(classFileTransformer);
     }
+    
+    public static boolean isRedefineClassesSupported() {
+        return instrumentation != null && instrumentation.isRedefineClassesSupported();
+    }
+    
+    public static void redefine(ClassDefinition... definitions) throws UnmodifiableClassException {
+        if (!isRedefineClassesSupported()) {
+            throw new UnmodifiableClassException("Class redefinition is not supported");
+        }
+        try {
+            instrumentation.redefineClasses(definitions);
+        } catch (ClassNotFoundException e) {
+            UnmodifiableClassException ex = new UnmodifiableClassException();
+            ex.initCause(e);
+            throw ex;
+        }
+    }
 }

Propchange: geronimo/server/branches/3.0-beta/framework/modules/geronimo-upgrade/src/test/resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,3 @@
 /geronimo/server/branches/2.2/framework/modules/geronimo-upgrade/src/test/resources:826768,832538,885058
 /geronimo/server/branches/3.0-M1/framework/modules/geronimo-upgrade/src/test/resources:948864,951792
-/geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources:809079-825588
+/geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources:809079-825588,1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/plugins/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.2/plugins:832538,885058
 /geronimo/server/branches/3.0-M1/plugins:948864,951792
+/geronimo/server/trunk/plugins:1184839-1213689
 /geronimo/server/trunk/plugins/j2ee:887507

Propchange: geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/ApplicationConfigBuilder.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1 +1,2 @@
 /geronimo/server/branches/3.0-M1/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/ApplicationConfigBuilder.java:948864,951792
+/geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/ApplicationConfigBuilder.java:1184839-1213689

Modified: geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/pom.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/pom.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/pom.xml Tue Dec 13 18:00:08 2011
@@ -40,6 +40,12 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-transformer</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>org.apache.aries</groupId>
             <artifactId>org.apache.aries.util</artifactId>                
         </dependency>

Propchange: geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.2/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder:832538,885058
 /geronimo/server/branches/3.0-M1/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder:948864,951792
+/geronimo/server/trunk/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries:1184839-1213689
 /geronimo/server/trunk/plugins/j2ee/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder:887507

Modified: geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationGBean.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationGBean.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationGBean.java Tue Dec 13 18:00:08 2011
@@ -17,25 +17,12 @@
 package org.apache.geronimo.aries;
 
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
 import java.text.MessageFormat;
 import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Enumeration;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import java.util.zip.ZipOutputStream;
 
 import org.apache.aries.application.ApplicationMetadataFactory;
 import org.apache.aries.application.DeploymentContent;
@@ -56,17 +43,13 @@ import org.apache.geronimo.gbean.annotat
 import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.kernel.util.IOUtils;
 import org.apache.xbean.osgi.bundle.util.BundleUtils;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
-import org.osgi.framework.FrameworkEvent;
-import org.osgi.framework.FrameworkListener;
 import org.osgi.framework.ServiceException;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.Version;
-import org.osgi.service.packageadmin.ExportedPackage;
 import org.osgi.service.packageadmin.PackageAdmin;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -82,6 +65,7 @@ public class ApplicationGBean implements
     private final Bundle bundle;
     private final ApplicationInstaller installer;
     private final Artifact configId;
+    private final ApplicationUpdateHelper updateHelper;
     private GeronimoApplication application;
     private ApplicationState applicationState;
     private Set<Bundle> applicationBundles;
@@ -94,6 +78,7 @@ public class ApplicationGBean implements
         this.bundle = bundle;
         this.installer = installer;
         this.configId = configId;
+        this.updateHelper = new ApplicationUpdateHelper(this);
                 
         BundleContext bundleContext = bundle.getBundleContext();
 
@@ -155,221 +140,46 @@ public class ApplicationGBean implements
         Bundle bundle = getBundle(bundleId);
         return (bundle != null) ? bundle.getSymbolicName() : null;
     }
-
-    public synchronized void updateApplicationContent(long bundleId, File bundleFile) throws Exception {
+    
+    /*
+     * Update contents of a single bundle within the OSGi application.
+     * 
+     * @param bundleId id of the bundle to update.
+     * @param file new contents of the bundle.
+     */
+    public synchronized void updateApplicationContent(long bundleId, File file) throws Exception {
         Bundle targetBundle = getBundle(bundleId);
-
         if (targetBundle == null) {
             throw new IllegalArgumentException("Could not find bundle with id " + bundleId + " in the application");
         }
-
-        String applicationName = application.getApplicationMetadata().getApplicationScope();
-        String bundleName = targetBundle.getSymbolicName();
         
-        LOG.info("Updating {} bundle in {} application", bundleName, applicationName);
-                
-        BundleContext context = bundle.getBundleContext();
-
-        ServiceReference reference = null;
-        RefreshListener refreshListener = null;
-        try {
-            // stop the bundle
-            targetBundle.stop();
-
-            // update the bundle
-            FileInputStream fi = null;
-            try {
-                fi = new FileInputStream(bundleFile);
-                targetBundle.update(fi);
-            } finally {
-                IOUtils.close(fi);
-            }
-
-            reference = context.getServiceReference(PackageAdmin.class.getName());
-            PackageAdmin packageAdmin = (PackageAdmin) context.getService(reference);
-            
-            Bundle[] bundles = new Bundle [] { targetBundle };
-            // resolve the bundle
-            if (!packageAdmin.resolveBundles(bundles)) {
-                StringBuilder builder = new StringBuilder();
-                builder.append("Updated ").append(bundleName).append(" bundle cannot be resolved.");
-                
-                // check for resolver errors
-                ResolverErrorAnalyzer errorAnalyzer = new ResolverErrorAnalyzer(context);
-                String resolverErrors = errorAnalyzer.getErrorsAsString(Arrays.asList(bundles));
-                if (resolverErrors != null) {
-                    builder.append(" ").append(resolverErrors);
-                }
-                
-                throw new BundleException(builder.toString());
-            }
-            
-            Set<Bundle> dependents = new HashSet<Bundle>();
-            collectDependentBundles(packageAdmin, dependents, targetBundle);
-            if (!dependents.isEmpty()) {
-                String bundleListString = bundleCollectionToString(dependents);
-                LOG.info("Update of {} bundle will cause the following bundles to be refreshed: {}", bundleName, bundleListString);
-            }
-            
-            // install listener for package refresh
-            refreshListener = new RefreshListener();
-            context.addFrameworkListener(refreshListener);
-
-            // refresh the bundle - this happens asynchronously
-            packageAdmin.refreshPackages(bundles);
-
-            // update application archive
-            try {
-                updateArchive(targetBundle, bundleFile);
-            } catch (Exception e) {
-                LOG.warn("Error updating application archive with the new contents. " +
-                         "Changes made might be gone next time the application or server is restarted.", e.getMessage());
-            }
-
-            // wait for package refresh to finish
-            refreshListener.waitForRefresh(10 * 1000);
-
-            // start the bundle
-            if (BundleUtils.canStart(targetBundle)) {
-                targetBundle.start(Bundle.START_TRANSIENT);
-            }
-            
-            
-            LOG.info("Bundle {} was successfully updated in {} application", bundleName, applicationName);
-            
-        } catch (Exception e) {
-            LOG.error("Error updating " + bundleName + " bundle in " + applicationName + " application", e);
-            throw new Exception("Error updating application: " + e.getMessage());
-        } finally {
-            if (refreshListener != null) {
-                context.removeFrameworkListener(refreshListener);
-            }
-            if (reference != null) {
-                context.ungetService(reference);
-            }
-        }
+        updateHelper.updateBundle(targetBundle, file);
     }
     
-    private class RefreshListener implements FrameworkListener {
-
-        public CountDownLatch latch = new CountDownLatch(1);
-
-        public void frameworkEvent(FrameworkEvent event) {
-            if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED) {
-                latch.countDown();
-            }
-        }
-
-        public void waitForRefresh(int timeout) {
-            try {
-                latch.await(timeout, TimeUnit.MILLISECONDS);
-            } catch (InterruptedException e) {
-                // ignore
-            }
+    /*
+     * Attempts to hot swap classes of a single bundle within the OSGi application.
+     * 
+     * @param bundleId id of the bundle to update.
+     * @param changesFile file containing updated class files for the bundle.
+     * @param updateArchive indicates if the application archive file should be updated with the changes. 
+     */
+    public synchronized boolean hotSwapApplicationContent(long bundleId, File changesFile, boolean updateArchive) throws Exception {
+        Bundle targetBundle = getBundle(bundleId);
+        if (targetBundle == null) {
+            throw new IllegalArgumentException("Could not find bundle with id " + bundleId + " in the application");
         }
-    }
 
-    private void collectDependentBundles(PackageAdmin packageAdmin, Set<Bundle> dependents, Bundle bundle) {
-        ExportedPackage[] exportedPackages = packageAdmin.getExportedPackages(bundle);
-        if (exportedPackages != null) {
-            for (ExportedPackage exportedPackage : exportedPackages) {
-                Bundle[] importingBundles = exportedPackage.getImportingBundles();
-                if (importingBundles != null) {
-                    for (Bundle importingBundle : importingBundles) {
-                        if (!dependents.contains(importingBundle)) {
-                            dependents.add(importingBundle);
-                            collectDependentBundles(packageAdmin, dependents, importingBundle);
-                        }
-                    }
-                }
-            }
-        }
+        return updateHelper.updateBundleClasses(targetBundle, changesFile, updateArchive);
     }
-    
-    private static String bundleCollectionToString(Collection<Bundle> bundles) {
-        StringBuilder builder = new StringBuilder();
-        Iterator<Bundle> iterator = bundles.iterator();
-        while(iterator.hasNext()) {
-            Bundle bundle = iterator.next();
-            builder.append(bundle.getSymbolicName());
-            builder.append(" [").append(bundle.getBundleId()).append("]");
-            if (iterator.hasNext()) {
-                builder.append(", ");
-            }
-        }
-       return builder.toString();
-    }
-    
-    private void updateArchive(Bundle bundle, File bundleFile) throws IOException {
+   
+    protected File getApplicationArchive() throws IOException {
         File ebaArchive = installer.getApplicationLocation(configId);
         if (ebaArchive == null || !ebaArchive.exists()) {
             throw new IOException("Cannot locate application archive for " + configId);
         }
-
-        File newEbaArchive = new File(ebaArchive.getAbsoluteFile() + ".new");
-
-        URI bundleLocation = URI.create(bundle.getLocation());
-        String bundleNameInApp = bundleLocation.getPath();
-        if (bundleNameInApp.startsWith("/")) {
-            bundleNameInApp = bundleNameInApp.substring(1);
-        }
-
-        LOG.debug("Updating {} application archive with new contents for {}", ebaArchive, bundleNameInApp);
-
-        ZipFile oldZipFile = null;
-        ZipOutputStream newZipFile = null;
-        try {
-            newZipFile = new ZipOutputStream(new FileOutputStream(newEbaArchive));
-            oldZipFile = new ZipFile(ebaArchive);
-            Enumeration<? extends ZipEntry> entries = oldZipFile.entries();
-            byte[] buffer = new byte[4096];
-            while (entries.hasMoreElements()) {
-                ZipEntry entry = (ZipEntry) entries.nextElement();
-
-                InputStream in = null;
-                if (entry.getName().equals(bundleNameInApp)) {
-                    in = new FileInputStream(bundleFile);
-                    LOG.debug("Updating contents of {} with {}", bundleNameInApp, bundleFile.getAbsolutePath());
-                } else {
-                    in = oldZipFile.getInputStream(entry);
-                }
-                try {
-                    newZipFile.putNextEntry(new ZipEntry(entry.getName()));
-                    try {
-                        int count;
-                        while ((count = in.read(buffer)) > 0) {
-                            newZipFile.write(buffer, 0, count);
-                        }
-                    } finally {
-                        newZipFile.closeEntry();
-                    }
-                } finally {
-                    IOUtils.close(in);
-                }
-            }
-        } catch (IOException e) {
-            LOG.debug("Error updating application archive", e);
-        } finally {
-            if (oldZipFile != null) {
-                try {
-                    oldZipFile.close();
-                } catch (IOException ignore) {
-                }
-            }
-            IOUtils.close(newZipFile);
-        }
-
-        if (ebaArchive.delete()) {
-            if (!newEbaArchive.renameTo(ebaArchive)) {
-                throw new IOException("Error renaming application archive");
-            } else {
-                LOG.debug("Application archive was successfully updated.");
-            }
-        } else {
-            throw new IOException("Error deleting existing application archive");
-        }
+        return ebaArchive;
     }
-
+    
     protected Bundle getBundle() {
         return bundle;
     }
@@ -386,16 +196,20 @@ public class ApplicationGBean implements
         return applicationState;
     }
     
+    protected String getApplicationName() {
+        return application.getApplicationMetadata().getApplicationScope();
+    }
+    
     private DeploymentMetadata getDeploymentMetadata(AriesApplicationResolver resolver, DeploymentMetadataFactory deploymentFactory) throws ResolverException {
         DeploymentMetadata meta = application.getDeploymentMetadata();
         if (meta == null) {
             // try to resolve the application
-            LOG.debug("Resolving {} application.", application.getApplicationMetadata().getApplicationScope());
+            LOG.debug("Resolving {} application.", getApplicationName());
             Set<BundleInfo> requiredBundles = resolver.resolve(application);
             meta = deploymentFactory.createDeploymentMetadata(application, requiredBundles);
             LOG.debug("Resolved application bundles: {} ", requiredBundles);
         } else {
-            LOG.debug("Application {} is resolved.", application.getApplicationMetadata().getApplicationScope());
+            LOG.debug("Application {} is resolved.", getApplicationName());
         }
         return meta;
     }
@@ -520,13 +334,13 @@ public class ApplicationGBean implements
     }
     
     public void doStart() throws Exception {
-        LOG.debug("Starting {} application.", application.getApplicationMetadata().getApplicationScope());
+        LOG.debug("Starting {} application.", getApplicationName());
         
         applicationState = ApplicationState.STARTING;
         try {
             startApplicationBundles();
             applicationState = ApplicationState.ACTIVE;
-            LOG.debug("Application {} started successfully.", application.getApplicationMetadata().getApplicationScope());
+            LOG.debug("Application {} started successfully.", getApplicationName());
         } catch (BundleException be) {
             applicationState = ApplicationState.INSTALLED;
             
@@ -541,9 +355,7 @@ public class ApplicationGBean implements
                 rootMessage = resolverErrors;
             }
 
-            String message = MessageFormat.format("Error starting {0} application. {1}", 
-                                                  application.getApplicationMetadata().getApplicationScope(), 
-                                                  rootMessage);
+            String message = MessageFormat.format("Error starting {0} application. {1}", getApplicationName(), rootMessage);
             
             if (getFailOnStartError()) {
                 throw new BundleException(message, rootException);
@@ -581,13 +393,13 @@ public class ApplicationGBean implements
     }
     
     public void doStop() {
-        LOG.debug("Stopping {} application.", application.getApplicationMetadata().getApplicationScope());
+        LOG.debug("Stopping {} application.", getApplicationName());
         
         for (Bundle bundle : applicationBundles) {
             try {
                 bundle.uninstall();
             } catch (Exception e) {
-                e.printStackTrace();
+                LOG.error("Fail to uninstall", e);
             }
         }
         applicationBundles.clear();
@@ -617,7 +429,7 @@ public class ApplicationGBean implements
     }
     
     protected void applicationUninstall() {
-        LOG.debug("Uninstalling {} application.", application.getApplicationMetadata().getApplicationScope());
+        LOG.debug("Uninstalling {} application.", getApplicationName());
 
         try {
             installer.getConfigurationManager().unloadConfiguration(configId);

Modified: geronimo/server/branches/3.0-beta/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java Tue Dec 13 18:00:08 2011
@@ -438,6 +438,7 @@ public class AppClientModuleBuilder impl
             } else {
                 path = resource.getInternalRar();
                 try {
+                    JarUtils.assertTempFile();
                     connectorFile = new NestedJarFile(moduleFile, path);
                 } catch (IOException e) {
                     throw new DeploymentException("Could not locate connector inside ear", e);
@@ -596,6 +597,7 @@ public class AppClientModuleBuilder impl
                 for (String libEntryPath : libClasspath) {
                     if (libEntryPath.endsWith(".jar")) {
                         try {
+                            JarUtils.assertTempFile();
                             NestedJarFile library = new NestedJarFile(earFile, libEntryPath);
                             appClientDeploymentContext.addIncludeAsPackedJar(URI.create(libEntryPath), library);
                         } catch (IOException e) {
@@ -640,6 +642,7 @@ public class AppClientModuleBuilder impl
 
                     //Copy needed jar from ear to appclient configuration.
                     if (classpath.endsWith(".jar")) {
+                        JarUtils.assertTempFile();
                         NestedJarFile library = new NestedJarFile(earFile, classpath);
                         appClientDeploymentContext.addIncludeAsPackedJar(URI.create(classpath), library);
                     }

Propchange: geronimo/server/branches/3.0-beta/plugins/clustering/geronimo-deploy-farm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,4 +1,5 @@
 /geronimo/server/branches/2.1/plugins/clustering/geronimo-farm:903520
 /geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm:832538,885058
 /geronimo/server/branches/3.0-M1/plugins/clustering/geronimo-deploy-farm:948864,951792
+/geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm:1184839-1213689
 /geronimo/server/trunk/plugins/j2ee/clustering/geronimo-deploy-farm:887507

Propchange: geronimo/server/branches/3.0-beta/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicConfigurationNameBuilder.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.1/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicConfigurationNameBuilder.java:903520
 /geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicConfigurationNameBuilder.java:832538
 /geronimo/server/branches/3.0-M1/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicConfigurationNameBuilder.java:948864,951792
+/geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicConfigurationNameBuilder.java:1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/ConfigurationNameBuilder.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.1/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/ConfigurationNameBuilder.java:903520
 /geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/ConfigurationNameBuilder.java:832538
 /geronimo/server/branches/3.0-M1/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/ConfigurationNameBuilder.java:948864,951792
+/geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/ConfigurationNameBuilder.java:1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/BasicConfigurationNameBuilderTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,3 @@
 /geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/BasicConfigurationNameBuilderTest.java:832538
 /geronimo/server/branches/3.0-M1/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/BasicConfigurationNameBuilderTest.java:948864,951792
+/geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/BasicConfigurationNameBuilderTest.java:1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/plugins/connector-1_6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,2 +1,3 @@
 /geronimo/server/branches/3.0-M1/plugins/connector-1_6:948864,951792
 /geronimo/server/trunk/plugins/connector:799922,803943
+/geronimo/server/trunk/plugins/connector-1_6:1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/plugins/connector-1_6/connector-deployer-1_6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/3.0-M1/plugins/connector-1_6/connector-deployer-1_6:948864,951792
 /geronimo/server/trunk/plugins/connector/connector-deployer:803943
 /geronimo/server/trunk/plugins/connector/connector-deployer-1_6:799922,803943
+/geronimo/server/trunk/plugins/connector-1_6/connector-deployer-1_6:1184839-1213689

Modified: geronimo/server/branches/3.0-beta/plugins/connector-1_6/db-connectors/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/connector-1_6/db-connectors/pom.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/connector-1_6/db-connectors/pom.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/connector-1_6/db-connectors/pom.xml Tue Dec 13 18:00:08 2011
@@ -168,6 +168,12 @@
         
         <dependency>
             <groupId>org.tranql</groupId>
+            <artifactId>tranql-connector-sqlserver2008-xa</artifactId>
+            <type>rar</type>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.tranql</groupId>
             <artifactId>tranql-connector-db2ISeries-xa</artifactId>
             <type>rar</type>
         </dependency>

Modified: geronimo/server/branches/3.0-beta/plugins/connector-1_6/db-connectors/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/connector-1_6/db-connectors/src/main/history/dependencies.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/connector-1_6/db-connectors/src/main/history/dependencies.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/connector-1_6/db-connectors/src/main/history/dependencies.xml Tue Dec 13 18:00:08 2011
@@ -81,4 +81,9 @@
         <artifactId>tranql-connector-sqlserver2005-xa</artifactId>
         <type>rar</type>
     </dependency>
+    <dependency>
+            <groupId>org.tranql</groupId>
+            <artifactId>tranql-connector-sqlserver2008-xa</artifactId>
+            <type>rar</type>
+        </dependency>
 </plugin-artifact>

Propchange: geronimo/server/branches/3.0-beta/plugins/connector-1_6/geronimo-connector-builder-1_6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/3.0-M1/plugins/connector-1_6/geronimo-connector-builder-1_6:948864,951792
 /geronimo/server/trunk/plugins/connector/geronimo-connector-builder:799922
 /geronimo/server/trunk/plugins/connector/geronimo-connector-builder-1_6:799922,803943
+/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6:1184839-1213689

Modified: geronimo/server/branches/3.0-beta/plugins/connector-1_6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/connector-1_6/pom.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/connector-1_6/pom.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/connector-1_6/pom.xml Tue Dec 13 18:00:08 2011
@@ -195,7 +195,7 @@
             <dependency>
                 <groupId>org.tranql</groupId>
                 <artifactId>tranql-connector-db2-xa</artifactId>
-                <version>1.6</version>
+                <version>1.7</version>
                 <type>rar</type>
                 <exclusions>
                     <exclusion>
@@ -381,12 +381,29 @@
             
             <dependency>
                 <groupId>org.tranql</groupId>
-                <artifactId>tranql-connector-db2ISeries-xa</artifactId>
+                <artifactId>tranql-connector-sqlserver2008-xa</artifactId>
                 <version>1.0</version>
                 <type>rar</type>
                 <exclusions>
                     <exclusion>
                         <groupId>org.tranql</groupId>
+                        <artifactId>tranql-connector-sqlserver2008-common</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.tranql</groupId>
+                        <artifactId>tranql-connector</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+            
+            <dependency>
+                <groupId>org.tranql</groupId>
+                <artifactId>tranql-connector-db2ISeries-xa</artifactId>
+                <version>1.1</version>
+                <type>rar</type>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.tranql</groupId>
                         <artifactId>tranql-connector-db2ISeries-common</artifactId>
                     </exclusion>
                     <exclusion>

Modified: geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java Tue Dec 13 18:00:08 2011
@@ -307,9 +307,9 @@ public class ConfigManagerPortlet extend
                         }
                     } else if (info.getType() == ConfigurationModuleType.EBA) {
                         Configuration config = configManager.getConfiguration(info.getConfigID());
-                        if(config != null){
-                            for(Map.Entry<AbstractName, GBeanData> entry : config.getGBeans().entrySet()) {                               
-                                if(entry.getKey().getNameProperty(NameFactory.J2EE_TYPE).equals("GBean")) {
+                        if (config != null && configManager.isRunning(info.getConfigID())) {
+                            for(Map.Entry<AbstractName, GBeanData> entry : config.getGBeans().entrySet()) {
+                                if(entry.getKey().getNameProperty("name").equals("AriesApplication")) {
                                     try {
                                         ApplicationGBean applicationGBean = (ApplicationGBean)PortletManager.getKernel().getGBean(entry.getKey());
                                         long[] bundleIds = applicationGBean.getApplicationContentBundleIds();
@@ -317,16 +317,17 @@ public class ConfigManagerPortlet extend
                                         for (long id : bundleIds){
                                             Bundle bundle = bundleContext.getBundle(id);
                                             if (bundle != null && bundle.getHeaders().get("Web-ContextPath") != null){
-                                                details.getContextPaths().add((String)bundle.getHeaders().get("Web-ContextPath"));                                                
+                                                details.getContextPaths().add((String)bundle.getHeaders().get("Web-ContextPath"));
                                             }
-                                        }                                        
-                                    } catch (GBeanNotFoundException e) {                                        
-                                        logger.error("Configuration not found", e);
-                                    } catch (InternalKernelException e) {                                        
-                                        logger.error("Configuration not found", e);
-                                    } catch (IllegalStateException e) {                                        
-                                        logger.error("Configuration not found", e);
-                                    } 
+                                        }
+                                    } catch (GBeanNotFoundException e) {
+                                        logger.error("AriesApplication GBean is not found", e);
+                                    } catch (InternalKernelException e) {
+                                        logger.error("AriesApplication GBean is not found", e);
+                                    } catch (IllegalStateException e) {
+                                        logger.error("AriesApplication GBean is not found", e);
+                                    }
+                                    break;
                                 }
                             }
                         }

Modified: geronimo/server/branches/3.0-beta/plugins/debugviews/debugviews-portlets/src/main/java/org/apache/geronimo/console/classloaderview/ClassLoaderViewHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/debugviews/debugviews-portlets/src/main/java/org/apache/geronimo/console/classloaderview/ClassLoaderViewHelper.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/debugviews/debugviews-portlets/src/main/java/org/apache/geronimo/console/classloaderview/ClassLoaderViewHelper.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/debugviews/debugviews-portlets/src/main/java/org/apache/geronimo/console/classloaderview/ClassLoaderViewHelper.java Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
+<<<<<<< .working
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -15,4 +16,23 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */
\ No newline at end of file
+ */=======
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+>>>>>>> .merge-right.r1213689

Modified: geronimo/server/branches/3.0-beta/plugins/debugviews/debugviews-portlets/src/main/java/org/apache/geronimo/console/classloaderview/ClassLoaderViewPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/debugviews/debugviews-portlets/src/main/java/org/apache/geronimo/console/classloaderview/ClassLoaderViewPortlet.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/debugviews/debugviews-portlets/src/main/java/org/apache/geronimo/console/classloaderview/ClassLoaderViewPortlet.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/debugviews/debugviews-portlets/src/main/java/org/apache/geronimo/console/classloaderview/ClassLoaderViewPortlet.java Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
+<<<<<<< .working
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -15,4 +16,23 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */
\ No newline at end of file
+ */=======
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+>>>>>>> .merge-right.r1213689



Mime
View raw message