Return-Path: Delivered-To: apmail-avalon-cvs-archive@avalon.apache.org Received: (qmail 8544 invoked by uid 500); 21 Jun 2003 17:10:03 -0000 Mailing-List: contact cvs-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list cvs@avalon.apache.org Received: (qmail 8533 invoked by uid 500); 21 Jun 2003 17:10:03 -0000 Received: (qmail 8530 invoked from network); 21 Jun 2003 17:10:03 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 21 Jun 2003 17:10:03 -0000 Received: (qmail 16682 invoked by uid 1438); 21 Jun 2003 17:10:03 -0000 Date: 21 Jun 2003 17:10:03 -0000 Message-ID: <20030621171003.16681.qmail@icarus.apache.org> From: mcconnell@apache.org To: avalon-sandbox-cvs@apache.org Subject: cvs commit: avalon-sandbox/merlin/meta-tools/xdocs tags.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N mcconnell 2003/06/21 10:10:03 Modified: merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl DefaultLifestyleService.java SingletonLifestyleHandler.java merlin/assembly/src/test/org/apache/avalon/playground ExploitationManager.xinfo merlin/merlin-core/src/java/org/apache/avalon/merlin/block/impl StandardBlockLoader.java merlin/merlin-platform/xdocs/meta/info/type index.xml merlin/merlin-platform/xdocs/resources notebook.xml merlin/merlin-platform/xdocs/starting/tutorial dependencies.xml merlin/merlin-platform/xdocs/tools ant.xml merlin/merlin-platform/xdocs/tools/tags lifestyle.xml merlin/meta/src/java/org/apache/avalon/meta/info/builder XMLTypeCreator.java package.html merlin/meta-spi/src/java/org/apache/avalon/meta type.dtd merlin/meta-spi/src/java/org/apache/avalon/meta/info InfoDescriptor.java merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder DefaultTypeBuilder.java XMLTypeWriter.java merlin/meta-tools/src/java/org/apache/avalon/meta/tools/ant MetaTask.java merlin/meta-tools/src/test/org/apache/avalon/meta MetaTestCase.java merlin/meta-tools/xdocs tags.xml Log: Updates include: a) incorporate lifestyle as a formal element of the Type defintion (as a element with the type info block) b) addition of info.getLifestyle() and updating of related generators, builders, writers c) fix a synchronization bug concenring singleton instance establishment. Revision Changes Path 1.5 +8 -7 avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl/DefaultLifestyleService.java Index: DefaultLifestyleService.java =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl/DefaultLifestyleService.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- DefaultLifestyleService.java 18 Jun 2003 11:16:14 -0000 1.4 +++ DefaultLifestyleService.java 21 Jun 2003 17:10:01 -0000 1.5 @@ -62,6 +62,7 @@ import org.apache.avalon.framework.activity.Initializable; import org.apache.avalon.framework.context.ContextException; import org.apache.avalon.framework.logger.AbstractLogEnabled; +import org.apache.avalon.meta.info.InfoDescriptor; /** * A lifestyle service provides support for the creation of a lifestyle @@ -183,10 +184,9 @@ // final String policy = - appliance.getType().getInfo().getAttribute( - "urn:avalon:lifestyle", "singleton" ); + appliance.getType().getInfo().getLifestyle(); - if( policy.equalsIgnoreCase( "singleton" ) ) + if( policy.equals( InfoDescriptor.SINGLETON ) ) { try { @@ -201,7 +201,8 @@ "Internal error while attempting to establish the singleton lifestyle handler."; throw new LifestyleRuntimeException( error, e ); } - } else if( policy.equals( "transient" ) ) + } + else if( policy.equals( InfoDescriptor.TRANSIENT ) ) { try { @@ -218,7 +219,7 @@ throw new LifestyleRuntimeException( error, e ); } } - else if( policy.equals( "thread" ) ) + else if( policy.equals( InfoDescriptor.THREAD ) ) { try { @@ -234,7 +235,7 @@ throw new LifestyleRuntimeException( error, e ); } } - else if( policy.equals( "pooled" ) ) + else if( policy.equals( InfoDescriptor.POOLED ) ) { try { 1.3 +12 -8 avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl/SingletonLifestyleHandler.java Index: SingletonLifestyleHandler.java =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl/SingletonLifestyleHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SingletonLifestyleHandler.java 18 Jun 2003 11:16:14 -0000 1.2 +++ SingletonLifestyleHandler.java 21 Jun 2003 17:10:02 -0000 1.3 @@ -147,16 +147,20 @@ { if( m_instance == null ) { - if( getLogger().isDebugEnabled() ) + synchronized( this ) { - final String debug = - "new instance in appliance: " + getAppliance(); - getLogger().debug( debug ); + if( m_instance == null ) + { + if( getLogger().isDebugEnabled() ) + { + final String debug = + "new instance in appliance: " + getAppliance(); + getLogger().debug( debug ); + } + m_instance = super.newInstance(); + } } - - m_instance = super.newInstance(); } return m_instance; } - } 1.2 +1 -3 avalon-sandbox/merlin/assembly/src/test/org/apache/avalon/playground/ExploitationManager.xinfo Index: ExploitationManager.xinfo =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/test/org/apache/avalon/playground/ExploitationManager.xinfo,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ExploitationManager.xinfo 13 Mar 2003 01:04:26 -0000 1.1 +++ ExploitationManager.xinfo 21 Jun 2003 17:10:02 -0000 1.2 @@ -21,9 +21,7 @@ exploit - - - + thread - + +