You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by de...@avalon.apache.org on 2004/07/10 13:28:10 UTC
[jira] Closed: (RUNTIME-42) Race condition resulting in wait for full timeout if component starts too quick
Message:
The following issue has been closed.
Resolver: Stephen McConnell
Date: Sat, 10 Jul 2004 4:26 AM
Applied suggest change.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/RUNTIME-42
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
Components:
COMPOSITION
Fix Fors:
3.4.0
Assignee: Stephen McConnell
Reporter: Michael Sonntag
Created: Fri, 9 Jul 2004 4:17 PM
Updated: Sat, 10 Jul 2004 4:26 AM
Description:
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 );
}
}
else
{
while( !m_completed )
{
wait( 60 );
}
}
}
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org