cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast McastServiceImpl.java
fhanik 2005/02/10 12:44:37 Modified:modules/cluster/src/share/org/apache/catalina/cluster/mcast McastServiceImpl.java Log: make sure that we don't suck up CPU in case of multicast error Revision ChangesPath 1.14 +5 -3 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java Index: McastServiceImpl.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- McastServiceImpl.java 11 Nov 2004 14:47:27 - 1.13 +++ McastServiceImpl.java 10 Feb 2005 20:44:37 - 1.14 @@ -243,7 +243,9 @@ try { receive(); } catch ( Exception x ) { -log.warn(Error receiving mcast package.,x); +log.warn(Error receiving mcast package. Sleeping 500ms,x); +try { Thread.sleep(500); } catch ( Exception ignore ){} + } } } @@ -260,10 +262,10 @@ while ( doRun ) { try { send(); -Thread.sleep(time); } catch ( Exception x ) { log.warn(Unable to send mcast message.,x); } +try { Thread.sleep(time); } catch ( Exception ignore ) {} } } }//class SenderThread - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast McastServiceImpl.java
fhanik 2004/04/30 08:28:02 Modified:modules/cluster/src/share/org/apache/catalina/cluster/mcast McastServiceImpl.java Log: Setting the interface on the multicast service if there is a bind address Revision ChangesPath 1.10 +6 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java Index: McastServiceImpl.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- McastServiceImpl.java 27 Feb 2004 14:58:56 - 1.9 +++ McastServiceImpl.java 30 Apr 2004 15:28:02 - 1.10 @@ -117,6 +117,11 @@ throws IOException { if ( bind != null) socket = new MulticastSocket(new java.net.InetSocketAddress(bind,port)); else socket = new MulticastSocket(port); +if ( bind != null ) { +log.info(Setting multihome multicast interface to:+bind); +socket.setInterface(bind); +log.info(Done setting interface for multicast.); +}//end if this.member = member; address = mcastAddress; this.port = port; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast McastServiceImpl.java
fhanik 2004/02/22 22:58:28 Modified:modules/cluster/src/share/org/apache/catalina/cluster/mcast McastServiceImpl.java Log: reenabled the doRun flag Revision ChangesPath 1.8 +7 -6 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java Index: McastServiceImpl.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- McastServiceImpl.java 23 Feb 2004 06:36:13 - 1.7 +++ McastServiceImpl.java 23 Feb 2004 06:58:28 - 1.8 @@ -186,9 +186,10 @@ * @throws IllegalStateException if the service is already started */ public synchronized void start(int level) throws IOException { -if ( doRun ) throw new IllegalStateException(Service already running.); +if ( sender != null receiver != null ) throw new IllegalStateException(Service already running.); if ( level == 1 ) { socket.joinGroup(address); +doRun = true; receiver = new ReceiverThread(); receiver.setDaemon(true); receiver.start(); @@ -198,7 +199,7 @@ sender = new SenderThread(sendFrequency); sender.setDaemon(true); sender.start(); -doRun = true; + } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]