avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@avalon.apache.org
Subject [jira] Closed: (RUNTIME-42) Race condition resulting in wait for full timeout if component starts too quick
Date Sat, 10 Jul 2004 11:28:10 GMT

   The following issue has been closed.

   Resolver: Stephen McConnell
       Date: Sat, 10 Jul 2004 4:26 AM

Applied suggest change.
View the issue:

Here is an overview of the issue:
        Key: RUNTIME-42
    Summary: Race condition resulting in wait for full timeout if component starts too quick
       Type: Bug

     Status: Closed
   Priority: Minor
 Resolution: FIXED

    Project: Merlin Runtime
   Fix Fors:

   Assignee: Stephen McConnell
   Reporter: Michael Sonntag

    Created: Fri, 9 Jul 2004 4:17 PM
    Updated: Sat, 10 Jul 2004 4:26 AM

When a component is started and the startup time is very short, the full timeout period will
be waited for (the one configured by merlin.deployment.timeout). This happens when the component
startup has already completed when waiting for the end of the startup begins. This can be
simply prevented by the following change to org.apache.avalon.composition.model.impl.CommissionRequest:
Check for completion before actually waiting. As access to m_completed is always done under
synchronization, no race condition on the actual access to the variable can occur.

private void waitForCompletion( long timeout ) throws InterruptedException
        if( timeout > 0 )
            // Don't start waiting if already completed
            if(!m_completed) {
                wait( timeout );
            while( !m_completed )
                wait( 60 );

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org

View raw message