Managed to capture this eventually, it shows the container with hashcode
25116828 getting stopped just before its tried to be used by the other
thread:

Main thread Thread[main,5,main]
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
25116828 checkInit: 4
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
25116828 checkInit: 4
Thread[main,5,main] 25116828 ScopeContainer [Module Scope] in state
[STOPPED] stoped
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
19731881 checkInit: 4
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
23860799 checkInit: 4
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
23860799 checkInit: 4
Thread[pool-1-thread-1,5,main] ScopeContainer [Module Scope] in state
[STOPPED] 25116828 checkInit: 6
java.lang.IllegalStateException: Scope not running [6]
       at
org.apache.tuscany.core.component.scope.AbstractScopeContainer.checkInit(
AbstractScopeContainer.java:125)
       at
org.apache.tuscany.core.component.scope.ModuleScopeContainer.getInstanceWrapper
(ModuleScopeContainer.java:120)
       at
org.apache.tuscany.core.component.scope.AbstractScopeContainer.getInstance(
AbstractScopeContainer.java:105)
       at
org.apache.tuscany.core.implementation.PojoAtomicComponent.getTargetInstance
(PojoAtomicComponent.java:117)
       at
org.apache.tuscany.core.implementation.java.JavaTargetInvoker.getInstance(
JavaTargetInvoker.java:94)
       at
org.apache.tuscany.core.implementation.java.JavaTargetInvoker.invokeTarget(
JavaTargetInvoker.java:59)Thread[main,5
,main] ScopeContainer [Module Scope] in state [RUNNING] 23860799 checkInit:
4
Thread[main,5,main] 23860799 ScopeContainer [Module Scope] in state
[STOPPED] stoped
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
19731881 checkInit: 4
Thread[main,5,main] 19731881 ScopeContainer [Module Scope] in state
[STOPPED] stoped

       at org.apache.tuscany.spi.extension.TargetInvokerExtension.invoke(
TargetInvokerExtension.java:60)
       at org.apache.tuscany.core.wire.InvokerInterceptor.invoke(
InvokerInterceptor.java:44)
       at org.apache.tuscany.core.wire.NonBlockingBridgingInterceptor$1.run
(NonBlockingBridgingInterceptor.java:70)
       at
org.apache.tuscany.core.services.work.jsr237.Jsr237WorkScheduler$Jsr237Work.run
(Jsr237WorkScheduler.java:212)
       at
org.apache.tuscany.core.services.work.jsr237.workmanager.ThreadPoolWorkManager$DecoratingWork.run
(ThreadPoolWorkMa
nager.java:206)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
       at java.lang.Thread.run(Unknown Source)

C:\SCA\SVN\TRUNK\samples\sca\simplecallback>

This time working:

Main thread Thread[main,5,main]
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
31601333 checkInit: 4
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
31601333 checkInit: 4
Thread[pool-1-thread-1,5,main] ScopeContainer [Module Scope] in state
[RUNNING] 31601333 checkInit: 4
Thread[pool-1-thread-1,5,main] ScopeContainer [Module Scope] in state
[RUNNING] 31601333 checkInit: 4
Work thread Thread[pool-1-thread-1,5,main]
Result: -> someMethod -> receiveResult
Thread[main,5,main] 31601333 ScopeContainer [Module Scope] in state
[STOPPED] stoped
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
18983808 checkInit: 4
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
26530674 checkInit: 4
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
26530674 checkInit: 4
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
26530674 checkInit: 4
Thread[main,5,main] 26530674 ScopeContainer [Module Scope] in state
[STOPPED] stoped
Thread[main,5,main] ScopeContainer [Module Scope] in state [RUNNING]
18983808 checkInit: 4
Thread[main,5,main] 18983808 ScopeContainer [Module Scope] in state
[STOPPED] stoped

  ...ant

On 10/27/06, ant elder <[EMAIL PROTECTED]> wrote:

It does seem like a race condition - with a printlns in start, stop and
checkInit it runs fine.

   ...ant

On 10/27/06, Jim Marino < [EMAIL PROTECTED]> wrote:
>
> O.K. I just wanted to make sure...So that's a different issue.
> Without looking at this it sounds like maybe a race condition. Is the
> scope container getting stopped before the callback? A simple way is
> to just see if the module scope container instance is being started
> and when it is being stopped through some printlns. Could you give it
> a quick try?
>
> Jim
>
> On Oct 27, 2006, at 7:28 AM, ant elder wrote:
>
> > The scope container is stopped:
> >
> > java.lang.IllegalStateException: Scope not running [6]
> >                     at
> > org.apache.tuscany.core.component.scope.AbstractScopeContainer.checkIn
> > it(
> > AbstractScopeContainer.java:124)
> >                     at
> > org.apache.tuscany.core.component.scope.ModuleScopeContainer.getInstan
> > ceWrapper
> > (ModuleScopeContainer.java:118)
> >                     at
> > org.apache.tuscany.core.component.scope.AbstractScopeContainer.getInst
> > ance(
> > AbstractScopeContainer.java:105)
> >                     at
> > org.apache.tuscany.core.implementation.PojoAtomicComponent.getTargetIn
> > stance
> > (PojoAtomicComponent.java:117)
> >                     at
> > org.apache.tuscany.core.implementation.java.JavaTargetInvoker.getInsta
> > nce(
> > JavaTargetInvoker.java:94)
> >                     at
> > org.apache.tuscany.core.implementation.java.JavaTargetInvoker.invokeTa
> > rget(
> > JavaTargetInvoker.java:59)
> >                     at
> > org.apache.tuscany.spi.extension.TargetInvokerExtension.invoke(
> > TargetInvokerExtension.java:60)
> >                     at
> > org.apache.tuscany.core.wire.InvokerInterceptor.invoke(
> > InvokerInterceptor.java :44)
> >                     at
> > org.apache.tuscany.core.wire.NonBlockingBridgingInterceptor$1.run(
> > NonBlockingBridgingInterceptor.java:70)
> >                     at
> > org.apache.tuscany.core.services.work.jsr237.Jsr237WorkScheduler
> > $Jsr237Work.run
> > (Jsr237WorkScheduler.java:212)
> >                     at
> > org.apache.tuscany.core.services.work.jsr237.workmanager.ThreadPoolWor
> > kManager$DecoratingWork.run
> > (ThreadPoolWorkManager.java :206)
> >                     at
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> >                     at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> > Source)
> >                     at java.lang.Thread.run(Unknown Source)
> >
> >   ...ant
> >
> > On 10/27/06, Jim Marino <[EMAIL PROTECTED]> wrote:
> >>
> >> What error are you getting when you do so?
> >>
> >> Jim
> >>
> >> On Oct 27, 2006, at 7:17 AM, ant elder wrote:
> >>
> >> > Actually i just tried and it doesn't work in trunk either. Has
> >> > anyone ever
> >> > successfully run any async samples in the standalone launcher?
> >> >
> >> >   ...ant
> >> >
> >> > On 10/27/06, Ignacio Silva-Lepe < [EMAIL PROTECTED]> wrote:
> >> >>
> >> >> Wrt TUSCAY-882, this is odd, both components use @Scope("MODULE"),
> >> >> which
> >> >> was
> >> >> working on the trunk
> >> >>
> >> >> On 10/27/06, ant elder <[EMAIL PROTECTED]> wrote:
> >> >> >
> >> >> > Is this on the M2 code? I can't get any of the async samples
> >> >> running in
> >> >> > the
> >> >> > standalone launcher in M2, see
> >> >> > http://issues.apache.org/jira/browse/TUSCANY-882. (mentioning it
> >> >> here as
> >> >> > we
> >> >> > don't seem to be getting JIRA notification emails right now)
> >> >> >
> >> >> >   ...ant
> >> >> >
> >> >> > On 10/27/06, Ignacio Silva-Lepe <[EMAIL PROTECTED]> wrote:
> >> >> > >
> >> >> > > I am trying to run the inner.composite sample and I am getting
> >> >> the
> >> >> > > exception
> >> >> > > in http://rafb.net/paste/results/RDCjwL67.html. I have made
> >> a few
> >> >> > changes
> >> >> > > to
> >> >> > > the callback infrastructure to eliminate the need for routing
> >> >> tables
> >> >> at
> >> >> > > each
> >> >> > > composite reference hop, but it does not seem that that's
> >> what's
> >> >> causing
> >> >> > > the
> >> >> > > problem, as the exception occurs when trying to load the scdl.
> >> >> Any
> >> >> > ideas?
> >> >> > >
> >> >> > >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >>
> >>
> >> ---------------------------------------------------------------------
>
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to