On Wed, Jul 13, 2011 at 3:01 PM, Simon Laws <simonsl...@googlemail.com> wrote: > On Wed, Jul 13, 2011 at 2:44 PM, Mike Edwards > <mike.edwards.inglen...@gmail.com> wrote: >> Folks, >> >> I understand that there are some problems with the standard OASIS Java >> Client API that are affecting Tuscany. >> >> I'd be grateful if people who know about these problems could list the >> problems and the proposed fixes - there is a short window of opportunity to >> get the OASIS code updated, if the problems and the fixes can be fully >> described. >> >> >> Yours, Mike. >> > > The changes we currently have are. > > 1/ Put a doPrivileged around the call to get TCCL > > http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/impl/SCAClientFactoryFinderImpl.java?r1=1145485&r2=1145484&pathrev=1145485 > > 2/ Allow for null domain name > > http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/client/impl/SCAClientFactoryFinderImpl.java?r1=1140682&r2=1140681&pathrev=1140682 >
The reason for using null in the domain URI is an attempt to get a "default" domain, I'm not totally sure how much sense that really makes so an alternative could be for the spec group could comment on the default domain concept and maybe instead just documenting that it shouldn't be null or even changing the SCAClientFactory.newInstance to validate its not null. > I also note that Ant raised a comment on the OASIS list but it never > made it as far as a registered issue. > > http://markmail.org/message/scgm4ygpkmo6bxbv#query:+page:1+mid:scgm4ygpkmo6bxbv+state:results > A diff for a change to implement that is: Index: src/main/java/org/oasisopen/sca/client/impl/SCAClientFactoryFinderImpl.java =================================================================== --- src/main/java/org/oasisopen/sca/client/impl/SCAClientFactoryFinderImpl.java (revision 1146630) +++ src/main/java/org/oasisopen/sca/client/impl/SCAClientFactoryFinderImpl.java (working copy) @@ -79,7 +79,7 @@ classLoader); final SCAClientFactory factory = instantiateSCAClientFactoryClass(factoryImplClass, - domainURI ); + domainURI, properties ); return factory; } @@ -258,14 +258,14 @@ */ 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(