Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 37789 invoked from network); 14 Oct 2004 06:26:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Oct 2004 06:26:11 -0000 Received: (qmail 68465 invoked by uid 500); 14 Oct 2004 06:26:06 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 68438 invoked by uid 500); 14 Oct 2004 06:26:06 -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: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 68425 invoked by uid 99); 14 Oct 2004 06:26:06 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.68.1.20] (HELO relay.pair.com) (209.68.1.20) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 13 Oct 2004 23:26:05 -0700 Received: (qmail 75173 invoked from network); 14 Oct 2004 06:26:02 -0000 Received: from 123.253.adsl.sltnet.lk (HELO deepal) (220.247.253.123) by relay.pair.com with SMTP; 14 Oct 2004 06:26:02 -0000 X-pair-Authenticated: 220.247.253.123 Message-ID: <01ae01c4b1b6$ac536fd0$0965a8c0@deepal> From: "Deepal Jayasinghe" To: Cc: References: <018e01c4b1b6$3438fa10$0965a8c0@deepal> Subject: Re: [Axis2] deepal scratch area patch Date: Thu, 14 Oct 2004 12:25:54 +0600 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_01AA_01C4B1E8.F3532CE0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_01AA_01C4B1E8.F3532CE0 Content-Type: multipart/alternative; boundary="----=_NextPart_001_01AB_01C4B1E8.F3532CE0" ------=_NextPart_001_01AB_01C4B1E8.F3532CE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am sorry=20 Can someone please apply this Deployment patch to the scratch area of = deeply of Axis 2. ----- Original Message -----=20 From: Deepal Jayasinghe=20 To: axis-dev@ws.apache.org=20 Cc: hemapani@opensource.lk=20 Sent: Thursday, October 14, 2004 12:22 PM Subject: [Axis2] deepal scratch area patch Hi all; Can someone please apply this Deployment patch to the scratch area of = deeply of Axis 2. =20 Note : I have modified the codes to support hot unemployment =20 =20 =20 =20 Thank you = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= Deepal Jayasinghe Lanka Software Foundation 0714 817 310 ------=_NextPart_001_01AB_01C4B1E8.F3532CE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I am sorry
 

Can someone please apply = this=20 Deployment patch to the scratch area = of deeply=20 of Axis 2.

 
----- Original Message -----
From:=20 Deepal=20 Jayasinghe
Sent: Thursday, October 14, = 2004 12:22=20 PM
Subject: [Axis2] deepal scratch = area=20 patch

Hi = all;

 

Can someone please apply = this=20 Deployment patch to the scratch = area of=20 deeply of Axis 2.

 

Note : I have modified = the codes=20 to support hot unemployment

 

 

 

 

Thank = you


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
Deepal=20 Jayasinghe
Lanka Software Foundation
0714 817=20 310

------=_NextPart_001_01AB_01C4B1E8.F3532CE0-- ------=_NextPart_000_01AA_01C4B1E8.F3532CE0 Content-Type: application/octet-stream; name="Deployement" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Deployement" Index: = deepal/deployment/src/org/apache/axis/deployement/test/HotDeployementTest= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- = deepal/deployment/src/org/apache/axis/deployement/test/HotDeployementTest= .java (revision 54767) +++ = deepal/deployment/src/org/apache/axis/deployement/test/HotDeployementTest= .java (working copy) @@ -44,7 +44,7 @@ } =20 public static void main(String[] args) { - HotDeployementTest alarmClock =3D new HotDeployementTest(7, 0, = 0); + HotDeployementTest alarmClock =3D new HotDeployementTest(10, 0, = 0); alarmClock.start(); } } Index: = deepal/deployment/src/org/apache/axis/deployement/FileLoder/FilesLoader.j= ava =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- = deepal/deployment/src/org/apache/axis/deployement/FileLoder/FilesLoader.j= ava (revision 54767) +++ = deepal/deployment/src/org/apache/axis/deployement/FileLoder/FilesLoader.j= ava (working copy) @@ -1,6 +1,8 @@ package org.apache.axis.deployement.FileLoder; =20 import org.apache.axis.deployement.FileLoder.utill.UnZipJAR; +import org.apache.axis.deployement.FileLoder.utill.FileList; +import org.apache.axis.deployement.FileLoder.utill.FileItem; =20 import java.util.Vector; import java.util.Date; @@ -28,95 +30,55 @@ */ public class FilesLoader { /** - * This is to store all the jar files in a specified folder = (WEB_INF) + * to store curreently checking jars */ - private static Vector jarlist =3D new Vector(); + private Vector current_jars; =20 - private String foldername=3D"D:/Axis = 2.0/projects/Deployement/test-data/" ; + private FileList fileList; =20 + private String foldername; + + public FilesLoader(String foldername) { + this.foldername =3D foldername; + this.fileList =3D new FileList(); + fileList.init(); + } + public void searchFolder(){ String files[]; - Vector currentjars =3D new Vector(); + current_jars =3D new Vector(); File root =3D new File(foldername); // adding the root folder to the vector - currentjars.addElement(root); + current_jars.addElement(root); =20 - while (currentjars.size() > 0) { // loop until empty - File dir =3D (File)currentjars.elementAt(0); // get first = dir - currentjars.remove(0); // remove it + while (current_jars.size() > 0) { // loop until empty + File dir =3D (File)current_jars.elementAt(0); // get first = dir + current_jars.remove(0); // remove it files =3D dir.list(); // get list of files =20 - for (int i =3D 0; i < files.length; i++) { // iterate + for (int i =3D 0; i < files.length ; i++) { // iterate File f =3D new File(dir, files[i]); if (f.isDirectory()) { // see if it's a = directory - currentjars.insertElementAt(f, 0); + current_jars.insertElementAt(f, 0); } // add dir to start of agenda - else if (! FilesLoader.isFileExist(f.getName())){ - addNewWS(f); + else if (isJarFile(f.getName())){ + FileItem fileItem =3D new = FileItem(f,f.getName(),true); + fileList.addFile(fileItem); } } } + fileList.update(); } =20 - public void init(){ - try{ - jarlist.removeAllElements(); - initDeployedWS(); - } catch(Exception e) { - e.printStackTrace(); - } - } - - - - private static void addNewWS(File file){ - String filename =3D file.getName(); - int size =3D jarlist.size(); - boolean exist =3D false; - - for (int i =3D 0; i < size; i++) { - String s =3D (String) jarlist.elementAt(i); - if(s.equals(filename)){ - exist =3D true; - break; - } - } - - if(! exist){ - jarlist.add(filename) ; - FileWriter writer =3D new FileWriter(); - writer.writeToFile(jarlist); - //todo write a triger - System.out.println("New Web service is deployed "+ = filename); - } - } - - - private void initDeployedWS() { - FileReader fileReader =3D new FileReader(); - Vector fiels =3D fileReader.getDeployedJars(); - int size =3D fiels.size(); - for (int i =3D 0; i < size-1; i++) { - jarlist.add((String)fiels.get(i)); - } - } - - private static boolean isFileExist(String filename) { + private boolean isJarFile(String filename) { // to check whether the file is a jar file if(! filename.endsWith(".jar")){ + return false; + }else return true; - } - int vetsize =3D jarlist.size(); - String file; - for (int i =3D 0; i < vetsize - 1; i++) { - file =3D (String) jarlist.get(i); - if(file.equals(filename)){ - return true; - } - - } - return false; } + + } =20 =20 Index: = deepal/deployment/src/org/apache/axis/deployement/FileLoder/FileWriter.ja= va =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- = deepal/deployment/src/org/apache/axis/deployement/FileLoder/FileWriter.ja= va (revision 54767) +++ = deepal/deployment/src/org/apache/axis/deployement/FileLoder/FileWriter.ja= va (working copy) @@ -1,5 +1,8 @@ package org.apache.axis.deployement.FileLoder; =20 +import org.apache.axis.deployement.FileLoder.utill.FileList; +import org.apache.axis.deployement.FileLoder.utill.FileItem; + import java.util.Vector; import java.io.PrintStream; import java.io.FileOutputStream; @@ -27,7 +30,7 @@ public class FileWriter { =20 private String filename =3D "./resource/Deploye.txt"; - public void writeToFile(Vector invect){ + public void writeToFile(){ { FileOutputStream out; // declare a file output object PrintStream p; // declare a print stream object @@ -36,11 +39,12 @@ // Create a new file output stream out =3D new FileOutputStream(filename); p =3D new PrintStream( out ); + Vector invect =3D FileList.getJarlist(); int size =3D invect.size(); - String tempnaem; + FileItem tempnaem; for (int i =3D 0; i < size; i++) { - tempnaem =3D (String) invect.get(i); - p.println(tempnaem); + tempnaem =3D (FileItem) invect.get(i); + p.println(tempnaem.getFilename()); } p.close(); } Index: = deepal/deployment/src/org/apache/axis/deployement/Scheduler/SchedulerTask= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- = deepal/deployment/src/org/apache/axis/deployement/Scheduler/SchedulerTask= .java (revision 54767) +++ = deepal/deployment/src/org/apache/axis/deployement/Scheduler/SchedulerTask= .java (working copy) @@ -28,7 +28,8 @@ public class SchedulerTask implements Runnable { final Object lock =3D new Object(); =20 - private FilesLoader filesLoader =3D new FilesLoader(); + private String filename =3D "D:/Axis = 2.0/projects/Deployement/test-data/" ; + private FilesLoader filesLoader =3D new FilesLoader(filename); =20 int state =3D VIRGIN; static final int VIRGIN =3D 0; ------=_NextPart_000_01AA_01C4B1E8.F3532CE0--