From: rjung Date: Sun, 27 Jan 2008 12:01:49 +0000 (+0000) Subject: Correct subversion properties of some items: X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c09c5bc140b27d426fab4a78774f73d17fc86741;p=tomcat7.0 Correct subversion properties of some items: - remove executable from *.java, *.dtd, *.xsd and *.jsp Some of those had executable set. - add executable to *.bar and *.exe Some of those had executable not set. - set eol-style to native for *.java and *.xml Some of those had no eol-style set - set mime-type to image/x-icon for *.ico One file had no eol-style set - add mime-type application/rtf to an rtf file - switch mime-type to application/java-archive for *.jar - set mime-type to application/xml-dtd for *.dtd - correct mime-type to image/jpeg for two *.jpg files git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@615583 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/bin/catalina.bat b/bin/catalina.bat old mode 100644 new mode 100755 diff --git a/java/javax/servlet/jsp/resources/jsp_2_0.xsd b/java/javax/servlet/jsp/resources/jsp_2_0.xsd old mode 100755 new mode 100644 diff --git a/java/javax/servlet/jsp/resources/jspxml.dtd b/java/javax/servlet/jsp/resources/jspxml.dtd old mode 100755 new mode 100644 diff --git a/java/javax/servlet/jsp/resources/jspxml.xsd b/java/javax/servlet/jsp/resources/jspxml.xsd old mode 100755 new mode 100644 diff --git a/java/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd b/java/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd old mode 100755 new mode 100644 diff --git a/java/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd b/java/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd old mode 100755 new mode 100644 diff --git a/java/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd b/java/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd old mode 100755 new mode 100644 diff --git a/java/org/apache/catalina/core/StandardThreadExecutor.java b/java/org/apache/catalina/core/StandardThreadExecutor.java index d8b62ff9f..49f06c270 100644 --- a/java/org/apache/catalina/core/StandardThreadExecutor.java +++ b/java/org/apache/catalina/core/StandardThreadExecutor.java @@ -1,257 +1,257 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.catalina.core; - -import java.util.Collection; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; - -import org.apache.catalina.Executor; -import org.apache.catalina.LifecycleException; -import org.apache.catalina.LifecycleListener; -import org.apache.catalina.util.LifecycleSupport; -import java.util.concurrent.RejectedExecutionException; - -public class StandardThreadExecutor implements Executor { - - // ---------------------------------------------- Properties - protected int threadPriority = Thread.NORM_PRIORITY; - - protected boolean daemon = true; - - protected String namePrefix = "tomcat-exec-"; - - protected int maxThreads = 200; - - protected int minSpareThreads = 25; - - protected int maxIdleTime = 60000; - - protected ThreadPoolExecutor executor = null; - - protected String name; - - private LifecycleSupport lifecycle = new LifecycleSupport(this); - // ---------------------------------------------- Constructors - public StandardThreadExecutor() { - //empty constructor for the digester - } - - - - // ---------------------------------------------- Public Methods - public void start() throws LifecycleException { - lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, null); - TaskQueue taskqueue = new TaskQueue(); - TaskThreadFactory tf = new TaskThreadFactory(namePrefix); - lifecycle.fireLifecycleEvent(START_EVENT, null); - executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf); - taskqueue.setParent( (ThreadPoolExecutor) executor); - lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null); - } - - public void stop() throws LifecycleException{ - lifecycle.fireLifecycleEvent(BEFORE_STOP_EVENT, null); - lifecycle.fireLifecycleEvent(STOP_EVENT, null); - if ( executor != null ) executor.shutdown(); - executor = null; - lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null); - } - - public void execute(Runnable command) { - if ( executor != null ) { - try { - executor.execute(command); - } catch (RejectedExecutionException rx) { - //there could have been contention around the queue - if ( !( (TaskQueue) executor.getQueue()).force(command) ) throw new RejectedExecutionException(); - } - } else throw new IllegalStateException("StandardThreadPool not started."); - } - - public int getThreadPriority() { - return threadPriority; - } - - public boolean isDaemon() { - - return daemon; - } - - public String getNamePrefix() { - return namePrefix; - } - - public int getMaxIdleTime() { - return maxIdleTime; - } - - public int getMaxThreads() { - return maxThreads; - } - - public int getMinSpareThreads() { - return minSpareThreads; - } - - public String getName() { - return name; - } - - public void setThreadPriority(int threadPriority) { - this.threadPriority = threadPriority; - } - - public void setDaemon(boolean daemon) { - this.daemon = daemon; - } - - public void setNamePrefix(String namePrefix) { - this.namePrefix = namePrefix; - } - - public void setMaxIdleTime(int maxIdleTime) { - this.maxIdleTime = maxIdleTime; - } - - public void setMaxThreads(int maxThreads) { - this.maxThreads = maxThreads; - } - - public void setMinSpareThreads(int minSpareThreads) { - this.minSpareThreads = minSpareThreads; - } - - public void setName(String name) { - this.name = name; - } - - /** - * Add a LifecycleEvent listener to this component. - * - * @param listener The listener to add - */ - public void addLifecycleListener(LifecycleListener listener) { - lifecycle.addLifecycleListener(listener); - } - - - /** - * Get the lifecycle listeners associated with this lifecycle. If this - * Lifecycle has no listeners registered, a zero-length array is returned. - */ - public LifecycleListener[] findLifecycleListeners() { - return lifecycle.findLifecycleListeners(); - } - - - /** - * Remove a LifecycleEvent listener from this component. - * - * @param listener The listener to remove - */ - public void removeLifecycleListener(LifecycleListener listener) { - lifecycle.removeLifecycleListener(listener); - } - - // Statistics from the thread pool - public int getActiveCount() { - return (executor != null) ? executor.getActiveCount() : 0; - } - - public long getCompletedTaskCount() { - return (executor != null) ? executor.getCompletedTaskCount() : 0; - } - - public int getCorePoolSize() { - return (executor != null) ? executor.getCorePoolSize() : 0; - } - - public int getLargestPoolSize() { - return (executor != null) ? executor.getLargestPoolSize() : 0; - } - - public int getPoolSize() { - return (executor != null) ? executor.getPoolSize() : 0; - } - - // ---------------------------------------------- TaskQueue Inner Class - class TaskQueue extends LinkedBlockingQueue { - ThreadPoolExecutor parent = null; - - public TaskQueue() { - super(); - } - - public TaskQueue(int initialCapacity) { - super(initialCapacity); - } - - public TaskQueue(Collection c) { - super(c); - } - - public void setParent(ThreadPoolExecutor tp) { - parent = tp; - } - - public boolean force(Runnable o) { - if ( parent.isShutdown() ) throw new RejectedExecutionException("Executor not running, can't force a command into the queue"); - return super.offer(o); //forces the item onto the queue, to be used if the task is rejected - } - - public boolean offer(Runnable o) { - //we can't do any checks - if (parent==null) return super.offer(o); - //we are maxed out on threads, simply queue the object - if (parent.getPoolSize() == parent.getMaximumPoolSize()) return super.offer(o); - //we have idle threads, just add it to the queue - //this is an approximation, so it could use some tuning - if (parent.getActiveCount()<(parent.getPoolSize())) return super.offer(o); - //if we have less threads than maximum force creation of a new thread - if (parent.getPoolSize() { + ThreadPoolExecutor parent = null; + + public TaskQueue() { + super(); + } + + public TaskQueue(int initialCapacity) { + super(initialCapacity); + } + + public TaskQueue(Collection c) { + super(c); + } + + public void setParent(ThreadPoolExecutor tp) { + parent = tp; + } + + public boolean force(Runnable o) { + if ( parent.isShutdown() ) throw new RejectedExecutionException("Executor not running, can't force a command into the queue"); + return super.offer(o); //forces the item onto the queue, to be used if the task is rejected + } + + public boolean offer(Runnable o) { + //we can't do any checks + if (parent==null) return super.offer(o); + //we are maxed out on threads, simply queue the object + if (parent.getPoolSize() == parent.getMaximumPoolSize()) return super.offer(o); + //we have idle threads, just add it to the queue + //this is an approximation, so it could use some tuning + if (parent.getActiveCount()<(parent.getPoolSize())) return super.offer(o); + //if we have less threads than maximum force creation of a new thread + if (parent.getPoolSize() - - - - + + + + + diff --git a/java/org/apache/catalina/ha/jmx/ClusterJmxHelper.java b/java/org/apache/catalina/ha/jmx/ClusterJmxHelper.java index 25dc05148..9995d5abf 100644 --- a/java/org/apache/catalina/ha/jmx/ClusterJmxHelper.java +++ b/java/org/apache/catalina/ha/jmx/ClusterJmxHelper.java @@ -1,134 +1,134 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.catalina.ha.jmx; - -import javax.management.DynamicMBean; -import javax.management.MBeanServer; -import javax.management.MBeanServerFactory; -import javax.management.ObjectName; - -import org.apache.catalina.core.StandardEngine; -import org.apache.catalina.core.StandardHost; -import org.apache.catalina.ha.authenticator.ClusterSingleSignOn; -import org.apache.catalina.ha.deploy.FarmWarDeployer; -import org.apache.catalina.ha.session.DeltaManager; -import org.apache.catalina.ha.tcp.SimpleTcpCluster; -import org.apache.juli.logging.Log; -import org.apache.juli.logging.LogFactory; -import org.apache.tomcat.util.modeler.ManagedBean; -import org.apache.tomcat.util.modeler.Registry; -/** - * - * @author Filip Hanik - */ -public class ClusterJmxHelper { - - protected static Registry registry = Registry.getRegistry(null,null); - - protected static Log log = LogFactory.getLog(ClusterJmxHelper.class); - - protected static boolean jmxEnabled = true; - - protected static MBeanServer mbeanServer = null; - - public static Registry getRegistry() { - return registry; - } - - public static MBeanServer getMBeanServer() throws Exception { - if (mbeanServer == null) { - if (MBeanServerFactory.findMBeanServer(null).size() > 0) { - mbeanServer = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0); - } else { - mbeanServer = MBeanServerFactory.createMBeanServer(); - } - } - return mbeanServer; - } - - protected static boolean initMetaData(Class clazz) { - try { - if (clazz==null) return false; - getRegistry().loadMetadata(clazz.getResourceAsStream("mbeans-descriptors.xml")); - }catch (Exception x) { - log.warn("Unable to load meta data for class:"+clazz.getName()); - return false; - } - return true; - } - - public static DynamicMBean getManagedBean(Object object) throws Exception { - DynamicMBean mbean = null; - if (getRegistry() != null) { - ManagedBean managedBean = registry.findManagedBean(object.getClass().getName()); - mbean = managedBean.createMBean(object); - } - return mbean; - } - - - protected static void initDefaultCluster() { - initMetaData(SimpleTcpCluster.class); - initMetaData(DeltaManager.class); - initMetaData(FarmWarDeployer.class); //not functional yet - initMetaData(ClusterSingleSignOn.class); //not functional yet - } - - public static boolean registerDefaultCluster(SimpleTcpCluster cluster) { - try { - initDefaultCluster(); - ObjectName clusterName = getDefaultClusterName(cluster); - if (!getMBeanServer().isRegistered(clusterName)) { - getMBeanServer().registerMBean(getManagedBean(cluster), clusterName); - } - return true; - }catch ( Exception x ) { - log.warn("Unable to register default cluster implementation with JMX",x); - return false; - } - } - - public static boolean unregisterDefaultCluster(SimpleTcpCluster cluster) { - try { - ObjectName clusterName = getDefaultClusterName(cluster); - if (getMBeanServer().isRegistered(clusterName)) { - getMBeanServer().unregisterMBean(clusterName); - } - return true; - }catch ( Exception x ) { - log.warn("Unable to unregister default cluster implementation with JMX",x); - return false; - } - } - - private static ObjectName getDefaultClusterName(SimpleTcpCluster cluster) throws Exception { - String domain = getMBeanServer().getDefaultDomain(); - String type = ":type="; - String clusterType= type+"Cluster"; - if (cluster.getContainer() instanceof StandardHost) { - domain = ((StandardHost) cluster.getContainer()).getDomain(); - clusterType += ",host=" + cluster.getContainer().getName(); - } else { - if (cluster.getContainer() instanceof StandardEngine) { - domain = ((StandardEngine) cluster.getContainer()).getDomain(); - } - } - ObjectName clusterName = new ObjectName(domain + clusterType); - return clusterName; - } - +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.catalina.ha.jmx; + +import javax.management.DynamicMBean; +import javax.management.MBeanServer; +import javax.management.MBeanServerFactory; +import javax.management.ObjectName; + +import org.apache.catalina.core.StandardEngine; +import org.apache.catalina.core.StandardHost; +import org.apache.catalina.ha.authenticator.ClusterSingleSignOn; +import org.apache.catalina.ha.deploy.FarmWarDeployer; +import org.apache.catalina.ha.session.DeltaManager; +import org.apache.catalina.ha.tcp.SimpleTcpCluster; +import org.apache.juli.logging.Log; +import org.apache.juli.logging.LogFactory; +import org.apache.tomcat.util.modeler.ManagedBean; +import org.apache.tomcat.util.modeler.Registry; +/** + * + * @author Filip Hanik + */ +public class ClusterJmxHelper { + + protected static Registry registry = Registry.getRegistry(null,null); + + protected static Log log = LogFactory.getLog(ClusterJmxHelper.class); + + protected static boolean jmxEnabled = true; + + protected static MBeanServer mbeanServer = null; + + public static Registry getRegistry() { + return registry; + } + + public static MBeanServer getMBeanServer() throws Exception { + if (mbeanServer == null) { + if (MBeanServerFactory.findMBeanServer(null).size() > 0) { + mbeanServer = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0); + } else { + mbeanServer = MBeanServerFactory.createMBeanServer(); + } + } + return mbeanServer; + } + + protected static boolean initMetaData(Class clazz) { + try { + if (clazz==null) return false; + getRegistry().loadMetadata(clazz.getResourceAsStream("mbeans-descriptors.xml")); + }catch (Exception x) { + log.warn("Unable to load meta data for class:"+clazz.getName()); + return false; + } + return true; + } + + public static DynamicMBean getManagedBean(Object object) throws Exception { + DynamicMBean mbean = null; + if (getRegistry() != null) { + ManagedBean managedBean = registry.findManagedBean(object.getClass().getName()); + mbean = managedBean.createMBean(object); + } + return mbean; + } + + + protected static void initDefaultCluster() { + initMetaData(SimpleTcpCluster.class); + initMetaData(DeltaManager.class); + initMetaData(FarmWarDeployer.class); //not functional yet + initMetaData(ClusterSingleSignOn.class); //not functional yet + } + + public static boolean registerDefaultCluster(SimpleTcpCluster cluster) { + try { + initDefaultCluster(); + ObjectName clusterName = getDefaultClusterName(cluster); + if (!getMBeanServer().isRegistered(clusterName)) { + getMBeanServer().registerMBean(getManagedBean(cluster), clusterName); + } + return true; + }catch ( Exception x ) { + log.warn("Unable to register default cluster implementation with JMX",x); + return false; + } + } + + public static boolean unregisterDefaultCluster(SimpleTcpCluster cluster) { + try { + ObjectName clusterName = getDefaultClusterName(cluster); + if (getMBeanServer().isRegistered(clusterName)) { + getMBeanServer().unregisterMBean(clusterName); + } + return true; + }catch ( Exception x ) { + log.warn("Unable to unregister default cluster implementation with JMX",x); + return false; + } + } + + private static ObjectName getDefaultClusterName(SimpleTcpCluster cluster) throws Exception { + String domain = getMBeanServer().getDefaultDomain(); + String type = ":type="; + String clusterType= type+"Cluster"; + if (cluster.getContainer() instanceof StandardHost) { + domain = ((StandardHost) cluster.getContainer()).getDomain(); + clusterType += ",host=" + cluster.getContainer().getName(); + } else { + if (cluster.getContainer() instanceof StandardEngine) { + domain = ((StandardEngine) cluster.getContainer()).getDomain(); + } + } + ObjectName clusterName = new ObjectName(domain + clusterType); + return clusterName; + } + } \ No newline at end of file diff --git a/java/org/apache/catalina/loader/VirtualWebappLoader.java b/java/org/apache/catalina/loader/VirtualWebappLoader.java old mode 100755 new mode 100644 diff --git a/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java b/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java index 73ba07ed8..69491eaa4 100644 --- a/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java +++ b/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java @@ -1,179 +1,179 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.catalina.tribes.group.interceptors; - -import java.lang.ref.WeakReference; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicInteger; - -import org.apache.catalina.tribes.ChannelException; -import org.apache.catalina.tribes.ChannelInterceptor; -import org.apache.catalina.tribes.ChannelMessage; -import org.apache.catalina.tribes.Member; -import org.apache.catalina.tribes.group.ChannelInterceptorBase; -import org.apache.catalina.tribes.io.ChannelData; - -/** - * - * Sends a ping to all members. - * Configure this interceptor with the TcpFailureDetector below it, - * and the TcpFailureDetector will act as the membership guide. - * @author Filip Hanik - * @version 1.0 - */ - -public class TcpPingInterceptor extends ChannelInterceptorBase { - - protected static org.apache.juli.logging.Log log = - org.apache.juli.logging.LogFactory.getLog(TcpPingInterceptor.class); - - protected static byte[] TCP_PING_DATA = new byte[] { - 79, -89, 115, 72, 121, -33, 67, -55, -97, 111, -119, -128, -95, 91, 7, 20, - 125, -39, 82, 91, -21, -33, 67, -102, -73, 126, -66, -113, -127, 103, 30, -74, - 55, 21, -66, -121, 69, 33, 76, -88, -65, 10, 77, 19, 83, 56, 21, 50, - 85, -10, -108, -73, 58, -33, 33, 120, -111, 4, 125, -41, 114, -124, -64, -43}; - - protected long interval = 1000; //1 second - - protected boolean useThread = false; - protected boolean staticOnly = false; - protected boolean running = true; - protected PingThread thread = null; - protected static AtomicInteger cnt = new AtomicInteger(0); - - WeakReference failureDetector = null; - WeakReference staticMembers = null; - - public synchronized void start(int svc) throws ChannelException { - super.start(svc); - running = true; - if ( thread == null ) { - thread = new PingThread(); - thread.setDaemon(true); - thread.setName("TcpPingInterceptor.PingThread-"+cnt.addAndGet(1)); - thread.start(); - } - - //acquire the interceptors to invoke on send ping events - ChannelInterceptor next = getNext(); - while ( next != null ) { - if ( next instanceof TcpFailureDetector ) - failureDetector = new WeakReference((TcpFailureDetector)next); - if ( next instanceof StaticMembershipInterceptor ) - staticMembers = new WeakReference((StaticMembershipInterceptor)next); - next = next.getNext(); - } - - } - - public void stop(int svc) throws ChannelException { - running = false; - if ( thread != null ) thread.interrupt(); - thread = null; - super.stop(svc); - } - - public void heartbeat() { - super.heartbeat(); - if (!getUseThread()) sendPing(); - } - - public long getInterval() { - return interval; - } - - public void setInterval(long interval) { - this.interval = interval; - } - - public void setUseThread(boolean useThread) { - this.useThread = useThread; - } - - public void setStaticOnly(boolean staticOnly) { - this.staticOnly = staticOnly; - } - - public boolean getUseThread() { - return useThread; - } - - public boolean getStaticOnly() { - return staticOnly; - } - - protected void sendPing() { - if (failureDetector.get()!=null) { - //we have a reference to the failure detector - //piggy back on that dude - failureDetector.get().checkMembers(true); - }else { - if (staticOnly && staticMembers.get()!=null) { - sendPingMessage(staticMembers.get().getMembers()); - } else { - sendPingMessage(getMembers()); - } - } - } - - protected void sendPingMessage(Member[] members) { - if ( members == null || members.length == 0 ) return; - ChannelData data = new ChannelData(true);//generates a unique Id - data.setAddress(getLocalMember(false)); - data.setTimestamp(System.currentTimeMillis()); - data.setOptions(getOptionFlag()); - try { - super.sendMessage(members, data, null); - }catch (ChannelException x) { - log.warn("Unable to send TCP ping.",x); - } - } - - public void messageReceived(ChannelMessage msg) { - //catch incoming - boolean process = true; - if ( okToProcess(msg.getOptions()) ) { - //check to see if it is a ping message, if so, process = false - process = ( (msg.getMessage().getLength() != TCP_PING_DATA.length) || - (!Arrays.equals(TCP_PING_DATA,msg.getMessage().getBytes()) ) ); - }//end if - - //ignore the message, it doesnt have the flag set - if ( process ) super.messageReceived(msg); - else if ( log.isDebugEnabled() ) log.debug("Received a TCP ping packet:"+msg); - }//messageReceived - - protected class PingThread extends Thread { - public void run() { - while (running) { - try { - sleep(interval); - sendPing(); - }catch ( InterruptedException ix ) { - interrupted(); - }catch ( Exception x ) { - log.warn("Unable to send ping from TCP ping thread.",x); - } - } - } - } - - - - -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.catalina.tribes.group.interceptors; + +import java.lang.ref.WeakReference; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.catalina.tribes.ChannelException; +import org.apache.catalina.tribes.ChannelInterceptor; +import org.apache.catalina.tribes.ChannelMessage; +import org.apache.catalina.tribes.Member; +import org.apache.catalina.tribes.group.ChannelInterceptorBase; +import org.apache.catalina.tribes.io.ChannelData; + +/** + * + * Sends a ping to all members. + * Configure this interceptor with the TcpFailureDetector below it, + * and the TcpFailureDetector will act as the membership guide. + * @author Filip Hanik + * @version 1.0 + */ + +public class TcpPingInterceptor extends ChannelInterceptorBase { + + protected static org.apache.juli.logging.Log log = + org.apache.juli.logging.LogFactory.getLog(TcpPingInterceptor.class); + + protected static byte[] TCP_PING_DATA = new byte[] { + 79, -89, 115, 72, 121, -33, 67, -55, -97, 111, -119, -128, -95, 91, 7, 20, + 125, -39, 82, 91, -21, -33, 67, -102, -73, 126, -66, -113, -127, 103, 30, -74, + 55, 21, -66, -121, 69, 33, 76, -88, -65, 10, 77, 19, 83, 56, 21, 50, + 85, -10, -108, -73, 58, -33, 33, 120, -111, 4, 125, -41, 114, -124, -64, -43}; + + protected long interval = 1000; //1 second + + protected boolean useThread = false; + protected boolean staticOnly = false; + protected boolean running = true; + protected PingThread thread = null; + protected static AtomicInteger cnt = new AtomicInteger(0); + + WeakReference failureDetector = null; + WeakReference staticMembers = null; + + public synchronized void start(int svc) throws ChannelException { + super.start(svc); + running = true; + if ( thread == null ) { + thread = new PingThread(); + thread.setDaemon(true); + thread.setName("TcpPingInterceptor.PingThread-"+cnt.addAndGet(1)); + thread.start(); + } + + //acquire the interceptors to invoke on send ping events + ChannelInterceptor next = getNext(); + while ( next != null ) { + if ( next instanceof TcpFailureDetector ) + failureDetector = new WeakReference((TcpFailureDetector)next); + if ( next instanceof StaticMembershipInterceptor ) + staticMembers = new WeakReference((StaticMembershipInterceptor)next); + next = next.getNext(); + } + + } + + public void stop(int svc) throws ChannelException { + running = false; + if ( thread != null ) thread.interrupt(); + thread = null; + super.stop(svc); + } + + public void heartbeat() { + super.heartbeat(); + if (!getUseThread()) sendPing(); + } + + public long getInterval() { + return interval; + } + + public void setInterval(long interval) { + this.interval = interval; + } + + public void setUseThread(boolean useThread) { + this.useThread = useThread; + } + + public void setStaticOnly(boolean staticOnly) { + this.staticOnly = staticOnly; + } + + public boolean getUseThread() { + return useThread; + } + + public boolean getStaticOnly() { + return staticOnly; + } + + protected void sendPing() { + if (failureDetector.get()!=null) { + //we have a reference to the failure detector + //piggy back on that dude + failureDetector.get().checkMembers(true); + }else { + if (staticOnly && staticMembers.get()!=null) { + sendPingMessage(staticMembers.get().getMembers()); + } else { + sendPingMessage(getMembers()); + } + } + } + + protected void sendPingMessage(Member[] members) { + if ( members == null || members.length == 0 ) return; + ChannelData data = new ChannelData(true);//generates a unique Id + data.setAddress(getLocalMember(false)); + data.setTimestamp(System.currentTimeMillis()); + data.setOptions(getOptionFlag()); + try { + super.sendMessage(members, data, null); + }catch (ChannelException x) { + log.warn("Unable to send TCP ping.",x); + } + } + + public void messageReceived(ChannelMessage msg) { + //catch incoming + boolean process = true; + if ( okToProcess(msg.getOptions()) ) { + //check to see if it is a ping message, if so, process = false + process = ( (msg.getMessage().getLength() != TCP_PING_DATA.length) || + (!Arrays.equals(TCP_PING_DATA,msg.getMessage().getBytes()) ) ); + }//end if + + //ignore the message, it doesnt have the flag set + if ( process ) super.messageReceived(msg); + else if ( log.isDebugEnabled() ) log.debug("Received a TCP ping packet:"+msg); + }//messageReceived + + protected class PingThread extends Thread { + public void run() { + while (running) { + try { + sleep(interval); + sendPing(); + }catch ( InterruptedException ix ) { + interrupted(); + }catch ( Exception x ) { + log.warn("Unable to send ping from TCP ping thread.",x); + } + } + } + } + + + + +} diff --git a/java/org/apache/naming/resources/VirtualDirContext.java b/java/org/apache/naming/resources/VirtualDirContext.java old mode 100755 new mode 100644 diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java index c1cdf8450..ef3029bd2 100644 --- a/java/org/apache/tomcat/util/net/SocketProperties.java +++ b/java/org/apache/tomcat/util/net/SocketProperties.java @@ -1,370 +1,370 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.tomcat.util.net; - -import java.net.Socket; -import java.net.SocketException; -/** - * Properties that can be set in the <Connector> element - * in server.xml. All properties are prefixed with "socket." - * and are currently only working for the Nio connector - * - * @author Filip Hanik - */ -public class SocketProperties { - /** - * Enable/disable key cache, this bounded cache stores - * KeyAttachment objects to reduce GC - * Default is 500 - * -1 is unlimited - * 0 is disabled - */ - protected int keyCache = 500; - - /** - * Enable/disable socket processor cache, this bounded cache stores - * SocketProcessor objects to reduce GC - * Default is 500 - * -1 is unlimited - * 0 is disabled - */ - protected int processorCache = 500; - - - - /** - * Enable/disable poller event cache, this bounded cache stores - * PollerEvent objects to reduce GC for the poller - * Default is 500 - * -1 is unlimited - * 0 is disabled - * >0 the max number of objects to keep in cache. - */ - protected int eventCache = 500; - - - /** - * Enable/disable direct buffers for the network buffers - * Default value is enabled - */ - protected boolean directBuffer = false; - /** - * Socket receive buffer size in bytes (SO_RCVBUF) - * Default value is 25188 - */ - protected int rxBufSize = 25188; - /** - * Socket send buffer size in bytes (SO_SNDBUF) - * Default value is 43800 - */ - protected int txBufSize = 43800; - - /** - * The application read buffer size in bytes. - * Default value is rxBufSize - */ - protected int appReadBufSize = 8192; - - /** - * The application write buffer size in bytes - * Default value is txBufSize - */ - protected int appWriteBufSize = 8192; - - /** - * NioChannel pool size for the endpoint, - * this value is how many channels - * -1 means unlimited cached, 0 means no cache - * Default value is 500 - */ - protected int bufferPool = 500; - - - /** - * Buffer pool size in bytes to be cached - * -1 means unlimited, 0 means no cache - * Default value is 100MB (1024*1024*100 bytes) - */ - protected int bufferPoolSize = 1024*1024*100; - - /** - * TCP_NO_DELAY option, default is true - */ - protected boolean tcpNoDelay = true; - /** - * SO_KEEPALIVE option, default is false - */ - protected boolean soKeepAlive = false; - /** - * OOBINLINE option, default is true - */ - protected boolean ooBInline = true; - /** - * SO_REUSEADDR option, default is true - */ - protected boolean soReuseAddress = true; - /** - * SO_LINGER option, default is true, paired with the soLingerTime value - */ - protected boolean soLingerOn = true; - /** - * SO_LINGER option, default is 25 seconds. - */ - protected int soLingerTime = 25; - /** - * SO_TIMEOUT option, default is 5000 milliseconds - */ - protected int soTimeout = 5000; - /** - * Traffic class option, value between 0 and 255 - * IPTOS_LOWCOST (0x02) - * IPTOS_RELIABILITY (0x04) - * IPTOS_THROUGHPUT (0x08) - * IPTOS_LOWDELAY (0x10) - * Default value is 0x04 | 0x08 | 0x010 - */ - protected int soTrafficClass = 0x04 | 0x08 | 0x010; - /** - * Performance preferences according to - * http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) - * Default value is 1 - */ - protected int performanceConnectionTime = 1; - /** - * Performance preferences according to - * http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) - * Default value is 0 - */ - protected int performanceLatency = 0; - /** - * Performance preferences according to - * http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) - * Default value is 1 - */ - protected int performanceBandwidth = 1; - - /** - * The minimum frequency of the timeout interval to avoid the - * poller going boinkers during high traffic - */ - protected long timeoutInterval = 1000; - - - private Socket properties; - - public void setProperties(Socket socket) throws SocketException{ - socket.setReceiveBufferSize(rxBufSize); - socket.setSendBufferSize(txBufSize); - socket.setOOBInline(ooBInline); - socket.setKeepAlive(soKeepAlive); - socket.setPerformancePreferences(performanceConnectionTime,performanceLatency,performanceBandwidth); - socket.setReuseAddress(soReuseAddress); - socket.setSoLinger(soLingerOn,soLingerTime); - socket.setSoTimeout(soTimeout); - socket.setTcpNoDelay(tcpNoDelay); - socket.setTrafficClass(soTrafficClass); - } - - public boolean getDirectBuffer() { - return directBuffer; - } - - public boolean getOoBInline() { - return ooBInline; - } - - public int getPerformanceBandwidth() { - return performanceBandwidth; - } - - public int getPerformanceConnectionTime() { - return performanceConnectionTime; - } - - public int getPerformanceLatency() { - return performanceLatency; - } - - public int getRxBufSize() { - return rxBufSize; - } - - public boolean getSoKeepAlive() { - return soKeepAlive; - } - - public boolean getSoLingerOn() { - return soLingerOn; - } - - public int getSoLingerTime() { - return soLingerTime; - } - - public boolean getSoReuseAddress() { - return soReuseAddress; - } - - public int getSoTimeout() { - return soTimeout; - } - - public int getSoTrafficClass() { - return soTrafficClass; - } - - public boolean getTcpNoDelay() { - return tcpNoDelay; - } - - public int getTxBufSize() { - return txBufSize; - } - - public int getBufferPool() { - return bufferPool; - } - - public int getBufferPoolSize() { - return bufferPoolSize; - } - - public int getEventCache() { - return eventCache; - } - - public int getKeyCache() { - return keyCache; - } - - public Socket getProperties() { - return properties; - } - - public int getAppReadBufSize() { - return appReadBufSize; - } - - public int getAppWriteBufSize() { - return appWriteBufSize; - } - - public int getProcessorCache() { - return processorCache; - } - - public long getTimeoutInterval() { - return timeoutInterval; - } - - public int getDirectBufferPool() { - return bufferPool; - } - - public void setPerformanceConnectionTime(int performanceConnectionTime) { - this.performanceConnectionTime = performanceConnectionTime; - } - - public void setTxBufSize(int txBufSize) { - this.txBufSize = txBufSize; - } - - public void setTcpNoDelay(boolean tcpNoDelay) { - this.tcpNoDelay = tcpNoDelay; - } - - public void setSoTrafficClass(int soTrafficClass) { - this.soTrafficClass = soTrafficClass; - } - - public void setSoTimeout(int soTimeout) { - this.soTimeout = soTimeout; - } - - public void setSoReuseAddress(boolean soReuseAddress) { - this.soReuseAddress = soReuseAddress; - } - - public void setSoLingerTime(int soLingerTime) { - this.soLingerTime = soLingerTime; - } - - public void setSoKeepAlive(boolean soKeepAlive) { - this.soKeepAlive = soKeepAlive; - } - - public void setRxBufSize(int rxBufSize) { - this.rxBufSize = rxBufSize; - } - - public void setPerformanceLatency(int performanceLatency) { - this.performanceLatency = performanceLatency; - } - - public void setPerformanceBandwidth(int performanceBandwidth) { - this.performanceBandwidth = performanceBandwidth; - } - - public void setOoBInline(boolean ooBInline) { - this.ooBInline = ooBInline; - } - - public void setDirectBuffer(boolean directBuffer) { - this.directBuffer = directBuffer; - } - - public void setSoLingerOn(boolean soLingerOn) { - this.soLingerOn = soLingerOn; - } - - public void setBufferPool(int bufferPool) { - this.bufferPool = bufferPool; - } - - public void setBufferPoolSize(int bufferPoolSize) { - this.bufferPoolSize = bufferPoolSize; - } - - public void setEventCache(int eventCache) { - this.eventCache = eventCache; - } - - public void setKeyCache(int keyCache) { - this.keyCache = keyCache; - } - - public void setAppReadBufSize(int appReadBufSize) { - this.appReadBufSize = appReadBufSize; - } - - public void setAppWriteBufSize(int appWriteBufSize) { - this.appWriteBufSize = appWriteBufSize; - } - - public void setProcessorCache(int processorCache) { - this.processorCache = processorCache; - } - - public void setTimeoutInterval(long timeoutInterval) { - this.timeoutInterval = timeoutInterval; - } - - public void setDirectBufferPool(int directBufferPool) { - this.bufferPool = directBufferPool; - } - +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.net; + +import java.net.Socket; +import java.net.SocketException; +/** + * Properties that can be set in the <Connector> element + * in server.xml. All properties are prefixed with "socket." + * and are currently only working for the Nio connector + * + * @author Filip Hanik + */ +public class SocketProperties { + /** + * Enable/disable key cache, this bounded cache stores + * KeyAttachment objects to reduce GC + * Default is 500 + * -1 is unlimited + * 0 is disabled + */ + protected int keyCache = 500; + + /** + * Enable/disable socket processor cache, this bounded cache stores + * SocketProcessor objects to reduce GC + * Default is 500 + * -1 is unlimited + * 0 is disabled + */ + protected int processorCache = 500; + + + + /** + * Enable/disable poller event cache, this bounded cache stores + * PollerEvent objects to reduce GC for the poller + * Default is 500 + * -1 is unlimited + * 0 is disabled + * >0 the max number of objects to keep in cache. + */ + protected int eventCache = 500; + + + /** + * Enable/disable direct buffers for the network buffers + * Default value is enabled + */ + protected boolean directBuffer = false; + /** + * Socket receive buffer size in bytes (SO_RCVBUF) + * Default value is 25188 + */ + protected int rxBufSize = 25188; + /** + * Socket send buffer size in bytes (SO_SNDBUF) + * Default value is 43800 + */ + protected int txBufSize = 43800; + + /** + * The application read buffer size in bytes. + * Default value is rxBufSize + */ + protected int appReadBufSize = 8192; + + /** + * The application write buffer size in bytes + * Default value is txBufSize + */ + protected int appWriteBufSize = 8192; + + /** + * NioChannel pool size for the endpoint, + * this value is how many channels + * -1 means unlimited cached, 0 means no cache + * Default value is 500 + */ + protected int bufferPool = 500; + + + /** + * Buffer pool size in bytes to be cached + * -1 means unlimited, 0 means no cache + * Default value is 100MB (1024*1024*100 bytes) + */ + protected int bufferPoolSize = 1024*1024*100; + + /** + * TCP_NO_DELAY option, default is true + */ + protected boolean tcpNoDelay = true; + /** + * SO_KEEPALIVE option, default is false + */ + protected boolean soKeepAlive = false; + /** + * OOBINLINE option, default is true + */ + protected boolean ooBInline = true; + /** + * SO_REUSEADDR option, default is true + */ + protected boolean soReuseAddress = true; + /** + * SO_LINGER option, default is true, paired with the soLingerTime value + */ + protected boolean soLingerOn = true; + /** + * SO_LINGER option, default is 25 seconds. + */ + protected int soLingerTime = 25; + /** + * SO_TIMEOUT option, default is 5000 milliseconds + */ + protected int soTimeout = 5000; + /** + * Traffic class option, value between 0 and 255 + * IPTOS_LOWCOST (0x02) + * IPTOS_RELIABILITY (0x04) + * IPTOS_THROUGHPUT (0x08) + * IPTOS_LOWDELAY (0x10) + * Default value is 0x04 | 0x08 | 0x010 + */ + protected int soTrafficClass = 0x04 | 0x08 | 0x010; + /** + * Performance preferences according to + * http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) + * Default value is 1 + */ + protected int performanceConnectionTime = 1; + /** + * Performance preferences according to + * http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) + * Default value is 0 + */ + protected int performanceLatency = 0; + /** + * Performance preferences according to + * http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) + * Default value is 1 + */ + protected int performanceBandwidth = 1; + + /** + * The minimum frequency of the timeout interval to avoid the + * poller going boinkers during high traffic + */ + protected long timeoutInterval = 1000; + + + private Socket properties; + + public void setProperties(Socket socket) throws SocketException{ + socket.setReceiveBufferSize(rxBufSize); + socket.setSendBufferSize(txBufSize); + socket.setOOBInline(ooBInline); + socket.setKeepAlive(soKeepAlive); + socket.setPerformancePreferences(performanceConnectionTime,performanceLatency,performanceBandwidth); + socket.setReuseAddress(soReuseAddress); + socket.setSoLinger(soLingerOn,soLingerTime); + socket.setSoTimeout(soTimeout); + socket.setTcpNoDelay(tcpNoDelay); + socket.setTrafficClass(soTrafficClass); + } + + public boolean getDirectBuffer() { + return directBuffer; + } + + public boolean getOoBInline() { + return ooBInline; + } + + public int getPerformanceBandwidth() { + return performanceBandwidth; + } + + public int getPerformanceConnectionTime() { + return performanceConnectionTime; + } + + public int getPerformanceLatency() { + return performanceLatency; + } + + public int getRxBufSize() { + return rxBufSize; + } + + public boolean getSoKeepAlive() { + return soKeepAlive; + } + + public boolean getSoLingerOn() { + return soLingerOn; + } + + public int getSoLingerTime() { + return soLingerTime; + } + + public boolean getSoReuseAddress() { + return soReuseAddress; + } + + public int getSoTimeout() { + return soTimeout; + } + + public int getSoTrafficClass() { + return soTrafficClass; + } + + public boolean getTcpNoDelay() { + return tcpNoDelay; + } + + public int getTxBufSize() { + return txBufSize; + } + + public int getBufferPool() { + return bufferPool; + } + + public int getBufferPoolSize() { + return bufferPoolSize; + } + + public int getEventCache() { + return eventCache; + } + + public int getKeyCache() { + return keyCache; + } + + public Socket getProperties() { + return properties; + } + + public int getAppReadBufSize() { + return appReadBufSize; + } + + public int getAppWriteBufSize() { + return appWriteBufSize; + } + + public int getProcessorCache() { + return processorCache; + } + + public long getTimeoutInterval() { + return timeoutInterval; + } + + public int getDirectBufferPool() { + return bufferPool; + } + + public void setPerformanceConnectionTime(int performanceConnectionTime) { + this.performanceConnectionTime = performanceConnectionTime; + } + + public void setTxBufSize(int txBufSize) { + this.txBufSize = txBufSize; + } + + public void setTcpNoDelay(boolean tcpNoDelay) { + this.tcpNoDelay = tcpNoDelay; + } + + public void setSoTrafficClass(int soTrafficClass) { + this.soTrafficClass = soTrafficClass; + } + + public void setSoTimeout(int soTimeout) { + this.soTimeout = soTimeout; + } + + public void setSoReuseAddress(boolean soReuseAddress) { + this.soReuseAddress = soReuseAddress; + } + + public void setSoLingerTime(int soLingerTime) { + this.soLingerTime = soLingerTime; + } + + public void setSoKeepAlive(boolean soKeepAlive) { + this.soKeepAlive = soKeepAlive; + } + + public void setRxBufSize(int rxBufSize) { + this.rxBufSize = rxBufSize; + } + + public void setPerformanceLatency(int performanceLatency) { + this.performanceLatency = performanceLatency; + } + + public void setPerformanceBandwidth(int performanceBandwidth) { + this.performanceBandwidth = performanceBandwidth; + } + + public void setOoBInline(boolean ooBInline) { + this.ooBInline = ooBInline; + } + + public void setDirectBuffer(boolean directBuffer) { + this.directBuffer = directBuffer; + } + + public void setSoLingerOn(boolean soLingerOn) { + this.soLingerOn = soLingerOn; + } + + public void setBufferPool(int bufferPool) { + this.bufferPool = bufferPool; + } + + public void setBufferPoolSize(int bufferPoolSize) { + this.bufferPoolSize = bufferPoolSize; + } + + public void setEventCache(int eventCache) { + this.eventCache = eventCache; + } + + public void setKeyCache(int keyCache) { + this.keyCache = keyCache; + } + + public void setAppReadBufSize(int appReadBufSize) { + this.appReadBufSize = appReadBufSize; + } + + public void setAppWriteBufSize(int appWriteBufSize) { + this.appWriteBufSize = appWriteBufSize; + } + + public void setProcessorCache(int processorCache) { + this.processorCache = processorCache; + } + + public void setTimeoutInterval(long timeoutInterval) { + this.timeoutInterval = timeoutInterval; + } + + public void setDirectBufferPool(int directBufferPool) { + this.bufferPool = directBufferPool; + } + } \ No newline at end of file diff --git a/res/procrun/amd64/tomcat6.exe b/res/procrun/amd64/tomcat6.exe old mode 100644 new mode 100755 diff --git a/res/procrun/amd64/tomcat6w.exe b/res/procrun/amd64/tomcat6w.exe old mode 100644 new mode 100755 diff --git a/res/procrun/ia64/tomcat6.exe b/res/procrun/ia64/tomcat6.exe old mode 100644 new mode 100755 diff --git a/res/procrun/ia64/tomcat6w.exe b/res/procrun/ia64/tomcat6w.exe old mode 100644 new mode 100755 diff --git a/test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java b/test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java index 442690eb7..3fae730f5 100644 --- a/test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java +++ b/test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java @@ -1,186 +1,186 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.catalina.tribes.test.interceptors; - -import org.apache.catalina.tribes.Channel; -import org.apache.catalina.tribes.Member; -import org.apache.catalina.tribes.group.GroupChannel; -import org.apache.catalina.tribes.group.interceptors.NonBlockingCoordinator; -import org.apache.catalina.tribes.group.interceptors.TcpFailureDetector; -import junit.framework.TestCase; -import junit.framework.TestResult; -import junit.framework.TestSuite; -import org.apache.catalina.tribes.ChannelListener; -import java.io.Serializable; -import org.apache.catalina.tribes.group.interceptors.OrderInterceptor; -import org.apache.catalina.tribes.group.ChannelInterceptorBase; -import org.apache.catalina.tribes.ChannelMessage; -import org.apache.catalina.tribes.group.InterceptorPayload; -import org.apache.catalina.tribes.ChannelException; -import java.util.concurrent.atomic.AtomicInteger; - -public class TestOrderInterceptor extends TestCase { - - GroupChannel[] channels = null; - OrderInterceptor[] orderitcs = null; - MangleOrderInterceptor[] mangleitcs = null; - TestListener[] test = null; - int channelCount = 2; - Thread[] threads = null; - protected void setUp() throws Exception { - System.out.println("Setup"); - super.setUp(); - channels = new GroupChannel[channelCount]; - orderitcs = new OrderInterceptor[channelCount]; - mangleitcs = new MangleOrderInterceptor[channelCount]; - test = new TestListener[channelCount]; - threads = new Thread[channelCount]; - for ( int i=0; i