Author: slaws
Date: Thu Sep 22 12:22:20 2011
New Revision: 1174086

URL: http://svn.apache.org/viewvc?rev=1174086&view=rev
Log:
TUSCANY-3950 - Catch up with some differences in the OASIS SCA API classes. 
Tuscany now matches OASIS svn r286

Modified:
    
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessor.java
    
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessorTestCase.java
    
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorPropertyTestCase.java
    
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorReferenceTestCase.java
    
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorResourceTestCase.java
    
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/Constants.java
    
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Constructor.java
    
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedTransaction.java
    
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/SCAClientFactory.java
    
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/SCAClientFactoryFinder.java
    
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/impl/SCAClientFactoryFinderImpl.java

Modified: 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessor.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessor.java?rev=1174086&r1=1174085&r2=1174086&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessor.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessor.java
 Thu Sep 22 12:22:20 2011
@@ -76,11 +76,6 @@ public class ConstructorProcessor extend
             type.setConstructor(definition);
         }
         JavaParameterImpl[] parameters = definition.getParameters();
-        String[] value = annotation.value();
-        boolean isDefault = value.length == 0 || (value.length == 1 && 
"".equals(value[0]));
-        if (!isDefault && value.length != parameters.length) {
-            throw new InvalidConstructorException("Invalid Number of names in 
@Constructor");
-        }
         
         for (JavaParameterImpl p : parameters) {
             if (!hasAnnotation(p)) {
@@ -88,9 +83,6 @@ public class ConstructorProcessor extend
             }
         }
 
-        for (int i = 0; i < parameters.length; i++) {
-            parameters[i].setName(i < value.length ? value[i] : "");
-        }
         type.setConstructor(definition);
     }
 

Modified: 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessorTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessorTestCase.java?rev=1174086&r1=1174085&r2=1174086&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessorTestCase.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessorTestCase.java
 Thu Sep 22 12:22:20 2011
@@ -42,6 +42,7 @@ import org.apache.tuscany.sca.implementa
 import org.apache.tuscany.sca.implementation.java.JavaParameterImpl;
 import org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.oasisopen.sca.annotation.Property;
 import org.oasisopen.sca.annotation.Reference;
@@ -65,6 +66,7 @@ public class ConstructorProcessorTestCas
         }
     }
 
+    @Ignore("TUSCANY-3950") // no names in constructor annotation now
     @Test
     public void testConstructorAnnotation() throws Exception {
         JavaImplementation type = 
javaImplementationFactory.createJavaImplementation();
@@ -117,19 +119,19 @@ public class ConstructorProcessorTestCas
 
     private static class BadFoo {
 
-        @org.oasisopen.sca.annotation.Constructor("foo")
+        @org.oasisopen.sca.annotation.Constructor()
         public BadFoo(String foo) {
 
         }
 
-        @org.oasisopen.sca.annotation.Constructor( {"foo", "bar"})
-        public BadFoo(String foo, String bar) {
+        @org.oasisopen.sca.annotation.Constructor()
+        public BadFoo(@Property String foo, @Property String bar) {
 
         }
     }
 
     private static class Foo {
-        @org.oasisopen.sca.annotation.Constructor("foo")
+        @org.oasisopen.sca.annotation.Constructor()
         public Foo(@Property String foo) {
 
         }
@@ -141,8 +143,8 @@ public class ConstructorProcessorTestCas
     }
 
     private static class BadAnnotation {
-        @org.oasisopen.sca.annotation.Constructor("foo")
-        public BadAnnotation(String foo, Foo ref) {
+        @org.oasisopen.sca.annotation.Constructor()
+        public BadAnnotation(@Property String foo, Foo ref) {
         }
     }
 

Modified: 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorPropertyTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorPropertyTestCase.java?rev=1174086&r1=1174085&r2=1174086&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorPropertyTestCase.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorPropertyTestCase.java
 Thu Sep 22 12:22:20 2011
@@ -31,6 +31,7 @@ import java.util.List;
 import 
org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
 import org.apache.tuscany.sca.implementation.java.JavaImplementationFactory;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.oasisopen.sca.annotation.Property;
 
@@ -99,11 +100,12 @@ public class ConstructorPropertyTestCase
         try {
             visitConstructor(ctor, type);
             fail();
-        } catch (InvalidConstructorException e) {
+        } catch (InvalidPropertyException e) {
             // expected
         }
     }
 
+    @Ignore("TUSCANY-3950") // no names in constructor annotation now
     @Test
     public void testNoMatchingNames() throws Exception {
         JavaImplementation type = 
javaImplementationFactory.createJavaImplementation();
@@ -129,8 +131,8 @@ public class ConstructorPropertyTestCase
 
         }
 
-        @org.oasisopen.sca.annotation.Constructor("myProp")
-        public Foo(@Property Integer prop) {
+        @org.oasisopen.sca.annotation.Constructor()
+        public Foo(@Property(name = "myProp") Integer prop) {
 
         }
 
@@ -157,13 +159,13 @@ public class ConstructorPropertyTestCase
 
         }
 
-        @org.oasisopen.sca.annotation.Constructor("myProp")
-        public BadFoo(@Property Integer prop, @Property Integer prop2) {
+        @org.oasisopen.sca.annotation.Constructor()
+        public BadFoo(@Property(name = "myProp") Integer prop, @Property 
Integer prop2) {
 
         }
 
-        @org.oasisopen.sca.annotation.Constructor({"myRef", "myRef2"})
-        public BadFoo(@Property List ref, @Property(name = "myOtherRef")List 
ref2) {
+        @org.oasisopen.sca.annotation.Constructor()
+        public BadFoo(@Property(name = "myRef") List ref, @Property(name = 
"myOtherRef")List ref2) {
 
         }
 

Modified: 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorReferenceTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorReferenceTestCase.java?rev=1174086&r1=1174085&r2=1174086&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorReferenceTestCase.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorReferenceTestCase.java
 Thu Sep 22 12:22:20 2011
@@ -105,7 +105,7 @@ public class ConstructorReferenceTestCas
         try {
             visitConstructor(ctor, type);
             fail();
-        } catch (InvalidConstructorException e) {
+        } catch (InvalidReferenceException e) {
             // expected
         }
     }
@@ -139,7 +139,7 @@ public class ConstructorReferenceTestCas
 
         }
 
-        @org.oasisopen.sca.annotation.Constructor("myRef2")
+        @org.oasisopen.sca.annotation.Constructor()
         public Foo(@Reference(name = "myRef2") Integer prop) {
 
         }
@@ -170,12 +170,12 @@ public class ConstructorReferenceTestCas
 
         }
 
-        @org.oasisopen.sca.annotation.Constructor("myRef")
+        @org.oasisopen.sca.annotation.Constructor()
         public BadFoo(@Reference Integer ref, @Reference Integer ref2) {
 
         }
 
-        @org.oasisopen.sca.annotation.Constructor({"myRef", "myRef2"})
+        @org.oasisopen.sca.annotation.Constructor()
         public BadFoo(@Reference List ref, @Reference(name = "myOtherRef")List 
ref2) {
 
         }

Modified: 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorResourceTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorResourceTestCase.java?rev=1174086&r1=1174085&r2=1174086&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorResourceTestCase.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorResourceTestCase.java
 Thu Sep 22 12:22:20 2011
@@ -28,6 +28,7 @@ import java.util.List;
 import 
org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
 import org.apache.tuscany.sca.implementation.java.JavaImplementationFactory;
+import org.junit.Ignore;
 import org.junit.Test;
 
 /**
@@ -96,11 +97,12 @@ public class ConstructorResourceTestCase
         try {
             visitConstructor(ctor, type);
             fail();
-        } catch (InvalidConstructorException e) {
+        } catch (InvalidResourceException e) {
             // expected
         }
     }
 
+    @Ignore("TUSCANY-3950") // no names in constructor annotation now
     @Test
     public void testNoMatchingNames() throws Exception {
         JavaImplementation type = 
javaImplementationFactory.createJavaImplementation();
@@ -121,8 +123,8 @@ public class ConstructorResourceTestCase
 
         }
 
-        @org.oasisopen.sca.annotation.Constructor("myResource")
-        public Foo(@Resource Integer resource) {
+        @org.oasisopen.sca.annotation.Constructor()
+        public Foo(@Resource(name = "myResource") Integer resource) {
 
         }
 
@@ -149,13 +151,13 @@ public class ConstructorResourceTestCase
 
         }
 
-        @org.oasisopen.sca.annotation.Constructor("myProp")
-        public BadFoo(@Resource Integer res, @Resource Integer res2) {
+        @org.oasisopen.sca.annotation.Constructor()
+        public BadFoo(@Resource(name = "myResource") Integer res, @Resource 
Integer res2) {
 
         }
 
-        @org.oasisopen.sca.annotation.Constructor({"myRes", "myRes2"})
-        public BadFoo(@Resource List res, @Resource(name = "myOtherRes") List 
res2) {
+        @org.oasisopen.sca.annotation.Constructor()
+        public BadFoo(@Resource(name = "myResource") List res, @Resource(name 
= "myOtherRes") List res2) {
 
         }
 

Modified: 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/Constants.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/Constants.java?rev=1174086&r1=1174085&r2=1174086&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/Constants.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/Constants.java
 Thu Sep 22 12:22:20 2011
@@ -11,7 +11,7 @@ package org.oasisopen.sca;
  * <p> The serialized QNames are used with the @Requires annotation 
  * to specify a policy intent. The policy intent strings in this
  * interface do not have a corresponding Java annotation, so these
- * policy intents have ot be specified through the use of the
+ * policy intents have to be specified through the use of the
  * @Requires annotation.
  */
 public interface Constants {

Modified: 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Constructor.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Constructor.java?rev=1174086&r1=1174085&r2=1174086&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Constructor.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Constructor.java
 Thu Sep 22 12:22:20 2011
@@ -1,22 +1,23 @@
 /*
- * Copyright(C) OASIS(R) 2005,2009. All Rights Reserved.
+ * Copyright(C) OASIS(R) 2005,2010. All Rights Reserved.
  * OASIS trademark, IPR and other policies apply.
  */
 package org.oasisopen.sca.annotation;
 
 import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
 /**
- * Used to indicate the constructor the runtime is to use when instantiating a 
component implementation instance
- *
- * @version $Rev$ $Date$
+ * The @Constructor annotation is used to mark a particular
+ * constructor to use when instantiating a Java component
+ * implementation. If this constructor has parameters, each
+ * of these parameters MUST have either a @Property annotation
+ * or a @Reference annotation.
  */
 @Target(CONSTRUCTOR)
 @Retention(RUNTIME)
 public @interface Constructor {
-    String[] value() default "";
+
 }

Modified: 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedTransaction.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedTransaction.java?rev=1174086&r1=1174085&r2=1174086&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedTransaction.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedTransaction.java
 Thu Sep 22 12:22:20 2011
@@ -33,12 +33,12 @@ public @interface ManagedTransaction {
         * The serialized QName of the managedTransaction.local policy intent,
         * for use with the SCA @Requires annotation.
         */
-    String MANAGEDTRANSACTION_MESSAGE = MANAGEDTRANSACTION + ".local";
+    String MANAGEDTRANSACTION_LOCAL = MANAGEDTRANSACTION + ".local";
     /**
         * The serialized QName of the managedTransaction.global policy intent,
         * for use with the SCA @Requires annotation.
         */
-    String MANAGEDTRANSACTION_TRANSPORT = MANAGEDTRANSACTION + ".global";
+    String MANAGEDTRANSACTION_GLOBAL = MANAGEDTRANSACTION + ".global";
 
     /**
      * List of managedTransaction qualifiers (such as "global" or "local").

Modified: 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/SCAClientFactory.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/SCAClientFactory.java?rev=1174086&r1=1174085&r2=1174086&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/SCAClientFactory.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/SCAClientFactory.java
 Thu Sep 22 12:22:20 2011
@@ -145,8 +145,7 @@ public abstract class SCAClientFactory {
      * @return a proxy to the target service, in the specified SCA Domain 
      * that implements the business interface <B>.
      * @throws NoSuchServiceException Service requested was not found
-     * @throws NoSuchDomainException Domain requested was not found
      */
     public abstract <T> T getService(Class<T> interfaze, String serviceURI) 
-        throws NoSuchServiceException, NoSuchDomainException;    
+        throws NoSuchServiceException;    
 }

Modified: 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/SCAClientFactoryFinder.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/SCAClientFactoryFinder.java?rev=1174086&r1=1174085&r2=1174086&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/SCAClientFactoryFinder.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/SCAClientFactoryFinder.java
 Thu Sep 22 12:22:20 2011
@@ -10,7 +10,8 @@ import java.util.Properties;
 
 import org.oasisopen.sca.NoSuchDomainException;
 
-/* A Service Provider Interface representing a SCAClientFactory finder.  
+/**
+ * A Service Provider Interface representing a SCAClientFactory finder.  
  * SCA provides a default reference implementation of this interface.
  * SCA runtime vendors can create alternative implementations of this 
  * interface that use different class loading or lookup mechanisms.

Modified: 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/impl/SCAClientFactoryFinderImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/impl/SCAClientFactoryFinderImpl.java?rev=1174086&r1=1174085&r2=1174086&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/impl/SCAClientFactoryFinderImpl.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/impl/SCAClientFactoryFinderImpl.java
 Thu Sep 22 12:22:20 2011
@@ -4,6 +4,8 @@
  */
 package org.oasisopen.sca.client.impl;
 
+import org.oasisopen.sca.client.SCAClientFactoryFinder;
+
 import java.io.BufferedReader;
 import java.io.Closeable;
 import java.io.IOException;
@@ -19,7 +21,6 @@ import java.util.Properties;
 import org.oasisopen.sca.NoSuchDomainException;
 import org.oasisopen.sca.ServiceRuntimeException;
 import org.oasisopen.sca.client.SCAClientFactory;
-import org.oasisopen.sca.client.SCAClientFactoryFinder;
 
 /**
  * This is a default implementation of an SCAClientFactoryFinder which is 
@@ -61,6 +62,7 @@ public class SCAClientFactoryFinderImpl 
      * instance of the SCAClient
      * @param classLoader   ClassLoader that may be used when creating a new 
      * instance of the SCAClient
+     * @param domainURI                URI for the Domain to which this client 
instance is connected
      * @return new instance of the SCAClientFactory
      * @throws ServiceRuntimeException Failed to create SCAClientFactory
      * Implementation.
@@ -79,7 +81,7 @@ public class SCAClientFactoryFinderImpl 
                                                           classLoader);
                final SCAClientFactory factory =
                        instantiateSCAClientFactoryClass(factoryImplClass,
-                                                                  domainURI );
+                                                                  domainURI, 
properties );
                return factory;
        }
     
@@ -89,11 +91,12 @@ public class SCAClientFactoryFinderImpl 
      * @return The Context ClassLoader for the current Thread.
      */
     private static ClassLoader getThreadContextClassLoader () {
-        return AccessController.doPrivileged(new 
PrivilegedAction<ClassLoader>() {
-            public ClassLoader run() {
-                return Thread.currentThread().getContextClassLoader();
-            }
-        });
+        return AccessController.doPrivileged(
+                new PrivilegedAction<ClassLoader>() {
+             public ClassLoader run() {
+                 return Thread.currentThread().getContextClassLoader();
+             }
+         });
     }
 
     /**
@@ -101,6 +104,10 @@ public class SCAClientFactoryFinderImpl 
      * implementation from the specified Properties, the System Properties
      * or the specified ClassLoader.
      * 
+     * @param properties    Properties that may be used when creating a new 
+     * instance of the SCAClient
+     * @param classLoader   ClassLoader that may be used when creating a new 
+     * instance of the SCAClient
      * @return The class name of the SCAClientFactorySPI implementation
      * @throw ServiceRuntimeException Failed to find implementation for 
      * SCAClientFactorySPI.
@@ -134,6 +141,8 @@ public class SCAClientFactoryFinderImpl 
      * Attempts to find the class name for the SCAClientFactorySPI 
      * implementation from the specified Properties.
      * 
+     * @param properties    Properties that may be used when creating a new 
+     * instance of the SCAClient
      * @return The class name for the SCAClientFactorySPI implementation 
      * or <code>null</code> if not found.
      */
@@ -156,6 +165,8 @@ public class SCAClientFactoryFinderImpl 
      * Attempts to find the class name for the SCAClientFactorySPI 
      * implementation from the META-INF/services directory
      * 
+     * @param cl   ClassLoader that may be used when creating a new 
+     * instance of the SCAClient
      * @return The class name for the SCAClientFactorySPI implementation or
      * <code>null</code> if not found.
      */
@@ -218,6 +229,8 @@ public class SCAClientFactoryFinderImpl 
      * 
      * @param factoryImplClassName The name of the SCAClientFactory 
      * Implementation class to load
+     * @param classLoader   ClassLoader that may be used when creating a new 
+     * instance of the SCAClient
      * @return The specified SCAClientFactory Implementation class
      * @throws ServiceRuntimeException Failed to load the SCAClientFactory 
      * Implementation class 
@@ -252,20 +265,23 @@ public class SCAClientFactoryFinderImpl 
      *  
      * @param factoryImplClass The SCAClientFactorySPI Implementation 
      * class to instantiate.
+     * @param domainURI                URI for the Domain to which this client 
instance is connected
+     * @param properties    Properties that may be used when creating a new 
+     * instance of the SCAClient
      * @return An instance of the SCAClientFactorySPI Implementation class
      * @throws ServiceRuntimeException Failed to instantiate the specified 
      * specified SCAClientFactorySPI Implementation class  
      */
     private static SCAClientFactory instantiateSCAClientFactoryClass(
                        Class<? extends SCAClientFactory> factoryImplClass,
-                       URI domainURI)
+                       URI domainURI, Properties properties)
         throws NoSuchDomainException, ServiceRuntimeException {
         
         try {
             Constructor<? extends SCAClientFactory> URIConstructor = 
-               factoryImplClass.getConstructor(URI.class);
+               factoryImplClass.getConstructor(URI.class, Properties.class);
             SCAClientFactory provider = 
-               URIConstructor.newInstance( domainURI );
+               URIConstructor.newInstance( domainURI, properties );
             return provider;
         } catch (Throwable ex) {
             throw new ServiceRuntimeException(


Reply via email to