cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ReplicationTransmitter.java SimpleTcpCluster.java

2004-12-01 Thread pero
pero2004/12/01 01:41:11

  Modified:modules/cluster/src/share/org/apache/catalina/cluster/deploy
FarmWarDeployer.java FileMessageFactory.java
WarWatcher.java
   modules/cluster/src/share/org/apache/catalina/cluster/tcp
ReplicationTransmitter.java SimpleTcpCluster.java
  Log:
  Fix some log.
  Change some names
  
  Revision  ChangesPath
  1.6   +8 -8  
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/deploy/FarmWarDeployer.java
  
  Index: FarmWarDeployer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/deploy/FarmWarDeployer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FarmWarDeployer.java  27 Nov 2004 21:16:14 -  1.5
  +++ FarmWarDeployer.java  1 Dec 2004 09:41:11 -   1.6
  @@ -82,11 +82,11 @@
   private int count = 0;
   
   /**
  - * Frequency of the Form deploydir check. Cluster wide deployment will be
  + * Frequency of the Farm watchDir check. Cluster wide deployment will be
* done once for the specified amount of backgrondProcess calls (ie, the
* lower the amount, the most often the checks will occur).
*/
  -protected int processExpiresFrequency = 2;
  +protected int processDeployFrequency = 2;
   
   /**
* Path where context descriptors should be deployed.
  @@ -562,7 +562,7 @@
*/
   public void backgroundProcess() {
   if (started) {
  -count = (count + 1) % processExpiresFrequency;
  +count = (count + 1) % processDeployFrequency;
   if (count == 0  watchEnabled) {
   watcher.check();
   }
  @@ -666,24 +666,24 @@
   /**
* Return the frequency of watcher checks.
*/
  -public int getProcessExpiresFrequency() {
  +public int getProcessDeployFrequency() {
   
  -return (this.processExpiresFrequency);
  +return (this.processDeployFrequency);
   
   }
   
   /**
* Set the watcher checks frequency.
* 
  - * @param processExpiresFrequency
  + * @param processDeployFrequency
*the new manager checks frequency
*/
  -public void setProcessExpiresFrequency(int processExpiresFrequency) {
  +public void setProcessDeployFrequency(int processExpiresFrequency) {
   
   if (processExpiresFrequency = 0) {
   return;
   }
  -this.processExpiresFrequency = processExpiresFrequency;
  +this.processDeployFrequency = processExpiresFrequency;
   }
   
   /**
  
  
  
  1.3   +180 -124  
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/deploy/FileMessageFactory.java
  
  Index: FileMessageFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/deploy/FileMessageFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileMessageFactory.java   27 Nov 2004 21:10:20 -  1.2
  +++ FileMessageFactory.java   1 Dec 2004 09:41:11 -   1.3
  @@ -15,19 +15,24 @@
*/
   
   package org.apache.catalina.cluster.deploy;
  +
   import java.io.File;
   import java.io.IOException;
   import java.io.FileInputStream;
   import java.io.FileOutputStream;
   import java.io.FileNotFoundException;
  +
   /**
  - * This factory is used to read files and write files by splitting them up 
into smaller
  - * messages. So that entire files don't have to be read into memory.BR
  + * This factory is used to read files and write files by splitting them up 
into
  + * smaller messages. So that entire files don't have to be read into memory.
  + * BR
* The factory can be used as a reader or writer but not both at the same 
time.
  - * When done reading or writing the factory will close the input or output 
streams
  - * and mark the factory as closed. It is not possible to use it after 
that.BR
  - * To force a cleanup, call cleanup() from the calling object.BR
  - * This class is not thread safe. 
  + * When done reading or writing the factory will close the input or output
  + * streams and mark the factory as closed. It is not possible to use it after
  + * that. BR
  + * To force a cleanup, call cleanup() from the calling object. BR
  + * This class is not thread safe.
  + * 
* @author Filip Hanik
* @version 1.0
*/
  @@ -35,122 +40,138 @@
   /*--Static Variables*/
   public static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory
   .getLog(FileMessageFactory.class);
  -   
  +
   /**
* The number of 

cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ReplicationTransmitter.java SimpleTcpCluster.java

2003-03-26 Thread fhanik
fhanik  2003/03/26 09:40:02

  Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp
ReplicationTransmitter.java SimpleTcpCluster.java
  Log:
  fixed concurrent modification exceptions
  
  Revision  ChangesPath
  1.3   +9 -11 
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitter.java
  
  Index: ReplicationTransmitter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReplicationTransmitter.java   20 Mar 2003 20:46:14 -  1.2
  +++ ReplicationTransmitter.java   26 Mar 2003 17:40:02 -  1.3
  @@ -108,10 +108,10 @@
   
   public synchronized void stop()
   {
  -java.util.Iterator i = map.keySet().iterator();
  +java.util.Iterator i = map.entrySet().iterator();
   while ( i.hasNext() )
   {
  -IDataSender sender = (IDataSender)map.get(i.next());
  +IDataSender sender = 
(IDataSender)((java.util.HashMap.Entry)i.next()).getValue();
   if ( sender.isConnected() )
   {
   try { sender.disconnect(); } catch ( Exception x ){}
  @@ -121,12 +121,11 @@
   
   public synchronized IDataSender[] getSenders()
   {
  -java.util.Iterator i = map.keySet().iterator();
  +java.util.Iterator i = map.entrySet().iterator();
   java.util.Vector v = new java.util.Vector();
   while ( i.hasNext() )
   {
  -String key = (String)i.next();
  -IDataSender sender = (IDataSender)map.get(key);
  +IDataSender sender = 
(IDataSender)((java.util.HashMap.Entry)i.next()).getValue();
   if ( sender!=null) v.addElement(sender);
   }
   IDataSender[] result = new IDataSender[v.size()];
  @@ -145,13 +144,12 @@
   
   public void sendMessage(byte[] indata) throws java.io.IOException
   {
  -java.util.Iterator i = map.keySet().iterator();
  +java.util.Iterator i = map.entrySet().iterator();
   java.util.Vector v = new java.util.Vector();
   byte[] data = XByteBuffer.createDataPackage(indata);
   while ( i.hasNext() )
   {
  -String key = (String)i.next();
  -IDataSender sender = (IDataSender)map.get(key);
  +IDataSender sender = 
(IDataSender)((java.util.HashMap.Entry)i.next()).getValue();
   try
   {
   if (!sender.isConnected())
  
  
  
  1.9   +8 -8  
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
  
  Index: SimpleTcpCluster.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SimpleTcpCluster.java 20 Mar 2003 20:46:14 -  1.8
  +++ SimpleTcpCluster.java 26 Mar 2003 17:40:02 -  1.9
  @@ -726,7 +726,7 @@
*  during installation
*/
   public void installContext(String contextPath, URL war) {
  -return;
  +System.out.println(\n\n\n\nCluster Install called for 
context:+contextPath+\n\n\n\n);
   }
   
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]