tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luciano Resende" <luckbr1...@gmail.com>
Subject Changes to ScriptInvoker not compatible with JDK 5, was Re: svn commit: r570495 - in /incubator/tuscany/java/sca/modules: assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ binding-notification/src/main/java/org/apache/tuscany/sca/b
Date Tue, 28 Aug 2007 22:46:44 GMT
Hi Sebastien

   The changes on ScriptInvoker, where you added the noSuchMethod
Exception is breaking the module build under JDK 5. I'll revert the
changes on that file for now.


On 8/28/07, jsdelfino@apache.org <jsdelfino@apache.org> wrote:
> Author: jsdelfino
> Date: Tue Aug 28 10:32:53 2007
> New Revision: 570495
>
> URL: http://svn.apache.org/viewvc?rev=570495&view=rev
> Log:
> Minor fixes to get the runtime working with JDK 6.0.
>
> Modified:
>     incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PropertyUtil.java
>     incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/encoding/EncodingUtils.java
>     incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionRepositoryImpl.java
>     incubator/tuscany/java/sca/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/services/ContributionRepositoryTestCase.java
>     incubator/tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java
>     incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/DefaultModelFactoryExtensionPoint.java
>     incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/service/DefaultContributionListenerExtensionPoint.java
>     incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistry.java
>     incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/context/SCADomainContext.java
>     incubator/tuscany/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBWrapperHandler.java
>     incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java
>     incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java
>     incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/TransformationContextImpl.java
>     incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/BeanUtil.java
>     incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/EmbeddedNode.java
>     incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/BindingsActivator.java
>     incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/ImplementationsActivator.java
>     incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/ResourceHelper.java
>     incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
>     incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicConstructorTestCase.java
>     incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java
>     incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeutisticExtensibleConstructorTestCase.java
>     incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/sca/implementation/script/ScriptInvoker.java
>     incubator/tuscany/java/sca/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java
>
> Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PropertyUtil.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PropertyUtil.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PropertyUtil.java
(original)
> +++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PropertyUtil.java
Tue Aug 28 10:32:53 2007
> @@ -91,6 +91,7 @@
>          URI uri = URI.create(file);
>          URL url = null;
>          if (!uri.isAbsolute()) {
> +            //FIXME Should already be given an absolute file
>              url = Thread.currentThread().getContextClassLoader().getResource(file);
>          } else {
>              url = uri.toURL();
>
> Modified: incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/encoding/EncodingUtils.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/encoding/EncodingUtils.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/encoding/EncodingUtils.java
(original)
> +++ incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/encoding/EncodingUtils.java
Tue Aug 28 10:32:53 2007
> @@ -35,10 +35,8 @@
>   */
>  public class EncodingUtils {
>
> -    private static XMLOutputFactory xof = XMLOutputFactory.newInstance("javax.xml.stream.XMLOuputFactory",
> -                                                                       EncodingUtils.class.getClassLoader());
> -    private static XMLInputFactory xif = XMLInputFactory.newInstance("javax.xml.stream.XMLInputFactory",
> -                                                                     EncodingUtils.class.getClassLoader());
> +    private static XMLOutputFactory xof = XMLOutputFactory.newInstance();
> +    private static XMLInputFactory xif = XMLInputFactory.newInstance();
>
>      public static void encodeToStream(EncodingRegistry encodingRegistry,
>                                        EncodingObject eo,
>
> Modified: incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionRepositoryImpl.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionRepositoryImpl.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionRepositoryImpl.java
(original)
> +++ incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionRepositoryImpl.java
Tue Aug 28 10:32:53 2007
> @@ -71,8 +71,9 @@
>       * Constructor with repository root
>       *
>       * @param repository
> +     * @param factory
>       */
> -    public ContributionRepositoryImpl(final String repository) throws IOException {
> +    public ContributionRepositoryImpl(final String repository, XMLInputFactory factory)
throws IOException {
>          String root = repository;
>          if (repository == null) {
>              root = AccessController.doPrivileged(new PrivilegedAction<String>()
{
> @@ -90,7 +91,7 @@
>          if (!rootFile.exists() || !rootFile.isDirectory() || !rootFile.canRead()) {
>              throw new IOException("The root is not a directory: " + repository);
>          }
> -        factory = XMLInputFactory.newInstance("javax.xml.stream.XMLInputFactory", getClass().getClassLoader());
> +        this.factory = factory;
>      }
>
>      public URI getDomain() {
>
> Modified: incubator/tuscany/java/sca/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/services/ContributionRepositoryTestCase.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/services/ContributionRepositoryTestCase.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/services/ContributionRepositoryTestCase.java
(original)
> +++ incubator/tuscany/java/sca/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/services/ContributionRepositoryTestCase.java
Tue Aug 28 10:32:53 2007
> @@ -23,6 +23,8 @@
>  import java.io.InputStream;
>  import java.net.URL;
>
> +import javax.xml.stream.XMLInputFactory;
> +
>  import junit.framework.TestCase;
>
>  import org.apache.tuscany.sca.contribution.service.impl.ContributionRepositoryImpl;
> @@ -34,7 +36,7 @@
>      @Override
>      protected void setUp() throws Exception {
>          // create repository (this should re-create the root directory)
> -        this.repository = new ContributionRepositoryImpl("target/repository/");
> +        this.repository = new ContributionRepositoryImpl("target/repository/", XMLInputFactory.newInstance());
>          repository.init();
>      }
>
>
> Modified: incubator/tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java
(original)
> +++ incubator/tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java
Tue Aug 28 10:32:53 2007
> @@ -42,6 +42,7 @@
>
>      public ClassReferenceModelResolver(Contribution contribution, ModelFactoryExtensionPoint
modelFactories) {
>          this.contribution = contribution;
> +        //FIXME The classloader should be passed in
>          this.classLoader = new WeakReference<ClassLoader>(Thread.currentThread().getContextClassLoader());
>      }
>
>
> Modified: incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/DefaultModelFactoryExtensionPoint.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/DefaultModelFactoryExtensionPoint.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/DefaultModelFactoryExtensionPoint.java
(original)
> +++ incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/DefaultModelFactoryExtensionPoint.java
Tue Aug 28 10:32:53 2007
> @@ -90,6 +90,8 @@
>
>                  // Dynamically load a factory class declared under META-INF/services
>                  ClassLoader classLoader = factoryInterface.getClassLoader();
> +                if (classLoader == null)
> +                    classLoader = ClassLoader.getSystemClassLoader();
>                  try {
>                      List<String> classNames = ServiceConfigurationUtil.getServiceClassNames(classLoader,
factoryInterface.getName());
>                      if (!classNames.isEmpty()) {
>
> Modified: incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/service/DefaultContributionListenerExtensionPoint.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/service/DefaultContributionListenerExtensionPoint.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/service/DefaultContributionListenerExtensionPoint.java
(original)
> +++ incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/service/DefaultContributionListenerExtensionPoint.java
Tue Aug 28 10:32:53 2007
> @@ -56,7 +56,7 @@
>              return;
>
>          // Get the databinding service declarations
> -        ClassLoader classLoader = ContributionListener.class.getClassLoader();
> +        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
>          List<String> listenerDeclarations;
>          try {
>              listenerDeclarations = ServiceConfigurationUtil.getServiceClassNames(classLoader,
ContributionListener.class.getName());
>
> Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistry.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistry.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistry.java
(original)
> +++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistry.java
Tue Aug 28 10:32:53 2007
> @@ -68,6 +68,9 @@
>
>              // Dynamically load an extension point class declared under META-INF/services
>              ClassLoader classLoader = extensionPointType.getClassLoader();
> +            if (classLoader == null) {
> +                classLoader = Thread.currentThread().getContextClassLoader();
> +            }
>              try {
>                  List<String> classNames = ServiceConfigurationUtil.getServiceClassNames(classLoader,
extensionPointType.getName());
>                  if (!classNames.isEmpty()) {
>
> Modified: incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/context/SCADomainContext.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/context/SCADomainContext.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/context/SCADomainContext.java
(original)
> +++ incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/context/SCADomainContext.java
Tue Aug 28 10:32:53 2007
> @@ -134,6 +134,7 @@
>          staxProcessors.addArtifactProcessor(new JavaImplementationProcessor(modelFactories));
>
>          // Create a resolver
> +        //FIXME The classloader should be passed in
>          ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
>          ModelResolverImpl resolver = new ModelResolverImpl(classLoader);
>
>
> Modified: incubator/tuscany/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBWrapperHandler.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBWrapperHandler.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBWrapperHandler.java
(original)
> +++ incubator/tuscany/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBWrapperHandler.java
Tue Aug 28 10:32:53 2007
> @@ -46,6 +46,7 @@
>              String factoryClassName = packageName + ".ObjectFactory";
>              ClassLoader classLoader = context != null ? context.getClassLoader() : null;
>              if (classLoader == null) {
> +                //FIXME Understand why we need this, the classloader should be passed
in
>                  classLoader = Thread.currentThread().getContextClassLoader();
>              }
>              Class<?> factoryClass = Class.forName(factoryClassName, true, classLoader);
>
> Modified: incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java
(original)
> +++ incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java
Tue Aug 28 10:32:53 2007
> @@ -89,6 +89,7 @@
>      private void importFactory(ImportSDO importSDO) throws ContributionResolveException
{
>          String factoryName = importSDO.getFactoryClassName();
>          if (factoryName != null) {
> +            //FIXME The classloader should be passed in
>              ClassLoader cl = Thread.currentThread().getContextClassLoader();
>              try {
>                  Class<?> factoryClass = cl.loadClass(factoryName);
> @@ -119,6 +120,7 @@
>                  if (uri.isAbsolute()) {
>                      wsdlURL = uri.toURL();
>                  }
> +                //FIXME The classloader should be passed in
>                  wsdlURL = Thread.currentThread().getContextClassLoader().getResource(location);
>                  if (null == wsdlURL) {
>                      ContributionResolveException loaderException = new ContributionResolveException(
>
> Modified: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java
(original)
> +++ incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java
Tue Aug 28 10:32:53 2007
> @@ -95,6 +95,8 @@
>          DataType targetType =
>              (index == size - 1) ? targetDataType : new DataTypeImpl<Object>(transformer.getTargetDataBinding(),
>                                                                              Object.class,
targetDataType.getLogical());
> +
> +        //FIXME The classloader should be passed in
>          ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
>          TransformationContext context = new TransformationContextImpl(sourceType, targetType,
classLoader, metadata);
>          return context;
>
> Modified: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/TransformationContextImpl.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/TransformationContextImpl.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/TransformationContextImpl.java
(original)
> +++ incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/TransformationContextImpl.java
Tue Aug 28 10:32:53 2007
> @@ -37,6 +37,7 @@
>
>      public TransformationContextImpl() {
>          super();
> +        //FIXME The classloader should be passed in
>          setClassLoader(Thread.currentThread().getContextClassLoader());
>      }
>
>
> Modified: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/BeanUtil.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/BeanUtil.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/BeanUtil.java
(original)
> +++ incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/BeanUtil.java
Tue Aug 28 10:32:53 2007
> @@ -72,6 +72,8 @@
>          try {
>              ClassLoader cl = beanObject.getClass().getClassLoader();
>              if (cl == null) {
> +                //FIXME Wouldn't it be better to use the current thread context
> +                // classloader?
>                  cl = ClassLoader.getSystemClassLoader();
>              }
>              String beanNS = beanName.getNamespaceURI();
>
> Modified: incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/EmbeddedNode.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/EmbeddedNode.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/EmbeddedNode.java
(original)
> +++ incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/EmbeddedNode.java
Tue Aug 28 10:32:53 2007
> @@ -61,6 +61,8 @@
>
>              // add management composite to the management domain
>              ContributionService contributionService = management.getContributionService();
> +
> +            //FIXME The classloader should be passed in
>              URL contributionURL = Thread.currentThread().getContextClassLoader().getResource("management/");
>
>              if ( contributionURL != null){
> @@ -154,6 +156,8 @@
>              if (contributionURL == null){
>                  // find the current directory as a URL. This is where our contribution
>                  // will come from
> +
> +                //FIXME The classloader should be passed in
>                  contributionURL = Thread.currentThread().getContextClassLoader().getResource(nodeName
+ "/");
>              }
>
>
> Modified: incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/BindingsActivator.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/BindingsActivator.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/BindingsActivator.java
(original)
> +++ incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/BindingsActivator.java
Tue Aug 28 10:32:53 2007
> @@ -61,8 +61,10 @@
>          ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
>          this.assemblyFactory = factories.getFactory(AssemblyFactory.class);
>
> +        //FIXME The classloader should be passed in
> +        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
>          this.bindingActivators =
> -            DiscoveryUtils.discoverActivators(BindingActivator.class, getClass().getClassLoader(),
registry);
> +            DiscoveryUtils.discoverActivators(BindingActivator.class, classLoader, registry);
>
>          StAXArtifactProcessorExtensionPoint staxProcessors =
>              registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
>
> Modified: incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/ImplementationsActivator.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/ImplementationsActivator.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/ImplementationsActivator.java
(original)
> +++ incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/ImplementationsActivator.java
Tue Aug 28 10:32:53 2007
> @@ -62,7 +62,9 @@
>          PropertyValueObjectFactory propertyFactory = new DefaultPropertyValueObjectFactory(mediator);
>          registry.addExtensionPoint(propertyFactory);
>
> -        this.implementationActivators = DiscoveryUtils.discoverActivators(ImplementationActivator.class,
getClass().getClassLoader(), registry);
> +        // FIXME The classloader should be passed in
> +        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
> +        this.implementationActivators = DiscoveryUtils.discoverActivators(ImplementationActivator.class,
classLoader, registry);
>
>          StAXArtifactProcessorExtensionPoint staxProcessors = registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
>          ProviderFactoryExtensionPoint providerFactories = registry.getExtensionPoint(ProviderFactoryExtensionPoint.class);
>
> Modified: incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/ResourceHelper.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/ResourceHelper.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/ResourceHelper.java
(original)
> +++ incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/ResourceHelper.java
Tue Aug 28 10:32:53 2007
> @@ -31,6 +31,8 @@
>  public class ResourceHelper {
>
>      public static String readResource(String scriptName) {
> +
> +        //FIXME The classloader should be passed in
>          ClassLoader cl = Thread.currentThread().getContextClassLoader();
>          URL scriptSrcUrl = cl.getResource(scriptName);
>          if (scriptSrcUrl == null) {
>
> Modified: incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
(original)
> +++ incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
Tue Aug 28 10:32:53 2007
> @@ -194,7 +194,7 @@
>          // Create a contribution repository
>          ContributionRepository repository;
>          try {
> -            repository = new ContributionRepositoryImpl("target");
> +            repository = new ContributionRepositoryImpl("target", xmlFactory);
>          } catch (IOException e) {
>              throw new ActivationException(e);
>          }
>
> Modified: incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicConstructorTestCase.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicConstructorTestCase.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicConstructorTestCase.java
(original)
> +++ incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicConstructorTestCase.java
Tue Aug 28 10:32:53 2007
> @@ -53,7 +53,7 @@
>      }
>
>      private <T> void visitEnd(Class<T> clazz, JavaImplementation type) throws
IntrospectionException {
> -        for (Constructor<T> constructor : clazz.getConstructors()) {
> +        for (Constructor<?> constructor : clazz.getConstructors()) {
>              visitConstructor(constructor, type);
>          }
>          processor.visitEnd(clazz, type);
>
> Modified: incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java
(original)
> +++ incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java
Tue Aug 28 10:32:53 2007
> @@ -55,7 +55,7 @@
>      }
>
>      private <T> void visitEnd(Class<T> clazz, JavaImplementation type) throws
IntrospectionException {
> -        for (Constructor<T> constructor : clazz.getConstructors()) {
> +        for (Constructor<?> constructor : clazz.getConstructors()) {
>              visitConstructor(constructor, type);
>          }
>          processor.visitEnd(clazz, type);
>
> Modified: incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeutisticExtensibleConstructorTestCase.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeutisticExtensibleConstructorTestCase.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeutisticExtensibleConstructorTestCase.java
(original)
> +++ incubator/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeutisticExtensibleConstructorTestCase.java
Tue Aug 28 10:32:53 2007
> @@ -48,7 +48,7 @@
>      }
>
>      private <T> void visitEnd(Class<T> clazz, JavaImplementation type) throws
IntrospectionException {
> -        for (Constructor<T> constructor : clazz.getConstructors()) {
> +        for (Constructor<?> constructor : clazz.getConstructors()) {
>              visitConstructor(constructor, type);
>          }
>          processor.visitEnd(clazz, type);
>
> Modified: incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/sca/implementation/script/ScriptInvoker.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/sca/implementation/script/ScriptInvoker.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/sca/implementation/script/ScriptInvoker.java
(original)
> +++ incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/sca/implementation/script/ScriptInvoker.java
Tue Aug 28 10:32:53 2007
> @@ -53,7 +53,12 @@
>          if (oper.getName() == null) {  // if no static setting
>              oper = op;  // use dynamic setting
>          }
> -        Object response = ((Invocable)scriptEngine).invokeFunction(oper.getName(), objects);
> +        Object response;
> +        try {
> +            response = ((Invocable)scriptEngine).invokeFunction(oper.getName(), objects);
> +        } catch (NoSuchMethodException e) {
> +            throw new ScriptException(e);
> +        }
>
>          if (xmlHelper != null) {
>              response = xmlHelper.toOMElement(response);
>
> Modified: incubator/tuscany/java/sca/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java
> URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java?rev=570495&r1=570494&r2=570495&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java
(original)
> +++ incubator/tuscany/java/sca/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java
Tue Aug 28 10:32:53 2007
> @@ -73,6 +73,8 @@
>      }
>
>      public boolean introspect(XQueryImplementation xqueryImplementation) throws ContributionResolveException
{
> +
> +        //FIXME The classloader should be passed in
>          cl = Thread.currentThread().getContextClassLoader();
>
>          String xqExpression = null;
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-commits-help@ws.apache.org
>
>


-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message