IIRC, I have changed most of the code to get ServiceDiscovery from ExtensionPointRegistry. This way, we can remove the need to access ServiceDiscovery.getInstance() (evil singleton:-).

Thanks,
Raymond
--------------------------------------------------
From: "Simon Laws" <[email protected]>
Sent: Thursday, April 15, 2010 1:32 AM
To: <[email protected]>; <[email protected]>
Subject: Re: svn commit: r934318 - /tuscany/sca-java-2.x/trunk/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java

On Thu, Apr 15, 2010 at 8:54 AM, ant elder <[email protected]> wrote:
On Thu, Apr 15, 2010 at 8:50 AM, Simon Laws <[email protected]> wrote:
On Thu, Apr 15, 2010 at 8:39 AM,  <[email protected]> wrote:
Author: antelder
Date: Thu Apr 15 07:39:47 2010
New Revision: 934318

URL: http://svn.apache.org/viewvc?rev=934318&view=rev
Log:
Add TODO comment about problem in ServiceDiscovery

Modified:

tuscany/sca-java-2.x/trunk/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java

Modified: tuscany/sca-java-2.x/trunk/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java?rev=934318&r1=934317&r2=934318&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java (original) +++ tuscany/sca-java-2.x/trunk/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java Thu Apr 15 07:39:47 2010
@@ -38,6 +38,9 @@ import org.apache.tuscany.sca.extensibil
* Services are described using configuration files in META-INF/services. * Service description specifies a class name followed by optional properties.
 *
+ * TODO: this is broken as it uses a static INSTANCE but non-static serviceAttributes + * and discoverer so the same INSTANCE gets used across NodeFactories and picks up
+ * old values
 *
 * @version $Rev$ $Date$
 */




Hi Ant

What was the particular problem you're seeing? I assume that for a
given JVM the set of extensions present would be the same but you're
saying this is causing problems?

Simon

--
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com


For example when using the NodeFactory newInstance that takes some
attributes and the attributues that actually get used are the ones
from the first time NodeFactory.newInstance was called.

  ...ant


So you're looking for the various extension points (the factories I
guess) to be configured on a NodeFactory by NodeFactory basis.

Simon

--
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Reply via email to