mcconnell 2003/02/07 18:17:32 Modified: merlin build.xml default.properties merlin/config demo.xml james.xml merlin/src/java/org/apache/avalon/merlin/block/impl DefaultBlock.java merlin/src/test/config demo.xml Log: Updated demo to show nester container deployment. Revision Changes Path 1.16 +2 -2 avalon-sandbox/merlin/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/build.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- build.xml 7 Feb 2003 23:08:55 -0000 1.15 +++ build.xml 8 Feb 2003 02:17:31 -0000 1.16 @@ -35,7 +35,7 @@ <!--<pathelement location="${excalibur-logger.jar}"/>--> <pathelement location="${excalibur-configuration.jar}"/> <pathelement location="${excalibur-pool.jar}"/> - <!-- <pathelement location="${excalibur-thread.jar}"/> --> + <pathelement location="${excalibur-thread.jar}"/> <pathelement location="${excalibur-event.jar}"/> <pathelement location="${excalibur-sourceresolve.jar}"/> <pathelement location="${util.concurrent.jar}"/> @@ -261,7 +261,7 @@ <copy todir="${lib.dir}" file="${excalibur-threadcontext.jar}"/> <copy todir="${lib.dir}" file="${excalibur-sourceresolve.jar}"/> <copy todir="${lib.dir}" file="${excalibur-pool.jar}"/> - <!-- <copy todir="${lib.dir}" file="${excalibur-thread.jar}"/> --> + <copy todir="${lib.dir}" file="${excalibur-thread.jar}"/> <copy todir="${lib.dir}" file="${avalon-lifecycle.jar}"/> <copy todir="${lib.dir}" file="${avalon-assembly.jar}"/> <!-- 1.16 +3 -3 avalon-sandbox/merlin/default.properties Index: default.properties =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/default.properties,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- default.properties 7 Feb 2003 23:08:55 -0000 1.15 +++ default.properties 8 Feb 2003 02:17:31 -0000 1.16 @@ -82,9 +82,9 @@ excalibur-collections.jar=${excalibur-collections.lib}/excalibur-collections-1.0.jar # ----- Excalibur thread, version 1.0 or later ----- -#excalibur-thread.home=${excalibur.home}/thread -#excalibur-thread.lib=${excalibur-thread.home}/build/lib -#excalibur-thread.jar=${excalibur-thread.lib}/excalibur-thread-1.1.jar +excalibur-thread.home=${excalibur.home}/thread +excalibur-thread.lib=${excalibur-thread.home}/build/lib +excalibur-thread.jar=${excalibur-thread.lib}/excalibur-thread-1.1.jar # ----- Excalibur threadcontext, version 1.0 or later ----- excalibur-threadcontext.home=${excalibur.home}/threadcontext 1.3 +4 -0 avalon-sandbox/merlin/config/demo.xml Index: demo.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/config/demo.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- demo.xml 7 Feb 2003 23:08:55 -0000 1.2 +++ demo.xml 8 Feb 2003 02:17:32 -0000 1.3 @@ -26,6 +26,10 @@ <engine/> + <!-- + Defintion of the set of root blocks managed by the kernel. + --> + <blocks> <!-- demo of a block descriptor embedded in a jar file --> 1.2 +24 -7 avalon-sandbox/merlin/config/james.xml Index: james.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/config/james.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- james.xml 27 Jan 2003 03:27:45 -0000 1.1 +++ james.xml 8 Feb 2003 02:17:32 -0000 1.2 @@ -12,7 +12,7 @@ <system host="localhost"/> - <logging target="default" priority="INFO"> + <logging target="kernel" priority="WARN"> <category name="/sys/logger" priority="WARN"/> <target name="kernel"> <file location="kernel.log" /> @@ -27,22 +27,39 @@ <blocks> - <block name="james" src="src/test/config/james.xml" enabled="true" > + <block name="container" src="src/test/config/james-block.xml" enabled="true" > + + <configuration target="james"> + <postmaster>[EMAIL PROTECTED]</postmaster> + <servernames autodetect="true" autodetectIP="true"> + <servername>localhost</servername> + <servername>home.osm.net</servername> + </servernames> + <usernames ignoreCase="true" enableAliases="true" enableForwarding="true"/> + <inboxRepository> + <repository destinationURL="file://var/mail/inboxes/" type="MAIL"/> + </inboxRepository> + </configuration> + <configuration target="dns"> <servers> <server>212.198.0.66</server> <server>212.198.0.67</server> <server>192.112.36.4</server> </servers> + <autodiscover>true</autodiscover> <authoritative>false</authoritative> </configuration> + <configuration target="remote"> <port>4555</port> - <helloName autodetect="TRUE">myMailServer</helloName> - <administrator_accounts> - <account login="root" password="root"/> - </administrator_accounts> - <connectiontimeout> 60000 </connectiontimeout> + <handler> + <helloName autodetect="TRUE">myMailServer</helloName> + <administrator_accounts> + <account login="root" password="root"/> + </administrator_accounts> + <connectiontimeout> 60000 </connectiontimeout> + </handler> </configuration> </block> 1.5 +12 -16 avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/block/impl/DefaultBlock.java Index: DefaultBlock.java =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/block/impl/DefaultBlock.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- DefaultBlock.java 23 Jan 2003 11:42:08 -0000 1.4 +++ DefaultBlock.java 8 Feb 2003 02:17:32 -0000 1.5 @@ -451,20 +451,6 @@ } /** - * Startup the components in this container. - * @exception Exception if a startup error occurs - */ - //private void disassembleComponents() - //{ - // Iterator iterator = m_appliances.iterator(); - // while( iterator.hasNext() ) - // { - // Appliance appliance = (Appliance) iterator.next(); - // appliance.disassemble(); - // } - //} - - /** * Terminate the block. If a container has been established, the implemetation * will relase the container and continue with appliance termination. */ @@ -829,9 +815,19 @@ */ public void stateChanged( StateEvent event ) { - if( getLogger().isDebugEnabled() ) + if( event.getError() != null ) { - getLogger().debug("state event: " + event ); + if( getLogger().isErrorEnabled() ) + { + getLogger().error("state event: " + event, event.getError() ); + } + } + else + { + if( getLogger().isDebugEnabled() ) + { + getLogger().debug("state event: " + event ); + } } m_state = event.getState(); } 1.4 +11 -4 avalon-sandbox/merlin/src/test/config/demo.xml Index: demo.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/src/test/config/demo.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- demo.xml 27 Jan 2003 07:11:57 -0000 1.3 +++ demo.xml 8 Feb 2003 02:17:32 -0000 1.4 @@ -34,16 +34,23 @@ multiple components and multiple containers --> - <engine/> - - <appliance name="standard" class="org.apache.avalon.playground.StandardComponent" activation="startup"> + <appliance name="standard" + class="org.apache.avalon.playground.StandardComponent" activation="startup"> <context class="org.apache.avalon.playground.StandardContextImp"/> <configuration> <message>Message declared in block descriptor.</message> </configuration> </appliance> - <container name="test"/> + <container name="test"> + <appliance name="standard" + class="org.apache.avalon.playground.StandardComponent" activation="startup"> + <context class="org.apache.avalon.playground.StandardContextImp"/> + <configuration> + <message>Standard component inside a nested block.</message> + </configuration> + </appliance> + </container> </implementation>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]