Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 68482 invoked from network); 31 Jul 2006 14:19:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Jul 2006 14:19:33 -0000 Received: (qmail 74680 invoked by uid 500); 31 Jul 2006 14:19:30 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 74635 invoked by uid 500); 31 Jul 2006 14:19:30 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 74622 invoked by uid 99); 31 Jul 2006 14:19:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2006 07:19:30 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ammulder@gmail.com designates 66.249.92.170 as permitted sender) Received: from [66.249.92.170] (HELO ug-out-1314.google.com) (66.249.92.170) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2006 07:19:28 -0700 Received: by ug-out-1314.google.com with SMTP id m2so808381uge for ; Mon, 31 Jul 2006 07:19:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=tsCApJ7uwB9Ng4KUkORIZdRxmKk4BNFr2F90nRaaqOADeuxwS3qpw3OtNKrg3IhJKWmdreiInemepJIvU6eP/s/qaH9fJAU/jO4HSFAUiGL2hWE5Eau+Gamtbf2QV/NIP04PMdt/X0qVMvV6a2CSqseZdrcGLxPVRNQmMyK7TUc= Received: by 10.78.134.12 with SMTP id h12mr533008hud; Mon, 31 Jul 2006 07:19:07 -0700 (PDT) Received: by 10.78.196.5 with HTTP; Mon, 31 Jul 2006 07:19:07 -0700 (PDT) Message-ID: <74e15baa0607310719l2579972ct45d9966f633f0a79@mail.gmail.com> Date: Mon, 31 Jul 2006 10:19:07 -0400 From: "Aaron Mulder" Sender: ammulder@gmail.com To: dev@geronimo.apache.org Subject: Re: svn commit: r427120 - /geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java In-Reply-To: <20060731140814.D2B071A981A@eris.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060731140814.D2B071A981A@eris.apache.org> X-Google-Sender-Auth: c18320d303c9ea62 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hurray! Thanks, Aaron On 7/31/06, jsisson@apache.org wrote: > Author: jsisson > Date: Mon Jul 31 07:08:13 2006 > New Revision: 427120 > > URL: http://svn.apache.org/viewvc?rev=427120&view=rev > Log: > GERONIMO-1996 Fix cleanup of configurations when Errors occur. Previously an Error such as a java.lang.ExceptionInInitializerError during Serialization during deployment leaves files in the repository and possibly leaves things in a state where you cannot undeploy. > > Modified: > geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java > > Modified: geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java > URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java?rev=427120&r1=427119&r2=427120&view=diff > ============================================================================== > --- geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java (original) > +++ geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java Mon Jul 31 07:08:13 2006 > @@ -301,6 +301,7 @@ > // It's our responsibility to close this context, once we're done with it... > DeploymentContext context = builder.buildConfiguration(inPlace, configID, plan, module, stores, artifactResolver, store); > List configurations = new ArrayList(); > + boolean configsCleanupRequired = false; > configurations.add(context.getConfigurationData()); > configurations.addAll(context.getAdditionalDeployment()); > > @@ -334,23 +335,31 @@ > notifyWatchers(deployedURIs); > return deployedURIs; > } else { > - cleanupConfigurations(configurations); > + configsCleanupRequired = true; > return Collections.EMPTY_LIST; > } > } catch (DeploymentException e) { > - cleanupConfigurations(configurations); > + configsCleanupRequired = true; > throw e; > } catch (IOException e) { > - cleanupConfigurations(configurations); > + configsCleanupRequired = true; > throw e; > } catch (InvalidConfigException e) { > - cleanupConfigurations(configurations); > + configsCleanupRequired = true; > // unlikely as we just built this > throw new DeploymentException(e); > + } catch (Throwable e) { > + // Could get here if serialization of the configuration failed (GERONIMO-1996) > + configsCleanupRequired = true; > + throw e; > } finally { > thread.setContextClassLoader(oldCl); > if (context != null) { > context.close(); > + } > + if (configsCleanupRequired) { > + // We do this after context is closed so the module jar isn't open > + cleanupConfigurations(configurations); > } > } > } catch (Throwable e) { > > >