Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 67187 invoked from network); 18 Apr 2008 00:32:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Apr 2008 00:32:41 -0000 Received: (qmail 11976 invoked by uid 500); 18 Apr 2008 00:32:40 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 11952 invoked by uid 500); 18 Apr 2008 00:32:40 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 11941 invoked by uid 99); 18 Apr 2008 00:32:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Apr 2008 17:32:40 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Apr 2008 00:31:50 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C05D8234C0EB for ; Thu, 17 Apr 2008 17:29:21 -0700 (PDT) Message-ID: <1495029453.1208478561786.JavaMail.jira@brutus> Date: Thu, 17 Apr 2008 17:29:21 -0700 (PDT) From: "nadir amra (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Issue Comment Edited: (AXIS2-3746) File setLastModified() in deployment code causes problems In-Reply-To: <1080457277.1208364442079.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590251#action_12590251 ] nadiramra edited comment on AXIS2-3746 at 4/17/08 5:28 PM: ------------------------------------------------------------ Fixed. Much cleaner and correct now. I will be putting this in the 1.4 release also. The trunk fix is in SVN 649334. The 1.4 branch fix is in SVN 649335. was (Author: nadiramra): Fixed. Much cleaner and correct now. I will be putting this in the 1.4 release also. The trunk fix is in SVN 649334 > File setLastModified() in deployment code causes problems > --------------------------------------------------------- > > Key: AXIS2-3746 > URL: https://issues.apache.org/jira/browse/AXIS2-3746 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: deployment > Reporter: nadir amra > Assignee: nadir amra > Priority: Critical > Fix For: 1.4, nightly > > > I question the usage of the the File class's method setLastModified() in WSInfoList.java: > private void setLastModifiedDate(File file, WSInfo wsInfo) { > if (file.isDirectory()) { > File files [] = file.listFiles(); > for (int i = 0; i < files.length; i++) { > File fileItem = files[i]; > if (fileItem.isDirectory()) { > setLastModifiedDate(fileItem, wsInfo); > } else { > fileItem.setLastModified(wsInfo.getLastModifiedDate()); > } > } > } else { > file.setLastModified(wsInfo.getLastModifiedDate()); > } > } > I do not understand why we are actually modifying the last-modified-date of the file objects? > The main reason is that this causes problems when the user ID that AXIS2 is running under does not have authority to update the files. So the attempt to modify the files will not result on anything be done (we apparently do not check if operation failed), but more importantly, if system auditing is enabled you will see authority-failure auditing records for each attempt to modify the time-stamp for a file. And if hot-update is deployed, this will result in 1000's of these records. > Possible solution: Why do we need to test for equality when looking at time-stamps? We can save the newest last-modified time-stamp, and then when we want to detect if something has changed, we simply see if the saved time-stamp is greater or equal to the file time-stamp. And if this is true, then the file has not changed. Otherwise, the file has changed.....the added benefit is we do not have to update files. > I will be fixing this ASAP and hopefully will be getting this into Axis 1.4. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org