svn commit: rev 22449 - avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl

[email protected]
Newsgroups gmane.comp.jakarta.avalon.cvs
Message-ID <[email protected]>
Author: mcconnell
Date: Thu Jul  1 23:58:39 2004
New Revision: 22449

Modified:
   avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
Log:
fix a synchronization problem concerning facilities interacting with the model during startup

Modified: avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
==============================================================================
--- avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java	(original)
+++ avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java	Thu Jul  1 23:58:39 2004
@@ -836,19 +836,16 @@
         if( model.equals( this ) ) 
             return model;
 
-        synchronized( m_commissioned )
-        {
-            m_dirty.setEnabled( true );
-            ModelRepository repository = m_context.getModelRepository();
-            synchronized( repository )
-            {
-                repository.addModel( name, model );
-                m_context.getDependencyGraph().add( model );
-                CompositionEvent event = new CompositionEvent( this, model );
-                fireModelAddedEvent( event );
-                return model;
-            }
-        }
+        m_dirty.setEnabled( true );
+        ModelRepository repository = m_context.getModelRepository();
+        synchronized( repository )
+        {
+            repository.addModel( name, model );
+            m_context.getDependencyGraph().add( model );
+            CompositionEvent event = new CompositionEvent( this, model );
+            fireModelAddedEvent( event );
+            return model;
+        }
     }
 
     private void fireModelAddedEvent( CompositionEvent event )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.