You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by th...@apache.org on 2010/11/02 12:06:44 UTC

svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Author: thobbs
Date: Tue Nov  2 11:06:43 2010
New Revision: 1030001

URL: http://svn.apache.org/viewvc?rev=1030001&view=rev
Log:
Tidied up code for the self-healing proxy demonstration.  Plenty of javadocs as well.

Added:
    incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/
    incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/MulticastServiceFinder.java
    incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/ServiceFinder.java
    incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/UnicastServiceFinder.java
Removed:
    incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/MulticastServiceFinder.java
    incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/ServiceFinder.java
    incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/UnicastServiceFinder.java
Modified:
    incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/SelfHealingServiceFactory.java
    incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/ServiceWrapper.java

Added: incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/MulticastServiceFinder.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/MulticastServiceFinder.java?rev=1030001&view=auto
==============================================================================
--- incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/MulticastServiceFinder.java (added)
+++ incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/MulticastServiceFinder.java Tue Nov  2 11:06:43 2010
@@ -0,0 +1,114 @@
+/*
+ * 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.river.extra.discovery;
+
+import java.io.IOException;
+import java.rmi.RemoteException;
+import java.util.logging.Logger;
+
+import net.jini.core.lookup.ServiceItem;
+import net.jini.core.lookup.ServiceTemplate;
+import net.jini.discovery.DiscoveryManagement;
+import net.jini.discovery.LookupDiscovery;
+import net.jini.lease.LeaseRenewalManager;
+import net.jini.lookup.ServiceDiscoveryManager;
+import net.jini.lookup.ServiceItemFilter;
+
+/**
+ * Implementation which uses multicast to find all the lookup services in the
+ * local subnet.  Discovery of new/replacement services is then handed to the
+ * internal <code>ServiceDiscoveryManager</code>.
+ * 
+ * @author thobbs
+ *
+ */
+public class MulticastServiceFinder implements ServiceFinder {
+
+    private static final Logger logger = Logger.getLogger(MulticastServiceFinder.class.getSimpleName());
+
+    private static final long SETTLE_DOWN_WAIT_TIME = 500;
+
+    private final ServiceDiscoveryManager serviceDiscovery;
+
+    /**
+     * Searches for lookup services in all lookup groups and uses a default
+     * <code>LeaseRenewalManager</code>
+     * 
+     * @throws IOException
+     */
+    public MulticastServiceFinder() throws IOException {
+        this(LookupDiscovery.ALL_GROUPS);
+    }
+
+    /**
+     * Searches for lookup services in the specified lookup groups and uses a
+     * default <code>LeaseRenewalManager</code>
+     * 
+     * @param lookupGroups
+     * @throws IOException
+     */
+    public MulticastServiceFinder(final String[] lookupGroups) throws IOException {
+        this(new LookupDiscovery(lookupGroups), new LeaseRenewalManager());
+    }
+
+    public MulticastServiceFinder(final DiscoveryManagement dm, final LeaseRenewalManager lrm) throws IOException {
+        this.serviceDiscovery = new ServiceDiscoveryManager(dm, lrm);
+        try {
+            Thread.sleep(SETTLE_DOWN_WAIT_TIME);
+        } catch (InterruptedException ie) {}
+    }
+
+    /**
+     * Locates a new service using a default <code>ServiceItemFilter</code>
+     * 
+     * @see findNewService(final ServiceTemplate template, final ServiceItemFilter filter)
+     */
+    public Object findNewService(final ServiceTemplate template) throws RemoteException {
+        return findNewService(template, new ServiceItemFilter() {
+            public boolean check(final ServiceItem item) {
+                return true;
+            }
+        });
+    }
+
+    /**
+     * Locates a new service which matches the supplied filter.
+     * 
+     * @param template
+     * @param filter
+     * @return
+     * @throws RemoteException if no valid service can be found
+     */
+    public Object findNewService(final ServiceTemplate template, final ServiceItemFilter filter) throws RemoteException {
+        ServiceItem[] services = this.serviceDiscovery.lookup(template, 1, filter);
+
+        if(null == services || 0 == services.length) {
+            throw new RemoteException("Cannot find valid service");
+        }
+
+        return services[0].service;
+    }
+
+    /**
+     * Terminates the multicast listeners etc.
+     */
+    public void terminate() {
+        logger.info("Terminating service finder");
+        this.serviceDiscovery.terminate();
+    }
+}
\ No newline at end of file

Added: incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/ServiceFinder.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/ServiceFinder.java?rev=1030001&view=auto
==============================================================================
--- incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/ServiceFinder.java (added)
+++ incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/ServiceFinder.java Tue Nov  2 11:06:43 2010
@@ -0,0 +1,48 @@
+/*
+ * 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.river.extra.discovery;
+
+import java.rmi.RemoteException;
+
+import net.jini.core.lookup.ServiceTemplate;
+
+/**
+ * This interface provides a convenience wrapper around service discovery simply
+ * for the purposes of demonstrating the self-healing proxy.
+ * 
+ * This implementation has at least one obvious potential failing.  The
+ * <code>ServiceFinder</code> implementation does not check that the service
+ * it replaces the proxy with is different to the service which has previous
+ * failed.  For example, <code>invoke</code> might fail against service with
+ * ID 0000-0000-0000-AAAA, if (for whatever reason) the ServiceFinder again
+ * finds the service with ID 0000-0000-0000-AAAA, then we would expect this call
+ * to fail also.
+ * 
+ * It would be wise to offer alternative implementations of <code>ServiceFinder</code>
+ * which guard against these kinds of behaviours.
+ * 
+ * @author Tom Hobbs
+ *
+ */
+public interface ServiceFinder {
+
+    Object findNewService(ServiceTemplate template) throws RemoteException;
+
+    void terminate();
+
+}
\ No newline at end of file

Added: incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/UnicastServiceFinder.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/UnicastServiceFinder.java?rev=1030001&view=auto
==============================================================================
--- incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/UnicastServiceFinder.java (added)
+++ incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/discovery/UnicastServiceFinder.java Tue Nov  2 11:06:43 2010
@@ -0,0 +1,83 @@
+/*
+ * 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.river.extra.discovery;
+
+import java.io.IOException;
+import java.rmi.RemoteException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import net.jini.core.discovery.LookupLocator;
+import net.jini.core.lookup.ServiceRegistrar;
+import net.jini.core.lookup.ServiceTemplate;
+
+/**
+ * Implementation which accepts an array of <code>LookupLocator</code>s and
+ * uses them to find replacement services.  This allows service discovery
+ * across subnets.
+ * 
+ * @author thobbs
+ */
+public class UnicastServiceFinder implements ServiceFinder {
+
+    private static final Logger logger = Logger.getLogger(UnicastServiceFinder.class.getSimpleName());
+
+    private LookupLocator[] lookupLocators;
+
+    /**
+     * @param lookupLocators
+     * @throws IllegalArgumentException if the argumet s null or is a zero length array
+     */
+    public UnicastServiceFinder(final LookupLocator[] lookupLocators) {
+        setLookupLocators(lookupLocators);
+    }
+
+    public Object findNewService(final ServiceTemplate template) throws RemoteException {
+        Object proxy = null;
+
+        for(int i=0 ; i<this.lookupLocators.length && null == proxy ; i++) {
+            try {
+                ServiceRegistrar ssr = this.lookupLocators[i].getRegistrar();
+                proxy = ssr.lookup(template);
+            } catch (IOException ioe) {
+                logger.log(Level.WARNING, "Unable to lookup service on jini://"+this.lookupLocators[i].getHost()+":"+this.lookupLocators[i].getPort(), ioe);
+            } catch (ClassNotFoundException cce) {
+                logger.log(Level.WARNING, "Unable to lookup service on jini://"+this.lookupLocators[i].getHost()+":"+this.lookupLocators[i].getPort(), cce);
+            }
+        }
+
+        if(null == proxy) {
+            throw new RemoteException("Cannot find valid service");
+        }
+
+        return proxy;
+    }
+
+    public void terminate() {
+    }
+
+    private void setLookupLocators(final LookupLocator[] lookupLocators) {
+        if(null == lookupLocators) {
+            throw new IllegalArgumentException("LookupLocator array cannot be null");
+        }
+        if(0 == lookupLocators.length) {
+            throw new IllegalArgumentException("LookupLocator array must have length > 0");
+        }
+        this.lookupLocators = lookupLocators;
+    }
+}

Modified: incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/SelfHealingServiceFactory.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/SelfHealingServiceFactory.java?rev=1030001&r1=1030000&r2=1030001&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/SelfHealingServiceFactory.java (original)
+++ incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/SelfHealingServiceFactory.java Tue Nov  2 11:06:43 2010
@@ -1,11 +1,59 @@
+/*
+ * 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.river.extra.selfhealing;
 
 import java.lang.reflect.Proxy;
 
+import org.apache.river.extra.discovery.ServiceFinder;
+
 import net.jini.core.lookup.ServiceTemplate;
 
+/**
+ * Factory class which supplied an easy way of lookup up River services to use.
+ * 
+ * When the service starts to misbehave, by throwing exceptions or my timing
+ * out, the <code>ServiceWrapper</code> proxy will automatically find a 
+ * replacement service and re-route the method call to the new service.  
+ * 
+ * The exact behaviour can be altered by supplying custom
+ * <code>ServiceFinder</code> implementations or implementing a new 
+ * <code>lookup</code> method which returns an alternative implementation of
+ * <code>ServiceWrapper</code>
+ * 
+ * @see ServiceFinder
+ * @see ServiceWrapper
+ * @author thobbs
+ *
+ */
 public class SelfHealingServiceFactory {
 
+	/**
+	 * 
+	 * @param template
+	 * 			A River class which describes the kind of service being requested
+	 * @param finder - An extras-specific implementation which the 
+	 * 			<code>ServiceWrapper</code> can use to replace its underlying 
+	 * 			service
+	 * @return a proxy to a <code>ServiceWrapper</code> which masquerades as the
+	 * 		   the service type as specified in the template
+	 *  
+	 * @see ServiceTemplate
+	 */
     public static Object lookup(final ServiceTemplate template, final ServiceFinder finder) {
         return Proxy.newProxyInstance(template.serviceTypes[0].getClassLoader(),
                                       template.serviceTypes,

Modified: incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/ServiceWrapper.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/ServiceWrapper.java?rev=1030001&r1=1030000&r2=1030001&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/ServiceWrapper.java (original)
+++ incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/ServiceWrapper.java Tue Nov  2 11:06:43 2010
@@ -1,3 +1,20 @@
+/*
+ * 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.river.extra.selfhealing;
 
 import java.lang.reflect.InvocationHandler;
@@ -7,9 +24,32 @@ import java.rmi.RemoteException;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import net.jini.admin.Administrable;
 import net.jini.core.lookup.ServiceTemplate;
 
-public class ServiceWrapper implements InvocationHandler {
+import org.apache.river.extra.discovery.ServiceFinder;
+
+/**
+ * Simple implementation of a self-healing proxy.  Instead of standard River
+ * service discovery, this <code>ServiceWrapper</code> is used alongside the
+ * <code>SelfHealingServiceFactory</code>.  Then, when a method is called on a
+ * (wrapped) service, should that service call fail the wrapper will
+ * automatically to find a replacement service and re-make the same method call
+ * to the newly discovered service.
+ * 
+ * This leaves the remainder of the application to only have to deal with the
+ * occurance of when no service can be found in the djinn at all, rather than
+ * having to deal with generic service failures, relookups and retries.
+ * 
+ * This suite of classes is intended to be a reference implementation and
+ * alternative strategies for service lookup and re-invokation can be easily
+ * implemented.
+ * 
+ * @see SelfHealingServiceFactory
+ * @author thobbs
+ *
+ */
+public class ServiceWrapper implements InvocationHandler, Administrable {
 
     private static final Logger logger = Logger.getLogger(ServiceWrapper.class.getSimpleName());
 
@@ -17,11 +57,36 @@ public class ServiceWrapper implements I
     private ServiceTemplate template;
     private Object proxy;
 
-    public ServiceWrapper(final ServiceFinder finder, final ServiceTemplate template) {
+    /**
+     * Ideally, this cntr would be invoked from the <code>SelfHealingServiceFactory</code>
+     * but there is no reason why this should be enforced.
+     * 
+     * It simply creates the <code>ServiceWrapper</code> with a lazy-located
+     * service proxy based on the input template.
+     * 
+     * @param finder - The specific method for locating services in the djinn
+     * @param template - The template used for finding replacement services
+     */
+    ServiceWrapper(final ServiceFinder finder, final ServiceTemplate template) {
         setServiceFinder(finder);
         setServiceTemplate(template);
     }
 
+    /**
+     * This method attempts the invoke the specified method call on the service.
+     * If that method call fails then an attempt it made to find a replacement
+     * service and the method call is re-executed against the new service.
+     * Assuming one is found.
+     * 
+     * If the second method invokation fails then the exception is thrown back
+     * to the caller.
+     * 
+     * Inherited from <code>InvocationHandler</code>, this forms the basis of
+     * our reflection based wrapper.  Usually the input object is the one to
+     * have the method invoked on it, since we are looking up and using our
+     * own services proxies, this argument is ignored.
+     * 
+     */
     public Object invoke(final Object ignored, final Method method, final Object[] args) throws Throwable {
         initServiceProxy();
 
@@ -48,8 +113,22 @@ public class ServiceWrapper implements I
         return response;
     }
 
+    /**
+     * Convenience method to return the <code>Administrable</code> object from
+     * the service proxy.  It assumes that the service proxy implements this
+     * interface, and if it does not the <code>ClassCastException</code> is
+     * thrown to the caller.
+     * 
+     * NOTE: Not personally convinced that this is necessary...
+     */
+    public Object getAdmin() throws RemoteException {
+        if(null == this.proxy) {
+            throw new RemoteException("No service proxy");
+        }
+        return ((Administrable)this.proxy).getAdmin();
+    }
 
-    protected Object execute(final Method method, final Object[] args) throws RemoteException {
+    private Object execute(final Method method, final Object[] args) throws RemoteException {
         try {
             logger.finest("Invoking method ["+method+"] on "+this.proxy);
             return method.invoke(this.proxy, args);
@@ -83,4 +162,4 @@ public class ServiceWrapper implements I
         this.template = template;
     }
 
-}
+}
\ No newline at end of file



Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Sim IJskes - QCG <si...@qcg.nl>.
On 02-11-10 13:49, Patricia Shanahan wrote:
>
> Do you think it will interfere with the javaspace and txnmanager
> categories?

No, dont thinks so.

> If not, I say let it run. It would be nice to get a completely clean
> run, but I don't want to delay development for that. The main thing is
> to see Hudson at least try the full set, and run clean (assuming I did
> my testing right) on the new categories.

You will get the results from Ubuntu as well as Solaris.

Gr. Sim

-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Den Haag: 28088397

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Patricia Shanahan <pa...@acm.org>.
Sim IJskes - QCG wrote:
> On 02-11-10 13:43, Patricia Shanahan wrote:
>>> I've left a syntax error in
>>>
>>> qa/src/com/sun/jini/test/spec/loader/pref/requireDlPermProvider/loader.policy 
>>>
>>>
>>>
>>> can you live with that for now? Or shall i fix and restart the jobs?
>>
>> Can Hudson live with it? Will it prevent a full run of the QA tests?
> 
> No, but it will have at least 1 error.

Do you think it will interfere with the javaspace and txnmanager 
categories?

If not, I say let it run. It would be nice to get a completely clean 
run, but I don't want to delay development for that. The main thing is 
to see Hudson at least try the full set, and run clean (assuming I did 
my testing right) on the new categories.

Patricia

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Sim IJskes - QCG <si...@qcg.nl>.
On 02-11-10 13:43, Patricia Shanahan wrote:
>> I've left a syntax error in
>>
>> qa/src/com/sun/jini/test/spec/loader/pref/requireDlPermProvider/loader.policy
>>
>>
>> can you live with that for now? Or shall i fix and restart the jobs?
>
> Can Hudson live with it? Will it prevent a full run of the QA tests?

No, but it will have at least 1 error.

Gr. Sim

-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Den Haag: 28088397

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Patricia Shanahan <pa...@acm.org>.
Sim IJskes - QCG wrote:
> On 02-11-10 13:01, Patricia Shanahan wrote:
>> Sim IJskes - QCG wrote:
>>> On 02-11-10 12:22, Tom Hobbs wrote:
>>>> I'd like to give people a chance to pass their eye over it first. It
>>>> is just a reference implementation/example of how to do a certain
>>>> thing. I doubt that the code is bullet proof.
>>>
>>> If there is something wrong with it, people can file a jira for it.
>>>
>>> The selfhealingproxy is in the extra section, and there are not a lot
>>> of river parts depending on it, so my stake would be: commit it.
>>
>> I'd like a short delay before the next significant surgery on the trunk.
>>
>> Yesterday, I checked in a qa/build.xml change that should increase by
>> several hundred the number of tests in a full QA run. I've also checked
>> in bug fixes that make those tests pass, at least on my computer. Can we
>> hold off until there has been a clean Hudson run with the added tests?
>>
>> Patricia
>>
> 
> I've left a syntax error in
> 
> qa/src/com/sun/jini/test/spec/loader/pref/requireDlPermProvider/loader.policy 
> 
> 
> can you live with that for now? Or shall i fix and restart the jobs?

Can Hudson live with it? Will it prevent a full run of the QA tests?

Patricia

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Sim IJskes - QCG <si...@qcg.nl>.
On 02-11-10 13:01, Patricia Shanahan wrote:
> Sim IJskes - QCG wrote:
>> On 02-11-10 12:22, Tom Hobbs wrote:
>>> I'd like to give people a chance to pass their eye over it first. It
>>> is just a reference implementation/example of how to do a certain
>>> thing. I doubt that the code is bullet proof.
>>
>> If there is something wrong with it, people can file a jira for it.
>>
>> The selfhealingproxy is in the extra section, and there are not a lot
>> of river parts depending on it, so my stake would be: commit it.
>
> I'd like a short delay before the next significant surgery on the trunk.
>
> Yesterday, I checked in a qa/build.xml change that should increase by
> several hundred the number of tests in a full QA run. I've also checked
> in bug fixes that make those tests pass, at least on my computer. Can we
> hold off until there has been a clean Hudson run with the added tests?
>
> Patricia
>

I've left a syntax error in

qa/src/com/sun/jini/test/spec/loader/pref/requireDlPermProvider/loader.policy

can you live with that for now? Or shall i fix and restart the jobs?

Gr. Sim

-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Den Haag: 28088397

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Sim IJskes - QCG <si...@qcg.nl>.
On 02-11-10 13:01, Patricia Shanahan wrote:
> Yesterday, I checked in a qa/build.xml change that should increase by
> several hundred the number of tests in a full QA run. I've also checked
> in bug fixes that make those tests pass, at least on my computer. Can we
> hold off until there has been a clean Hudson run with the added tests?

OK, i've aborted the QA run. It was running with the permission 
exception. I will restart the job, and hope we have no hanging processes.

Gr. Sim

-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Den Haag: 28088397

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Tom Hobbs <tv...@googlemail.com>.
On the one hand, this stuff is completely separate from the core River
code, so it's inclusion shouldn't have any effect on any of the stuff
you or anyone else has done recently.

On the other hand, I gone through enough stress in the past trying to
work out why something failed when something unrelated "shouldn't have
[had] any effect" on the task in hand.  :-)

So, I'm happy to wait on moving it into the trunk until the build has
settled down.



On Tue, Nov 2, 2010 at 12:01 PM, Patricia Shanahan <pa...@acm.org> wrote:
> Sim IJskes - QCG wrote:
>>
>> On 02-11-10 12:22, Tom Hobbs wrote:
>>>
>>> I'd like to give people a chance to pass their eye over it first.  It
>>> is just a reference implementation/example of how to do a certain
>>> thing.  I doubt that the code is bullet proof.
>>
>> If there is something wrong with it, people can file a jira for it.
>>
>> The selfhealingproxy is in the extra section, and there are not a lot of
>> river parts depending on it, so my stake would be: commit it.
>
> I'd like a short delay before the next significant surgery on the trunk.
>
> Yesterday, I checked in a qa/build.xml change that should increase by
> several hundred the number of tests in a full QA run. I've also checked in
> bug fixes that make those tests pass, at least on my computer. Can we hold
> off until there has been a clean Hudson run with the added tests?
>
> Patricia
>
>

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Patricia Shanahan <pa...@acm.org>.
Sim IJskes - QCG wrote:
> On 11/02/2010 06:49 PM, Sim IJskes - QCG wrote:
>> Thats why i'm committing my changes.
> 
> But then again, committing while downstream email is down, looks like 
> unwise. I'll hold.

E-mail seems to be working - at least, I saw your messages - so go ahead.

Patricia

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Sim IJskes - QCG <si...@qcg.nl>.
On 11/02/2010 06:49 PM, Sim IJskes - QCG wrote:
> Thats why i'm committing my changes.

But then again, committing while downstream email is down, looks like 
unwise. I'll hold.

Gr. Sim

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Sim IJskes - QCG <si...@qcg.nl>.
On 11/02/2010 01:01 PM, Patricia Shanahan wrote:
> I'd like a short delay before the next significant surgery on the trunk.

I've thought long and hard about this.

1) when the build fails, some stability could aid the fixing, but then, 
you cannot hold off changes to the trunk until you have fixed it. 
Reproducing the failure can be done on your own workstation, or if 
facilities are not enough in an extra hudson jobs, by checking out a 
specific release. If this is needed i will help you.

2) when the build succeeds, everything is ok.

The builds currently underway will not be changed/influenced by changes 
in the svn.

Modifications of files to me look like minor surgery.

Thats why i'm committing my changes.

Gr. Sim

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Patricia Shanahan <pa...@acm.org>.
Sim IJskes - QCG wrote:
> On 02-11-10 12:22, Tom Hobbs wrote:
>> I'd like to give people a chance to pass their eye over it first.  It
>> is just a reference implementation/example of how to do a certain
>> thing.  I doubt that the code is bullet proof.
> 
> If there is something wrong with it, people can file a jira for it.
> 
> The selfhealingproxy is in the extra section, and there are not a lot of 
> river parts depending on it, so my stake would be: commit it.

I'd like a short delay before the next significant surgery on the trunk.

Yesterday, I checked in a qa/build.xml change that should increase by 
several hundred the number of tests in a full QA run. I've also checked 
in bug fixes that make those tests pass, at least on my computer. Can we 
hold off until there has been a clean Hudson run with the added tests?

Patricia


Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Sim IJskes - QCG <si...@qcg.nl>.
On 02-11-10 12:22, Tom Hobbs wrote:
> I'd like to give people a chance to pass their eye over it first.  It
> is just a reference implementation/example of how to do a certain
> thing.  I doubt that the code is bullet proof.

If there is something wrong with it, people can file a jira for it.

The selfhealingproxy is in the extra section, and there are not a lot of 
river parts depending on it, so my stake would be: commit it.

>
> Like I said in a different message, I still think it's belongs in the
> trunk eventually though.  I'm happy to do the SVN-moving as well; as
> long as people are prepared to forgive my inevitable SVN
> fat-fingering.

I've prepared src-extra/org/apache/river/extra/selfhealing/ for it, so 
if you can move it there, that would be nice.

Then it will also be picked up by the build script in trunk, and put in 
the extra.jar

It was my intention to have it build in a jar that could optionally be 
added to river. That means in the order of dependencies built somewhat 
later than the other river.jars.

Gr. Sim

-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Den Haag: 28088397

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Tom Hobbs <tv...@googlemail.com>.
I'd like to give people a chance to pass their eye over it first.  It
is just a reference implementation/example of how to do a certain
thing.  I doubt that the code is bullet proof.

Like I said in a different message, I still think it's belongs in the
trunk eventually though.  I'm happy to do the SVN-moving as well; as
long as people are prepared to forgive my inevitable SVN
fat-fingering.


On Tue, Nov 2, 2010 at 11:19 AM, Sim IJskes - QCG <si...@qcg.nl> wrote:
> On 02-11-10 12:06, thobbs@apache.org wrote:
>>
>> Author: thobbs
>> Date: Tue Nov  2 11:06:43 2010
>> New Revision: 1030001
>>
>> URL: http://svn.apache.org/viewvc?rev=1030001&view=rev
>> Log:
>> Tidied up code for the self-healing proxy demonstration.  Plenty of
>> javadocs as well.
>>
>
> Shall we integrate this in the trunk now?
>
> Gr. Sim
>
>
> --
> QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
> Quality Consultancy Group b.v., Leiderdorp, Kvk Den Haag: 28088397
>

Re: svn commit: r1030001 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra: discovery/ selfhealing/

Posted by Sim IJskes - QCG <si...@qcg.nl>.
On 02-11-10 12:06, thobbs@apache.org wrote:
> Author: thobbs
> Date: Tue Nov  2 11:06:43 2010
> New Revision: 1030001
>
> URL: http://svn.apache.org/viewvc?rev=1030001&view=rev
> Log:
> Tidied up code for the self-healing proxy demonstration.  Plenty of javadocs as well.
>

Shall we integrate this in the trunk now?

Gr. Sim


-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Den Haag: 28088397