Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 27804 invoked from network); 24 Oct 2008 16:16:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Oct 2008 16:16:50 -0000 Received: (qmail 49892 invoked by uid 500); 24 Oct 2008 16:16:53 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 49777 invoked by uid 500); 24 Oct 2008 16:16:53 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 49768 invoked by uid 99); 24 Oct 2008 16:16:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Oct 2008 09:16:53 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Oct 2008 16:15:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4866C238885D; Fri, 24 Oct 2008 09:15:51 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r707671 - in /cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks: AbstractClientHook.java AbstractHook.java ServiceHookUtils.java Date: Fri, 24 Oct 2008 16:15:50 -0000 To: commits@cxf.apache.org From: eglynn@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081024161551.4866C238885D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: eglynn Date: Fri Oct 24 09:15:49 2008 New Revision: 707671 URL: http://svn.apache.org/viewvc?rev=707671&view=rev Log: [dOSGi] removing a bunch of tabs inserted by eclipse Modified: cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/AbstractClientHook.java cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/AbstractHook.java cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtils.java Modified: cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/AbstractClientHook.java URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/AbstractClientHook.java?rev=707671&r1=707670&r2=707671&view=diff ============================================================================== --- cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/AbstractClientHook.java (original) +++ cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/AbstractClientHook.java Fri Oct 24 09:15:49 2008 @@ -51,15 +51,15 @@ String filter, boolean matchAll, boolean allServices) { - processServiceDescriptions(getServiceDescriptions(requestingContext, interfaceName, filter, false), - requestingContext, - interfaceName, - filter, + processServiceDescriptions(getServiceDescriptions(requestingContext, interfaceName, filter, false), + requestingContext, + interfaceName, + filter, allServices); } protected void processServiceDescriptions(List sds, - BundleContext requestingContext, + BundleContext requestingContext, String interfaceName, String filter, boolean allServices) { @@ -106,14 +106,12 @@ } } - //actualSds.add(sd); } } catch (ClassNotFoundException ex) { LOG.warning("No class can be found for " + interfaceName); continue; } } - //return actualSds; } @SuppressWarnings("unchecked") @@ -144,58 +142,57 @@ // found some SDs as it may find more suitable SDs ? if (sds.isEmpty()) { // try discovery service - - // REVISIT Discovery RI will change soon to use standard "objectClass" - // property key, instead of "interface-name". At that point we can - // just reuse the given filter instead of constructing a modified one. Also - // we currently throw away any filter predicates unrelated to the interface - // name, which is clearly inappropriate. - - String modifiedFilter = - "(" + ServiceEndpointDescription.PROP_KEY_INTERFACE_NAME - + "=" + interfaceName + ")"; + + // REVISIT Discovery RI will change soon to use standard "objectClass" + // property key, instead of "interface-name". At that point we can + // just reuse the given filter instead of constructing a modified one. Also + // we currently throw away any filter predicates unrelated to the interface + // name, which is clearly inappropriate. + + String modifiedFilter = + "(" + ServiceEndpointDescription.PROP_KEY_INTERFACE_NAME + + "=" + interfaceName + ")"; - Collection discovered = - getFromDiscoveryService(interfaceName, modifiedFilter); - if (discovered.size() != 0) { - LOG.info("synchronous lookup discovered " + discovered.size() - + " references for interface: " + interfaceName); + Collection discovered = + getFromDiscoveryService(interfaceName, modifiedFilter); + if (discovered.size() != 0) { + LOG.info("synchronous lookup discovered " + discovered.size() + + " references for interface: " + interfaceName); sds.addAll(discovered); - } else { - LOG.info("nothing discovered initially for interface: " - + interfaceName + ", fallback to async lookup"); - if (filterValue != null && filterValue.length() > 0) { - LOG.fine("installing service listener for: " + modifiedFilter); - listenToDiscoveryService( - new ServiceListener() { - public void serviceAvailable(ServiceEndpointDescription sd) { - LOG.info("received serviceAvailable callback: " - + sd.getProperties()); - List notified = - new ArrayList(); - notified.add(sd); - processServiceDescriptions(notified, - context, - interfaceName, - filterValue, - matchAll); - LOG.fine("removing service listener : " + this); - unlistenToDiscoveryService(this); - } - public void serviceModified(ServiceEndpointDescription oldSD, - ServiceEndpointDescription newSD) { - // we don't currently use this notification, but we could do - // so to allow to support transparent service re-location - } - - public void serviceUnavailable(ServiceEndpointDescription sd) { - // we don't currently use this notification, but we could do - // so to allow to drive transparent fail-over - } - }, - modifiedFilter); - } - } + } else { + LOG.info("nothing discovered initially for interface: " + + interfaceName + ", fallback to async lookup"); + if (filterValue != null && filterValue.length() > 0) { + LOG.fine("installing service listener for: " + modifiedFilter); + listenToDiscoveryService( + new ServiceListener() { + public void serviceAvailable(ServiceEndpointDescription sd) { + LOG.info("received serviceAvailable callback: " + + sd.getProperties()); + List notified = + new ArrayList(); + notified.add(sd); + processServiceDescriptions(notified, + context, + interfaceName, + filterValue, + matchAll); + LOG.fine("removing service listener : " + this); + unlistenToDiscoveryService(this); + } + public void serviceModified(ServiceEndpointDescription oldSD, + ServiceEndpointDescription newSD) { + // we don't currently use this notification, but we could do + // so to allow to support transparent service re-location + } + public void serviceUnavailable(ServiceEndpointDescription sd) { + // we don't currently use this notification, but we could do + // so to allow to drive transparent fail-over + } + }, + modifiedFilter); + } + } } // do it just in case too for the moment Modified: cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/AbstractHook.java URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/AbstractHook.java?rev=707671&r1=707670&r2=707671&view=diff ============================================================================== --- cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/AbstractHook.java (original) +++ cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/AbstractHook.java Fri Oct 24 09:15:49 2008 @@ -114,7 +114,7 @@ } protected Collection listenToDiscoveryService( - ServiceListener listener, String filterValue) { + ServiceListener listener, String filterValue) { OsgiService pair = OsgiUtils.getOsgiService(getContext(), Discovery.class); if (pair != null) { @@ -129,7 +129,7 @@ } protected Collection unlistenToDiscoveryService( - ServiceListener listener) { + ServiceListener listener) { OsgiService pair = OsgiUtils.getOsgiService(getContext(), Discovery.class); if (pair != null) { Modified: cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtils.java URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtils.java?rev=707671&r1=707670&r2=707671&view=diff ============================================================================== --- cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtils.java (original) +++ cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtils.java Fri Oct 24 09:15:49 2008 @@ -55,8 +55,8 @@ Map endpointInterfaces = getJavaInterfaceEndpointInterfaceMap(sd); Map properties = getPropertiesMap(sd); LOG.info("publish java interfaces: " + javaInterfaces - + ",\nendpoint interfaces: " + endpointInterfaces - + ",\nproperties: " + properties); + + ",\nendpoint interfaces: " + endpointInterfaces + + ",\nproperties: " + properties); sdPublished = pair.getService().publishService(javaInterfaces, endpointInterfaces, @@ -96,8 +96,9 @@ interfaceClass, serviceObject); } catch (IntentUnsatifiedException iue) { - LOG.info("Did not remote service " + sd.getInterfaceNames()[0] + " because intent " + - iue.getIntent() + " could not be satisfied"); + LOG.info("Did not remote service " + sd.getInterfaceNames()[0] + + " because intent " + iue.getIntent() + + " could not be satisfied"); } catch (Exception ex) { LOG.warning("WARNING : Problem creating a remote endpoint for " + sd.getInterfaceNames()[0] + " from CXF PublishHook, reason is " + ex.getMessage());