I have just tested that with svn head and I have the following exception:
org.apache.tuscany.core.context.DuplicateNameException:
org.apache.tuscany.core.loader.assembly.ComponentLoader
at
org.apache.tuscany.core.system.context.SystemAggregateContextImpl.registerConfiguration(SystemAggregateContextImpl.java:424)
at
org.apache.tuscany.core.system.context.SystemAggregateContextImpl.registerModelObject(SystemAggregateContextImpl.java:350)
at
org.apache.tuscany.core.client.BootstrapHelper.bootstrapStaxLoader(BootstrapHelper.java:117)
at
org.apache.tuscany.core.client.BootstrapHelper.getConfigurationLoader(BootstrapHelper.java:104)
at
org.apache.tuscany.core.client.TuscanyRuntime.<init>(TuscanyRuntime.java:93)
at
org.apache.tuscany.core.client.TuscanyRuntime.<init>(TuscanyRuntime.java:64)
at
org.apache.servicemix.sca.AssemblyLoaderTest.testStaxLoader(AssemblyLoaderTest.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Did I miss something ?
Guillaume Nodet
Jeremy Boynes wrote:
I have got the StAX stuff to the point where I can run all the itests in
the build and the tomcat/testing tests using the StAX framework. I think
this is an opportune time to open discussion on whether we should switch
over to this once and for all.
You can enable the framework by setting the useStax boolean in
BootstrapHelper to true and rebuilding the core module (and any others
you wish to test).
To see what is involved in adding an extension have a look at:
JavaScriptImplementationLoader for the .js container
JSONRPCBindingLoader for the .jsonrpc binding
Comments welcome...
--
Jeremy
Jeremy Boynes wrote:
I checked in a framework for a StAX-based configuration loader for the
SCA core. It is based on a set of element handlers that generate a model
object from a element in the XML stream; handlers for the core and
system schemas are in the core module, handlers for extensions can be
bundled in the extension module and are contributed as regular system
components.
I tested with the basic system and helloworld configurations and
discovered a problem with the way configured properties and references
are handled. This should be resolved once the FIXME in ComponentImpl is
addressed.
To get this working I had to modify the autowire resolver in the
SystemAggregateContextImpl. I hope this can be removed once Jim gets
references working. I also think we need to reexamine the autowire
algorithm but will open another thread for that.
--
Jeremy