Return-Path: Delivered-To: apmail-avalon-cvs-archive@www.apache.org Received: (qmail 60629 invoked from network); 3 Oct 2003 14:43:02 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 Oct 2003 14:43:02 -0000 Received: (qmail 70971 invoked by uid 500); 3 Oct 2003 14:42:30 -0000 Delivered-To: apmail-avalon-cvs-archive@avalon.apache.org Received: (qmail 70917 invoked by uid 500); 3 Oct 2003 14:42:30 -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 70889 invoked from network); 3 Oct 2003 14:42:30 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 3 Oct 2003 14:42:30 -0000 Received: (qmail 60280 invoked by uid 1438); 3 Oct 2003 14:42:34 -0000 Date: 3 Oct 2003 14:42:34 -0000 Message-ID: <20031003144234.60279.qmail@minotaur.apache.org> From: mcconnell@apache.org To: avalon-cvs@apache.org Subject: cvs commit: avalon/merlin/platform/tutorials/profiles/src/java/tutorial HelloComponent.java RandomGeneratorProvider.java HelloComponent.xinfo RandomGeneratorProvider.xinfo X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N mcconnell 2003/10/03 07:42:34 Modified: merlin/platform/tutorials/profiles/src/java/tutorial HelloComponent.java RandomGeneratorProvider.java Added: merlin/platform/tutorials/profiles .cvsignore project.xml merlin/platform/tutorials/profiles/conf block.xml Removed: merlin/platform/tutorials/profiles/src/config block.xml merlin/platform/tutorials/profiles/src/java/tutorial HelloComponent.xinfo RandomGeneratorProvider.xinfo Log: Bring propfile tutorial up-to-date (added meta tags and maven build). Revision Changes Path 1.1 avalon/merlin/platform/tutorials/profiles/.cvsignore Index: .cvsignore =================================================================== maven.log velocity.log build target tutorial.jar 1.1 avalon/merlin/platform/tutorials/profiles/project.xml Index: project.xml =================================================================== ${basedir}/../project.xml merlin-tutorial-profile Merlin Profiles Tutorial tutorial 1.0 2003 Test for the Merlin Profile Management. avalon-framework avalon-framework-api 4.1.5 avalon-framework avalon-framework-impl 4.1.5 1.1 avalon/merlin/platform/tutorials/profiles/conf/block.xml Index: block.xml =================================================================== 1.2 +9 -1 avalon/merlin/platform/tutorials/profiles/src/java/tutorial/HelloComponent.java Index: HelloComponent.java =================================================================== RCS file: /home/cvs/avalon/merlin/platform/tutorials/profiles/src/java/tutorial/HelloComponent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HelloComponent.java 24 Sep 2003 09:34:07 -0000 1.1 +++ HelloComponent.java 3 Oct 2003 14:42:34 -0000 1.2 @@ -5,6 +5,12 @@ import org.apache.avalon.framework.service.ServiceManager; import org.apache.avalon.framework.service.ServiceException; +/** + * A demonstration component that is dependent on a random number + * service that will be located and constructed using a packaged profile. + * + * @avalon.component name="hello" lifestyle="singleton" + */ public class HelloComponent extends AbstractLogEnabled implements Serviceable { @@ -13,11 +19,13 @@ * Servicing of the component by the container during * which service dependencies declared under the component * can be resolved using the supplied service manager. + * + * @avalon.dependency type="tutorial.RandomGenerator" key="random" */ public void service( ServiceManager manager ) throws ServiceException { RandomGenerator random = (RandomGenerator) manager.lookup( "random" ); - getLogger().info( "random: " + random.getRandom() ); + getLogger().info( "resolved random: " + random.getRandom() ); } } 1.2 +3 -0 avalon/merlin/platform/tutorials/profiles/src/java/tutorial/RandomGeneratorProvider.java Index: RandomGeneratorProvider.java =================================================================== RCS file: /home/cvs/avalon/merlin/platform/tutorials/profiles/src/java/tutorial/RandomGeneratorProvider.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RandomGeneratorProvider.java 24 Sep 2003 09:34:07 -0000 1.1 +++ RandomGeneratorProvider.java 3 Oct 2003 14:42:34 -0000 1.2 @@ -10,6 +10,9 @@ /** * An implementation of a random number generator. + * + * @avalon.component name="random-provider" lifestyle="singleton" + * @avalon.service type="tutorial.RandomGenerator" */ public class RandomGeneratorProvider extends AbstractLogEnabled implements Configurable, RandomGenerator --------------------------------------------------------------------- To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org For additional commands, e-mail: cvs-help@avalon.apache.org