When I run the sample from the command line one of two things seem to happen: it either hangs before exiting or it throws an IllegalStateException:

jeremy-boynes-computer:/tmp/foo jboynes$ java -jar bin/launcher.jar -- classpath ~/.m2/repository/org/apache/tuscany/samples/sca/sample- supplychain/1.0-SNAPSHOT/sample-supplychain-1.0-SNAPSHOT.jar
Main thread Thread[main,5,main]
Work thread Thread[pool-1-thread-1,5,main] - Order, submitted, fulfilled, shipped
<<< HANGS HERE >>>
^C

jeremy-boynes-computer:/tmp/foo jboynes$ java -jar bin/launcher.jar -- classpath ~/.m2/repository/org/apache/tuscany/samples/sca/sample- supplychain/1.0-SNAPSHOT/sample-supplychain-1.0-SNAPSHOT.jar
Main thread Thread[main,5,main]
java.lang.IllegalStateException: Scope not running [6]
at org.apache.tuscany.core.component.scope.AbstractScopeContainer.checkInit (AbstractScopeContainer.java:106) at org.apache.tuscany.core.component.scope.ModuleScopeContainer.getInstance Wrapper(ModuleScopeContainer.java:98) at org.apache.tuscany.core.component.scope.AbstractScopeContainer.getInstan ce(AbstractScopeContainer.java:87) at org.apache.tuscany.core.implementation.PojoAtomicComponent.getTargetInst ance(PojoAtomicComponent.java:105) at org.apache.tuscany.core.implementation.java.JavaTargetInvoker.getInstanc e(JavaTargetInvoker.java:52) at org.apache.tuscany.core.wire.PojoTargetInvoker.invokeTarget (PojoTargetInvoker.java:33) at org.apache.tuscany.core.implementation.java.AsyncJavaTargetInvoker.acces s$301(AsyncJavaTargetInvoker.java:37) at org.apache.tuscany.core.implementation.java.AsyncJavaTargetInvoker $1.run(AsyncJavaTargetInvoker.java:76) at org.apache.tuscany.core.services.work.jsr237.Jsr237WorkScheduler $Jsr237Work.run(Jsr237WorkScheduler.java:210) at org.apache.tuscany.core.services.work.jsr237.workmanager.ThreadPoolWorkM anager$DecoratingWork.run(ThreadPoolWorkManager.java:203) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask (ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:613)

I'm guessing that this is some kind of race condition in the work manager. All the tests pass for me (both the ones in core and the one from the supplychain module) but something's not quite right.

--
Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to