Return-Path: X-Original-To: apmail-geronimo-dev-archive@www.apache.org Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DDA769A07 for ; Sun, 1 Apr 2012 01:29:41 +0000 (UTC) Received: (qmail 96196 invoked by uid 500); 1 Apr 2012 01:29:41 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 96153 invoked by uid 500); 1 Apr 2012 01:29:41 -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 96145 invoked by uid 99); 1 Apr 2012 01:29:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Apr 2012 01:29:41 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of xhhsld@gmail.com designates 74.125.82.50 as permitted sender) Received: from [74.125.82.50] (HELO mail-wg0-f50.google.com) (74.125.82.50) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Apr 2012 01:29:35 +0000 Received: by wgbds12 with SMTP id ds12so1577226wgb.31 for ; Sat, 31 Mar 2012 18:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=AvAQv9juUWD911d2eyJtJLsDu79ExGtjrtIncWmMESU=; b=CJV3i7KV7XDl19UC+w30InDCzwQGHpthq/151ivv+dgcGk/sJEyiOzKMTtsBxMDqVW K7aFw8fO7sGJVIFqrvOaq5if0UWZu1+zz4DKwq/01a2FV2rDxD9hYTgrAHMKNTzdN0/9 kw+aJKenNVIKyOcjmVF6WsghqrA6hgEAV4NgGCL0YU6yGr7srcIYO8k2HBKSpYIrytET jtbO2vtmUJishJqS1fo3mQjlfEpCW3PCB3dVlZWAGaoBxIwhAi9FOSL0ZlMcA4WBsjgH qR/ntk6S9EGB5B29pYBpFlnX5S3JBzqiCymlAxisoUHmxXKZf0m2SZJoiyVTgsBwzPcE NZEw== MIME-Version: 1.0 Received: by 10.180.85.70 with SMTP id f6mr11548935wiz.5.1333243753805; Sat, 31 Mar 2012 18:29:13 -0700 (PDT) Received: by 10.216.12.208 with HTTP; Sat, 31 Mar 2012 18:29:13 -0700 (PDT) Date: Sun, 1 Apr 2012 09:29:13 +0800 Message-ID: Subject: Reduce the file copying in the application deployment From: Ivan To: dev@geronimo.apache.org Content-Type: multipart/alternative; boundary=f46d041825585835a604bc94002d X-Virus-Checked: Checked by ClamAV on apache.org --f46d041825585835a604bc94002d Content-Type: text/plain; charset=ISO-8859-1 Hi, while deploying one common application in the Geronimo server, now we copy the files for three times, a. Copy the deployed application file to a temp directory, there are some comments in the Deployer.java file : // todo jar url handling with Sun's VM on Windows leaves a lock on the module file preventing rebuilds // to address this we use a gross hack and copy the file to a temporary directory // the lock on the file will prevent that being deleted properly until the URLJarFile has // been GC'ed. b. Extract the application file to a temp directory c. Copy the extracted application files to the corresponding repository directory. I am thinking that we may only do one time copying action, which is to extract the application file to the repository directory directly. For #a, after checking the svn log, it is added long long ago, I am not sure whether we still have this issue, in my environment, it looks to me that the file is not locked, may be this only occurs in some special scenarios. For #b, since we also keep the application extracted in the repository directory, think that it is possible to skip that. My idea is to introduce a 'fast.deploy' system property, and it is enabled by default, with this property configured, the deployer will skip the step #a and #b. Thoughts ? -- Ivan --f46d041825585835a604bc94002d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, while deploying one common application in the Geronimo server, now we c= opy the files for three times,=A0
a. Copy the deployed application file= to a temp directory, there are some comments in the Deployer.java file :

=A0// todo jar url handling with Sun's VM on W= indows leaves a lock on the module file preventing rebuilds
=A0 = =A0 =A0 =A0 =A0 =A0 // to address this we use a gross hack and copy the fil= e to a temporary directory
=A0 =A0 =A0 =A0 =A0 =A0 // the lock on the file will prevent that bein= g deleted properly until the URLJarFile has
=A0 =A0 =A0 =A0 =A0 = =A0 // been GC'ed.

b. Extract the applic= ation file to a temp directory
c. Copy the extracted application files to the corresponding repositor= y directory.

I am thinking that we may only do one= time copying action, which is to extract the application file to the repos= itory directory directly.
For #a, after checking the svn log, it is added long long ago, I am no= t sure whether we still have this issue, in my environment, it looks to me = that the file is not locked, may be this only occurs in some special scenar= ios.
For #b, since we also keep the application extracted in the repository= directory, think that it is possible to skip that.

My idea is to introduce a 'fast.deploy' system property, and it i= s enabled by default, with this property configured, the deployer will skip= the step #a and #b. Thoughts ?
--
Ivan
--f46d041825585835a604bc94002d--