You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2009/05/21 22:35:36 UTC

svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Author: rjung
Date: Thu May 21 20:35:36 2009
New Revision: 777247

URL: http://svn.apache.org/viewvc?rev=777247&view=rev
Log:
Missing svn properties keywords and eol-style.
Found while checking the 6.0.20 release candidate.
Guys fix your svn configuration. ;)

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java   (contents, props changed)

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java?rev=777247&r1=777246&r2=777247&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java Thu May 21 20:35:36 2009
@@ -1,118 +1,118 @@
-/*
- * 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
- */
-package org.apache.catalina.tribes.group.interceptors;
-
-import static java.util.concurrent.TimeUnit.MILLISECONDS;
-
-import java.util.Arrays;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.catalina.tribes.ChannelException;
-import org.apache.catalina.tribes.Member;
-import org.apache.catalina.tribes.group.AbsoluteOrder;
-import org.apache.catalina.tribes.group.ChannelInterceptorBase;
-
-/**
- * A dinky coordinator, just uses a sorted version of the member array.
- * 
- * @author rnewson
- * 
- */
-public class SimpleCoordinator extends ChannelInterceptorBase {
-
-    private Member[] view;
-
-    private AtomicBoolean membershipChanged = new AtomicBoolean();
-
-    private void membershipChanged() {
-        membershipChanged.set(true);
-    }
-
-    @Override
-    public void memberAdded(final Member member) {
-        super.memberAdded(member);
-        membershipChanged();
-        installViewWhenStable();
-    }
-
-    @Override
-    public void memberDisappeared(final Member member) {
-        super.memberDisappeared(member);
-        membershipChanged();
-        installViewWhenStable();
-    }
-
-    /**
-     * Override to receive view changes.
-     * 
-     * @param view
-     */
-    protected void viewChange(final Member[] view) {
-    }
-
-    @Override
-    public void start(int svc) throws ChannelException {
-        super.start(svc);
-        installViewWhenStable();
-    }
-
-    private void installViewWhenStable() {
-        int stableCount = 0;
-
-        while (stableCount < 10) {
-            if (membershipChanged.compareAndSet(true, false)) {
-                stableCount = 0;
-            } else {
-                stableCount++;
-            }
-            try {
-                MILLISECONDS.sleep(250);
-            } catch (final InterruptedException e) {
-                Thread.currentThread().interrupt();
-            }
-        }
-
-        final Member[] members = getMembers();
-        final Member[] view = new Member[members.length+1];
-        System.arraycopy(members, 0, view, 0, members.length);
-        view[members.length] = getLocalMember(false);
-        Arrays.sort(view, AbsoluteOrder.comp);
-        if (Arrays.equals(view, this.view)) {
-            return;
-        }
-        this.view = view;
-        viewChange(view);
-    }
-
-    @Override
-    public void stop(int svc) throws ChannelException {
-        super.stop(svc);
-    }
-
-    public Member[] getView() {
-        return view;
-    }
-
-    public Member getCoordinator() {
-        return view == null ? null : view[0];
-    }
-
-    public boolean isCoordinator() {
-        return view == null ? false : getLocalMember(false).equals(
-                getCoordinator());
-    }
-
-}
+/*
+ * 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
+ */
+package org.apache.catalina.tribes.group.interceptors;
+
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+
+import java.util.Arrays;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.catalina.tribes.ChannelException;
+import org.apache.catalina.tribes.Member;
+import org.apache.catalina.tribes.group.AbsoluteOrder;
+import org.apache.catalina.tribes.group.ChannelInterceptorBase;
+
+/**
+ * A dinky coordinator, just uses a sorted version of the member array.
+ * 
+ * @author rnewson
+ * 
+ */
+public class SimpleCoordinator extends ChannelInterceptorBase {
+
+    private Member[] view;
+
+    private AtomicBoolean membershipChanged = new AtomicBoolean();
+
+    private void membershipChanged() {
+        membershipChanged.set(true);
+    }
+
+    @Override
+    public void memberAdded(final Member member) {
+        super.memberAdded(member);
+        membershipChanged();
+        installViewWhenStable();
+    }
+
+    @Override
+    public void memberDisappeared(final Member member) {
+        super.memberDisappeared(member);
+        membershipChanged();
+        installViewWhenStable();
+    }
+
+    /**
+     * Override to receive view changes.
+     * 
+     * @param view
+     */
+    protected void viewChange(final Member[] view) {
+    }
+
+    @Override
+    public void start(int svc) throws ChannelException {
+        super.start(svc);
+        installViewWhenStable();
+    }
+
+    private void installViewWhenStable() {
+        int stableCount = 0;
+
+        while (stableCount < 10) {
+            if (membershipChanged.compareAndSet(true, false)) {
+                stableCount = 0;
+            } else {
+                stableCount++;
+            }
+            try {
+                MILLISECONDS.sleep(250);
+            } catch (final InterruptedException e) {
+                Thread.currentThread().interrupt();
+            }
+        }
+
+        final Member[] members = getMembers();
+        final Member[] view = new Member[members.length+1];
+        System.arraycopy(members, 0, view, 0, members.length);
+        view[members.length] = getLocalMember(false);
+        Arrays.sort(view, AbsoluteOrder.comp);
+        if (Arrays.equals(view, this.view)) {
+            return;
+        }
+        this.view = view;
+        viewChange(view);
+    }
+
+    @Override
+    public void stop(int svc) throws ChannelException {
+        super.stop(svc);
+    }
+
+    public Member[] getView() {
+        return view;
+    }
+
+    public Member getCoordinator() {
+        return view == null ? null : view[0];
+    }
+
+    public boolean isCoordinator() {
+        return view == null ? false : getLocalMember(false).equals(
+                getCoordinator());
+    }
+
+}

Propchange: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by Rainer Jung <ra...@kippdata.de>.
On 22.05.2009 00:48, sebb wrote:
> Some more fixes for trunk:
> 
> svn ps svn:eol-style native
> java/org/apache/catalina/ha/backend/CollectedInfo.java
> svn ps svn:eol-style native
> java/org/apache/catalina/ha/backend/HeartbeatListener.java
> svn ps svn:eol-style native
> java/org/apache/catalina/ha/backend/MultiCastSender.java
> svn ps svn:eol-style native java/org/apache/catalina/ha/backend/Proxy.java
> svn ps svn:eol-style native java/org/apache/catalina/ha/backend/Sender.java
> svn ps svn:eol-style native java/org/apache/catalina/ha/backend/TcpSender.java
> svn ps svn:eol-style native
> modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestException.java
> svn ps svn:eol-style native
> modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/driver/Connection.java
> svn ps svn:eol-style native
> modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/driver/Driver.java
> svn ps svn:eol-style native
> modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/driver/Statement.java
> svn ps svn:eol-style native
> modules/tomcat-lite/java/org/apache/tomcat/integration/simple/SimpleObjectManager.java
> svn ps svn:eol-style native
> modules/tomcat-lite/java/org/apache/tomcat/util/http/mapper/BaseMapper.java
> svn ps svn:eol-style native
> modules/tomcat-lite/test/org/apache/tomcat/lite/LiteTestHelper.java
> svn ps svn:eol-style native
> modules/tomcat-lite/test/org/apache/tomcat/test/watchdog/WatchdogHttpClient.java

I missed the files with no props at all during the first take, but I
should have caught them now in r777319.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by sebb <se...@gmail.com>.
Some more fixes for trunk:

svn ps svn:eol-style native
java/org/apache/catalina/ha/backend/CollectedInfo.java
svn ps svn:eol-style native
java/org/apache/catalina/ha/backend/HeartbeatListener.java
svn ps svn:eol-style native
java/org/apache/catalina/ha/backend/MultiCastSender.java
svn ps svn:eol-style native java/org/apache/catalina/ha/backend/Proxy.java
svn ps svn:eol-style native java/org/apache/catalina/ha/backend/Sender.java
svn ps svn:eol-style native java/org/apache/catalina/ha/backend/TcpSender.java
svn ps svn:eol-style native
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestException.java
svn ps svn:eol-style native
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/driver/Connection.java
svn ps svn:eol-style native
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/driver/Driver.java
svn ps svn:eol-style native
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/driver/Statement.java
svn ps svn:eol-style native
modules/tomcat-lite/java/org/apache/tomcat/integration/simple/SimpleObjectManager.java
svn ps svn:eol-style native
modules/tomcat-lite/java/org/apache/tomcat/util/http/mapper/BaseMapper.java
svn ps svn:eol-style native
modules/tomcat-lite/test/org/apache/tomcat/lite/LiteTestHelper.java
svn ps svn:eol-style native
modules/tomcat-lite/test/org/apache/tomcat/test/watchdog/WatchdogHttpClient.java


On 21/05/2009, Rainer Jung <ra...@kippdata.de> wrote:
> On 21.05.2009 23:29, sebb wrote:
>  > Here are a few more missing properties:
>  >
>  > svn ps svn:eol-style native java/javax/el/LocalStrings_es.properties
>  > svn ps svn:eol-style native java/javax/servlet/LocalStrings_es.properties
>  > svn ps svn:eol-style native
>  > java/org/apache/catalina/ha/LocalStrings_es.properties
>  > svn ps svn:eol-style native
>  > java/org/apache/catalina/ha/session/LocalStrings_es.properties
>  > svn ps svn:eol-style native
>  > java/org/apache/catalina/ha/tcp/LocalStrings_es.properties
>  > svn ps svn:eol-style native
>  > java/org/apache/catalina/manager/host/LocalStrings_es.properties
>  > svn ps svn:eol-style native
>  > java/org/apache/catalina/tribes/LocalStrings_es.properties
>  > svn ps svn:eol-style native
>  > java/org/apache/catalina/tribes/membership/LocalStrings_es.properties
>  > svn ps svn:eol-style native
>  > java/org/apache/catalina/tribes/transport/LocalStrings_es.properties
>  > svn ps svn:eol-style native java/org/apache/catalina/valves/WebdavFixValve.java
>  > svn ps svn:eol-style native
>  > java/org/apache/coyote/ajp/LocalStrings_es.properties
>  > svn ps svn:eol-style native java/org/apache/el/Messages_es.properties
>  >
>  > svn ps svn:eol-style native
>  > java/org/apache/tomcat/util/net/jsse/NioX509KeyManager.java
>  > svn ps svn:eol-style native
>  > test/org/apache/tomcat/util/res/TestStringManager.java
>
>
> I checked the properties of all files for trunk and corrected them for
>  200 files (at least eol-style and keywords) and also will propose
>  something for tc6 and maybe earlier.
>
>
>  > Also, it's a bit risky setting the executable flag in SVN, so you may
>  > wish to apply the following:
>  >
>  > svn pd svn:executable res/procrun/tomcat6.exe
>  > svn pd svn:executable res/procrun/tomcat6w.exe
>  > svn pd svn:executable res/procrun/amd64/tomcat6.exe
>  > svn pd svn:executable res/procrun/amd64/tomcat6w.exe
>  > svn pd svn:executable res/procrun/ia64/tomcat6.exe
>  > svn pd svn:executable res/procrun/ia64/tomcat6w.exe
>
>
> I leave the executable property manipulation to someone who might know
>  better the consequences.
>
>  Regards,
>
>
>  Rainer
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>  For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by Rainer Jung <ra...@kippdata.de>.
On 21.05.2009 23:29, sebb wrote:
> Here are a few more missing properties:
> 
> svn ps svn:eol-style native java/javax/el/LocalStrings_es.properties
> svn ps svn:eol-style native java/javax/servlet/LocalStrings_es.properties
> svn ps svn:eol-style native
> java/org/apache/catalina/ha/LocalStrings_es.properties
> svn ps svn:eol-style native
> java/org/apache/catalina/ha/session/LocalStrings_es.properties
> svn ps svn:eol-style native
> java/org/apache/catalina/ha/tcp/LocalStrings_es.properties
> svn ps svn:eol-style native
> java/org/apache/catalina/manager/host/LocalStrings_es.properties
> svn ps svn:eol-style native
> java/org/apache/catalina/tribes/LocalStrings_es.properties
> svn ps svn:eol-style native
> java/org/apache/catalina/tribes/membership/LocalStrings_es.properties
> svn ps svn:eol-style native
> java/org/apache/catalina/tribes/transport/LocalStrings_es.properties
> svn ps svn:eol-style native java/org/apache/catalina/valves/WebdavFixValve.java
> svn ps svn:eol-style native
> java/org/apache/coyote/ajp/LocalStrings_es.properties
> svn ps svn:eol-style native java/org/apache/el/Messages_es.properties
> 
> svn ps svn:eol-style native
> java/org/apache/tomcat/util/net/jsse/NioX509KeyManager.java
> svn ps svn:eol-style native
> test/org/apache/tomcat/util/res/TestStringManager.java

I checked the properties of all files for trunk and corrected them for
200 files (at least eol-style and keywords) and also will propose
something for tc6 and maybe earlier.

> Also, it's a bit risky setting the executable flag in SVN, so you may
> wish to apply the following:
> 
> svn pd svn:executable res/procrun/tomcat6.exe
> svn pd svn:executable res/procrun/tomcat6w.exe
> svn pd svn:executable res/procrun/amd64/tomcat6.exe
> svn pd svn:executable res/procrun/amd64/tomcat6w.exe
> svn pd svn:executable res/procrun/ia64/tomcat6.exe
> svn pd svn:executable res/procrun/ia64/tomcat6w.exe

I leave the executable property manipulation to someone who might know
better the consequences.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by sebb <se...@gmail.com>.
Here are a few more missing properties:

svn ps svn:eol-style native java/javax/el/LocalStrings_es.properties
svn ps svn:eol-style native java/javax/servlet/LocalStrings_es.properties
svn ps svn:eol-style native
java/org/apache/catalina/ha/LocalStrings_es.properties
svn ps svn:eol-style native
java/org/apache/catalina/ha/session/LocalStrings_es.properties
svn ps svn:eol-style native
java/org/apache/catalina/ha/tcp/LocalStrings_es.properties
svn ps svn:eol-style native
java/org/apache/catalina/manager/host/LocalStrings_es.properties
svn ps svn:eol-style native
java/org/apache/catalina/tribes/LocalStrings_es.properties
svn ps svn:eol-style native
java/org/apache/catalina/tribes/membership/LocalStrings_es.properties
svn ps svn:eol-style native
java/org/apache/catalina/tribes/transport/LocalStrings_es.properties
svn ps svn:eol-style native java/org/apache/catalina/valves/WebdavFixValve.java
svn ps svn:eol-style native
java/org/apache/coyote/ajp/LocalStrings_es.properties
svn ps svn:eol-style native java/org/apache/el/Messages_es.properties

svn ps svn:eol-style native
java/org/apache/tomcat/util/net/jsse/NioX509KeyManager.java
svn ps svn:eol-style native
test/org/apache/tomcat/util/res/TestStringManager.java

Also, it's a bit risky setting the executable flag in SVN, so you may
wish to apply the following:

svn pd svn:executable res/procrun/tomcat6.exe
svn pd svn:executable res/procrun/tomcat6w.exe
svn pd svn:executable res/procrun/amd64/tomcat6.exe
svn pd svn:executable res/procrun/amd64/tomcat6w.exe
svn pd svn:executable res/procrun/ia64/tomcat6.exe
svn pd svn:executable res/procrun/ia64/tomcat6w.exe


On 21/05/2009, rjung@apache.org <rj...@apache.org> wrote:
> Author: rjung
>  Date: Thu May 21 20:35:36 2009
>  New Revision: 777247
>
>  URL: http://svn.apache.org/viewvc?rev=777247&view=rev
>  Log:
>  Missing svn properties keywords and eol-style.
>  Found while checking the 6.0.20 release candidate.
>  Guys fix your svn configuration. ;)
>
>  Modified:
>     tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java   (contents, props changed)
>
>  Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java
>  URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java?rev=777247&r1=777246&r2=777247&view=diff
>  ==============================================================================
>  --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java (original)
>  +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java Thu May 21 20:35:36 2009
>  @@ -1,118 +1,118 @@
>  -/*
>  - * 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
>  - */
>  -package org.apache.catalina.tribes.group.interceptors;
>  -
>  -import static java.util.concurrent.TimeUnit.MILLISECONDS;
>  -
>  -import java.util.Arrays;
>  -import java.util.concurrent.atomic.AtomicBoolean;
>  -
>  -import org.apache.catalina.tribes.ChannelException;
>  -import org.apache.catalina.tribes.Member;
>  -import org.apache.catalina.tribes.group.AbsoluteOrder;
>  -import org.apache.catalina.tribes.group.ChannelInterceptorBase;
>  -
>  -/**
>  - * A dinky coordinator, just uses a sorted version of the member array.
>  - *
>  - * @author rnewson
>  - *
>  - */
>  -public class SimpleCoordinator extends ChannelInterceptorBase {
>  -
>  -    private Member[] view;
>  -
>  -    private AtomicBoolean membershipChanged = new AtomicBoolean();
>  -
>  -    private void membershipChanged() {
>  -        membershipChanged.set(true);
>  -    }
>  -
>  -    @Override
>  -    public void memberAdded(final Member member) {
>  -        super.memberAdded(member);
>  -        membershipChanged();
>  -        installViewWhenStable();
>  -    }
>  -
>  -    @Override
>  -    public void memberDisappeared(final Member member) {
>  -        super.memberDisappeared(member);
>  -        membershipChanged();
>  -        installViewWhenStable();
>  -    }
>  -
>  -    /**
>  -     * Override to receive view changes.
>  -     *
>  -     * @param view
>  -     */
>  -    protected void viewChange(final Member[] view) {
>  -    }
>  -
>  -    @Override
>  -    public void start(int svc) throws ChannelException {
>  -        super.start(svc);
>  -        installViewWhenStable();
>  -    }
>  -
>  -    private void installViewWhenStable() {
>  -        int stableCount = 0;
>  -
>  -        while (stableCount < 10) {
>  -            if (membershipChanged.compareAndSet(true, false)) {
>  -                stableCount = 0;
>  -            } else {
>  -                stableCount++;
>  -            }
>  -            try {
>  -                MILLISECONDS.sleep(250);
>  -            } catch (final InterruptedException e) {
>  -                Thread.currentThread().interrupt();
>  -            }
>  -        }
>  -
>  -        final Member[] members = getMembers();
>  -        final Member[] view = new Member[members.length+1];
>  -        System.arraycopy(members, 0, view, 0, members.length);
>  -        view[members.length] = getLocalMember(false);
>  -        Arrays.sort(view, AbsoluteOrder.comp);
>  -        if (Arrays.equals(view, this.view)) {
>  -            return;
>  -        }
>  -        this.view = view;
>  -        viewChange(view);
>  -    }
>  -
>  -    @Override
>  -    public void stop(int svc) throws ChannelException {
>  -        super.stop(svc);
>  -    }
>  -
>  -    public Member[] getView() {
>  -        return view;
>  -    }
>  -
>  -    public Member getCoordinator() {
>  -        return view == null ? null : view[0];
>  -    }
>  -
>  -    public boolean isCoordinator() {
>  -        return view == null ? false : getLocalMember(false).equals(
>  -                getCoordinator());
>  -    }
>  -
>  -}
>  +/*
>  + * 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
>  + */
>  +package org.apache.catalina.tribes.group.interceptors;
>  +
>  +import static java.util.concurrent.TimeUnit.MILLISECONDS;
>  +
>  +import java.util.Arrays;
>  +import java.util.concurrent.atomic.AtomicBoolean;
>  +
>  +import org.apache.catalina.tribes.ChannelException;
>  +import org.apache.catalina.tribes.Member;
>  +import org.apache.catalina.tribes.group.AbsoluteOrder;
>  +import org.apache.catalina.tribes.group.ChannelInterceptorBase;
>  +
>  +/**
>  + * A dinky coordinator, just uses a sorted version of the member array.
>  + *
>  + * @author rnewson
>  + *
>  + */
>  +public class SimpleCoordinator extends ChannelInterceptorBase {
>  +
>  +    private Member[] view;
>  +
>  +    private AtomicBoolean membershipChanged = new AtomicBoolean();
>  +
>  +    private void membershipChanged() {
>  +        membershipChanged.set(true);
>  +    }
>  +
>  +    @Override
>  +    public void memberAdded(final Member member) {
>  +        super.memberAdded(member);
>  +        membershipChanged();
>  +        installViewWhenStable();
>  +    }
>  +
>  +    @Override
>  +    public void memberDisappeared(final Member member) {
>  +        super.memberDisappeared(member);
>  +        membershipChanged();
>  +        installViewWhenStable();
>  +    }
>  +
>  +    /**
>  +     * Override to receive view changes.
>  +     *
>  +     * @param view
>  +     */
>  +    protected void viewChange(final Member[] view) {
>  +    }
>  +
>  +    @Override
>  +    public void start(int svc) throws ChannelException {
>  +        super.start(svc);
>  +        installViewWhenStable();
>  +    }
>  +
>  +    private void installViewWhenStable() {
>  +        int stableCount = 0;
>  +
>  +        while (stableCount < 10) {
>  +            if (membershipChanged.compareAndSet(true, false)) {
>  +                stableCount = 0;
>  +            } else {
>  +                stableCount++;
>  +            }
>  +            try {
>  +                MILLISECONDS.sleep(250);
>  +            } catch (final InterruptedException e) {
>  +                Thread.currentThread().interrupt();
>  +            }
>  +        }
>  +
>  +        final Member[] members = getMembers();
>  +        final Member[] view = new Member[members.length+1];
>  +        System.arraycopy(members, 0, view, 0, members.length);
>  +        view[members.length] = getLocalMember(false);
>  +        Arrays.sort(view, AbsoluteOrder.comp);
>  +        if (Arrays.equals(view, this.view)) {
>  +            return;
>  +        }
>  +        this.view = view;
>  +        viewChange(view);
>  +    }
>  +
>  +    @Override
>  +    public void stop(int svc) throws ChannelException {
>  +        super.stop(svc);
>  +    }
>  +
>  +    public Member[] getView() {
>  +        return view;
>  +    }
>  +
>  +    public Member getCoordinator() {
>  +        return view == null ? null : view[0];
>  +    }
>  +
>  +    public boolean isCoordinator() {
>  +        return view == null ? false : getLocalMember(false).equals(
>  +                getCoordinator());
>  +    }
>  +
>  +}
>
>  Propchange: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java
>  ------------------------------------------------------------------------------
>     svn:eol-style = native
>
>  Propchange: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java
>  ------------------------------------------------------------------------------
>     svn:keywords = Author Date Id Revision
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>  For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by Rainer Jung <ra...@kippdata.de>.
On 22.05.2009 03:59, William A. Rowe, Jr. wrote:
> Filip Hanik - Dev Lists wrote:
>> sebb wrote:
>>> There's also a suggested set on the Apache site, see:
>>>
>>> http://www.apache.org/dev/version-control.html#https-svn-config
>>>   
>> that's exactly my point, everytime I just onto a new machine, and I
>> forget, which I'm bound to do, to set the config file correctly.
>> seems like its a feature missing from SVN
> 
> My personal grip with SVN is that this is not stored as "per repository"
> server-side preferences common to the whole group ;)

So we should all comment on the open svn issue Kostantin pointed us to:

> http://subversion.tigris.org/issues/show_bug.cgi?id=1974

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Filip Hanik - Dev Lists wrote:
> sebb wrote:
>> There's also a suggested set on the Apache site, see:
>>
>> http://www.apache.org/dev/version-control.html#https-svn-config
>>   
> that's exactly my point, everytime I just onto a new machine, and I
> forget, which I'm bound to do, to set the config file correctly.
> seems like its a feature missing from SVN

My personal grip with SVN is that this is not stored as "per repository"
server-side preferences common to the whole group ;)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
sebb wrote:
> On 22/05/2009, Rainer Jung <ra...@kippdata.de> wrote:
>   
>> On 22.05.2009 01:07, Filip Hanik - Dev Lists wrote:
>>  > rjung@apache.org wrote:
>>  >> Guys fix your svn configuration. ;)
>>  >>
>>  > This happens to me all the time, as I move between machines very often.
>>  >
>>  > Why is the ~/.subversion/config a client setting? isn't there a way to
>>  > setup properties on the server the client can inherit from? so when I
>>  > check out a project, I automatically inherit the configuration?
>>
>>
>> From the 1.5 subversion book it seems its still a client only configuration.
>>
>>  On a multi-user client system, there's a way of defining global defaults
>>  for all users, which can then be overwritten by the individual users.
>>
>>  You could check in your .subversion dir into some private part of the
>>  springsource repository and then retrieve it from there when you need to
>>  setup a new environment.
>>     
>
> Why don't you keep a copy of the required settings somewhere in the
> Tomcat SVN repo?
> It can be tweaked as needed for Tomcat.
>
> There's also a suggested set on the Apache site, see:
>
> http://www.apache.org/dev/version-control.html#https-svn-config
>   
that's exactly my point, everytime I just onto a new machine, and I 
forget, which I'm bound to do, to set the config file correctly.
seems like its a feature missing from SVN

Filip
>   
>>  Regards,
>>
>>
>>  Rainer
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>  For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by sebb <se...@gmail.com>.
On 22/05/2009, Rainer Jung <ra...@kippdata.de> wrote:
> On 22.05.2009 01:07, Filip Hanik - Dev Lists wrote:
>  > rjung@apache.org wrote:
>  >> Guys fix your svn configuration. ;)
>  >>
>  > This happens to me all the time, as I move between machines very often.
>  >
>  > Why is the ~/.subversion/config a client setting? isn't there a way to
>  > setup properties on the server the client can inherit from? so when I
>  > check out a project, I automatically inherit the configuration?
>
>
> From the 1.5 subversion book it seems its still a client only configuration.
>
>  On a multi-user client system, there's a way of defining global defaults
>  for all users, which can then be overwritten by the individual users.
>
>  You could check in your .subversion dir into some private part of the
>  springsource repository and then retrieve it from there when you need to
>  setup a new environment.

Why don't you keep a copy of the required settings somewhere in the
Tomcat SVN repo?
It can be tweaked as needed for Tomcat.

There's also a suggested set on the Apache site, see:

http://www.apache.org/dev/version-control.html#https-svn-config

>  Regards,
>
>
>  Rainer
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>  For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by Rainer Jung <ra...@kippdata.de>.
On 22.05.2009 01:07, Filip Hanik - Dev Lists wrote:
> rjung@apache.org wrote:
>> Guys fix your svn configuration. ;)
>>   
> This happens to me all the time, as I move between machines very often.
> 
> Why is the ~/.subversion/config a client setting? isn't there a way to
> setup properties on the server the client can inherit from? so when I
> check out a project, I automatically inherit the configuration?

>From the 1.5 subversion book it seems its still a client only configuration.

On a multi-user client system, there's a way of defining global defaults
for all users, which can then be overwritten by the individual users.

You could check in your .subversion dir into some private part of the
springsource repository and then retrieve it from there when you need to
setup a new environment.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
Konstantin Kolinko wrote:
> 2009/5/22 Filip Hanik - Dev Lists <de...@hanik.com>:
>   
>> rjung@apache.org wrote:
>>     
>>> Guys fix your svn configuration. ;)
>>>
>>>       
>> This happens to me all the time, as I move between machines very often.
>>
>> Why is the ~/.subversion/config a client setting? isn't there a way to setup
>> properties on the server the client can inherit from? so when I check out a
>> project, I automatically inherit the configuration?
>>
>>     
>
> For TortoiseSVN client there exists  tsvn:autoprops  svn property
>
> http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-propertypage.html#tsvn-dug-propertypage-tsvn-props
>
> I have not heard of anything similar for other clients, or if any
> other clients were respecting this setting.
>
> In general, there is
> http://subversion.tigris.org/issues/show_bug.cgi?id=1974
> which is unlikely to be implemented any soon.
>   
good try, but this is still a client solution, it would be much more 
efficient if we had a server side solution

Filip
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by Konstantin Kolinko <kn...@gmail.com>.
2009/5/22 Filip Hanik - Dev Lists <de...@hanik.com>:
> rjung@apache.org wrote:
>>
>> Guys fix your svn configuration. ;)
>>
>
> This happens to me all the time, as I move between machines very often.
>
> Why is the ~/.subversion/config a client setting? isn't there a way to setup
> properties on the server the client can inherit from? so when I check out a
> project, I automatically inherit the configuration?
>

For TortoiseSVN client there exists  tsvn:autoprops  svn property

http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-propertypage.html#tsvn-dug-propertypage-tsvn-props

I have not heard of anything similar for other clients, or if any
other clients were respecting this setting.

In general, there is
http://subversion.tigris.org/issues/show_bug.cgi?id=1974
which is unlikely to be implemented any soon.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r777247 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
rjung@apache.org wrote:
> Guys fix your svn configuration. ;)
>   
This happens to me all the time, as I move between machines very often.

Why is the ~/.subversion/config a client setting? isn't there a way to 
setup properties on the server the client can inherit from? so when I 
check out a project, I automatically inherit the configuration?

Filip

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org