incubator-composer-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject svn commit: r618174 [1/5] - in /incubator/composer/trunk: ./ composer-site/ composer-site/src/ composer-site/src/assembly/ composer-site/src/config/ composer-site/src/resources/ composer-site/src/resources/images/ composer-site/src/resources/style/ com...
Date Mon, 04 Feb 2008 06:33:26 GMT
Author: hammant
Date: Sun Feb  3 22:33:20 2008
New Revision: 618174

URL: http://svn.apache.org/viewvc?rev=618174&view=rev
Log:
start of the project site

Added:
    incubator/composer/trunk/composer-site/
    incubator/composer/trunk/composer-site/pico-distribution.iml
    incubator/composer/trunk/composer-site/picocontainer-distribution.iml
    incubator/composer/trunk/composer-site/pom.xml
    incubator/composer/trunk/composer-site/src/
    incubator/composer/trunk/composer-site/src/assembly/
    incubator/composer/trunk/composer-site/src/assembly/assembly-bin.xml
    incubator/composer/trunk/composer-site/src/assembly/assembly-src.xml
    incubator/composer/trunk/composer-site/src/config/
    incubator/composer/trunk/composer-site/src/resources/
    incubator/composer/trunk/composer-site/src/resources/images/
    incubator/composer/trunk/composer-site/src/resources/images/pico-logo.png   (with props)
    incubator/composer/trunk/composer-site/src/resources/style/
    incubator/composer/trunk/composer-site/src/resources/style/maven-pico-javadoc.css
    incubator/composer/trunk/composer-site/src/resources/style/maven-pico-theme.css
    incubator/composer/trunk/composer-site/src/site/
    incubator/composer/trunk/composer-site/src/site/content/
    incubator/composer/trunk/composer-site/src/site/content/CommandLineArgumentsPicoContainer.html
    incubator/composer/trunk/composer-site/src/site/content/DefaultPicoContainer.html
    incubator/composer/trunk/composer-site/src/site/content/ImmutablePicoContainer.html
    incubator/composer/trunk/composer-site/src/site/content/PropertiesPicoContainer.html
    incubator/composer/trunk/composer-site/src/site/content/SystemPropertiesPicoContainer.html
    incubator/composer/trunk/composer-site/src/site/content/TransientPicoContainer.html
    incubator/composer/trunk/composer-site/src/site/content/adapters.html
    incubator/composer/trunk/composer-site/src/site/content/antipatterns/
    incubator/composer/trunk/composer-site/src/site/content/antipatterns/container-dependency-antipattern.html
    incubator/composer/trunk/composer-site/src/site/content/antipatterns/long-constructor-argument-list-antipattern.html
    incubator/composer/trunk/composer-site/src/site/content/antipatterns/propagating-dependency-antipattern.html
    incubator/composer/trunk/composer-site/src/site/content/antipatterns/singleton-antipattern.html
    incubator/composer/trunk/composer-site/src/site/content/antipatterns/tests-use-container-antipattern.html
    incubator/composer/trunk/composer-site/src/site/content/behaviors.html
    incubator/composer/trunk/composer-site/src/site/content/builder.html
    incubator/composer/trunk/composer-site/src/site/content/class-naming.html
    incubator/composer/trunk/composer-site/src/site/content/comparisons.html
    incubator/composer/trunk/composer-site/src/site/content/component-configuration.html
    incubator/composer/trunk/composer-site/src/site/content/constructor-injection.html
    incubator/composer/trunk/composer-site/src/site/content/disambiguation.html
    incubator/composer/trunk/composer-site/src/site/content/downloads.html
    incubator/composer/trunk/composer-site/src/site/content/faq.html
    incubator/composer/trunk/composer-site/src/site/content/fluent-style.html
    incubator/composer/trunk/composer-site/src/site/content/goals.html
    incubator/composer/trunk/composer-site/src/site/content/help/
    incubator/composer/trunk/composer-site/src/site/content/help/ambiguous-injectable-help.html
    incubator/composer/trunk/composer-site/src/site/content/help/unprocessed-properties-help.html
    incubator/composer/trunk/composer-site/src/site/content/index.html
    incubator/composer/trunk/composer-site/src/site/content/injection.html
    incubator/composer/trunk/composer-site/src/site/content/interception.html
    incubator/composer/trunk/composer-site/src/site/content/introduction.html
    incubator/composer/trunk/composer-site/src/site/content/inversion-of-control-history.html
    incubator/composer/trunk/composer-site/src/site/content/inversion-of-control.html
    incubator/composer/trunk/composer-site/src/site/content/javadoc.html
    incubator/composer/trunk/composer-site/src/site/content/lifecycle.html
    incubator/composer/trunk/composer-site/src/site/content/mock-objects.html
    incubator/composer/trunk/composer-site/src/site/content/monitors.html
    incubator/composer/trunk/composer-site/src/site/content/news.html
    incubator/composer/trunk/composer-site/src/site/content/patterns.html
    incubator/composer/trunk/composer-site/src/site/content/project.html
    incubator/composer/trunk/composer-site/src/site/content/properties.html
    incubator/composer/trunk/composer-site/src/site/content/scopes.html
    incubator/composer/trunk/composer-site/src/site/content/setter-injection.html
    incubator/composer/trunk/composer-site/src/site/content/sitemap.xml
    incubator/composer/trunk/composer-site/src/site/content/team.html
    incubator/composer/trunk/composer-site/src/site/content/terminology.html
    incubator/composer/trunk/composer-site/src/site/content/transparency.html
    incubator/composer/trunk/composer-site/src/site/content/web-frameworks.html
    incubator/composer/trunk/composer-site/src/site/resources/
    incubator/composer/trunk/composer-site/src/site/resources/images/
    incubator/composer/trunk/composer-site/src/site/resources/images/apple-implements-peelable.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/complex-dependencies.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/information.gif   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/ioc-timeline.graffle
    incubator/composer/trunk/composer-site/src/site/resources/images/ioc-timeline.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/ioc-venn.graffle
    incubator/composer/trunk/composer-site/src/site/resources/images/ioc-venn.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/juicer-in-pico-hierarchy.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/juicer-peeler-peelable.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/mock-needs-stuff.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/pico-hierarchy.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/pico-logo.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/pico-needs-stuff.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/smile.gif   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/start-container.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/start-hierarchy.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/stop-container.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/stop-hierarchy.png   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/thumbs_down.gif   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/images/warning.gif   (with props)
    incubator/composer/trunk/composer-site/src/site/resources/scripts/
    incubator/composer/trunk/composer-site/src/site/resources/scripts/pngfix.js
    incubator/composer/trunk/composer-site/src/site/resources/scripts/prototype.js
    incubator/composer/trunk/composer-site/src/site/resources/scripts/shBrushJava.js
    incubator/composer/trunk/composer-site/src/site/resources/scripts/shBrushXml.js
    incubator/composer/trunk/composer-site/src/site/resources/scripts/shCore.js
    incubator/composer/trunk/composer-site/src/site/resources/style/
    incubator/composer/trunk/composer-site/src/site/resources/style/pico.css
    incubator/composer/trunk/composer-site/src/site/resources/style/syntaxhighlighter.css
    incubator/composer/trunk/composer-site/src/site/templates/
    incubator/composer/trunk/composer-site/src/site/templates/skin.html
Modified:
    incubator/composer/trunk/apache-composer.iml

Modified: incubator/composer/trunk/apache-composer.iml
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/apache-composer.iml?rev=618174&r1=618173&r2=618174&view=diff
==============================================================================
--- incubator/composer/trunk/apache-composer.iml (original)
+++ incubator/composer/trunk/apache-composer.iml Sun Feb  3 22:33:20 2008
@@ -5,6 +5,7 @@
     <exclude-output />
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
     <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/distribution/target" />
       <excludeFolder url="file://$MODULE_DIR$/target" />
     </content>
     <orderEntry type="inheritedJdk" />

Added: incubator/composer/trunk/composer-site/pico-distribution.iml
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/pico-distribution.iml?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/pico-distribution.iml (added)
+++ incubator/composer/trunk/composer-site/pico-distribution.iml Sun Feb  3 22:33:20 2008
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntryProperties />
+  </component>
+  <component name="copyright">
+    <Base>
+      <setting name="state" value="1" />
+    </Base>
+    <LanguageOptions name="$TEMPLATE$">
+      <option name="templateOptions">
+        <value>
+          <option name="block" value="true" />
+          <option name="separateBefore" value="false" />
+          <option name="separateAfter" value="false" />
+          <option name="prefixLines" value="true" />
+          <option name="lenBefore" value="80" />
+          <option name="lenAfter" value="80" />
+          <option name="box" value="false" />
+          <option name="filler" value=" " />
+        </value>
+      </option>
+      <option name="notice" value="Copyright (c) &amp;#36;today.year, Apache Composer Organization. All rights reserved.            &#10;------------------------------------------------------------------------- &#10;The software in this package is published under the terms of the BSD      &#10;style license a copy of which has been included with this distribution in &#10;the LICENSE.txt file.                                                     &#10;" />
+      <option name="keyword" value="Copyright" />
+      <option name="fileTypeOverride" value="4" />
+      <option name="relativeBefore" value="true" />
+      <option name="addBlankAfter" value="true" />
+      <option name="fileLocation" value="1" />
+      <option name="useAlternate" value="false" />
+    </LanguageOptions>
+    <LanguageOptions name="CSS">
+      <option name="templateOptions">
+        <value>
+          <option name="block" value="true" />
+          <option name="separateBefore" value="false" />
+          <option name="separateAfter" value="false" />
+          <option name="prefixLines" value="true" />
+          <option name="lenBefore" value="80" />
+          <option name="lenAfter" value="80" />
+          <option name="box" value="false" />
+          <option name="filler" value=" " />
+        </value>
+      </option>
+      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
+      <option name="keyword" value="Copyright" />
+      <option name="fileTypeOverride" value="2" />
+      <option name="relativeBefore" value="true" />
+      <option name="addBlankAfter" value="true" />
+      <option name="fileLocation" value="1" />
+      <option name="useAlternate" value="false" />
+    </LanguageOptions>
+    <LanguageOptions name="HTML">
+      <option name="templateOptions">
+        <value>
+          <option name="block" value="true" />
+          <option name="separateBefore" value="false" />
+          <option name="separateAfter" value="false" />
+          <option name="prefixLines" value="true" />
+          <option name="lenBefore" value="80" />
+          <option name="lenAfter" value="80" />
+          <option name="box" value="false" />
+          <option name="filler" value=" " />
+        </value>
+      </option>
+      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
+      <option name="keyword" value="Copyright" />
+      <option name="fileTypeOverride" value="2" />
+      <option name="relativeBefore" value="true" />
+      <option name="addBlankAfter" value="true" />
+      <option name="fileLocation" value="1" />
+      <option name="useAlternate" value="false" />
+    </LanguageOptions>
+    <LanguageOptions name="JAVA">
+      <option name="templateOptions">
+        <value>
+          <option name="block" value="true" />
+          <option name="separateBefore" value="false" />
+          <option name="separateAfter" value="false" />
+          <option name="prefixLines" value="true" />
+          <option name="lenBefore" value="80" />
+          <option name="lenAfter" value="80" />
+          <option name="box" value="false" />
+          <option name="filler" value=" " />
+        </value>
+      </option>
+      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
+      <option name="keyword" value="Copyright" />
+      <option name="fileTypeOverride" value="2" />
+      <option name="relativeBefore" value="true" />
+      <option name="addBlankAfter" value="true" />
+      <option name="fileLocation" value="1" />
+      <option name="useAlternate" value="false" />
+    </LanguageOptions>
+    <LanguageOptions name="JSP">
+      <option name="templateOptions">
+        <value>
+          <option name="block" value="true" />
+          <option name="separateBefore" value="false" />
+          <option name="separateAfter" value="false" />
+          <option name="prefixLines" value="true" />
+          <option name="lenBefore" value="80" />
+          <option name="lenAfter" value="80" />
+          <option name="box" value="false" />
+          <option name="filler" value=" " />
+        </value>
+      </option>
+      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
+      <option name="keyword" value="Copyright" />
+      <option name="fileTypeOverride" value="2" />
+      <option name="relativeBefore" value="true" />
+      <option name="addBlankAfter" value="true" />
+      <option name="fileLocation" value="1" />
+      <option name="useAlternate" value="false" />
+    </LanguageOptions>
+    <LanguageOptions name="JavaScript">
+      <option name="templateOptions">
+        <value>
+          <option name="block" value="true" />
+          <option name="separateBefore" value="false" />
+          <option name="separateAfter" value="false" />
+          <option name="prefixLines" value="true" />
+          <option name="lenBefore" value="80" />
+          <option name="lenAfter" value="80" />
+          <option name="box" value="false" />
+          <option name="filler" value=" " />
+        </value>
+      </option>
+      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
+      <option name="keyword" value="Copyright" />
+      <option name="fileTypeOverride" value="2" />
+      <option name="relativeBefore" value="true" />
+      <option name="addBlankAfter" value="true" />
+      <option name="fileLocation" value="1" />
+      <option name="useAlternate" value="false" />
+    </LanguageOptions>
+    <LanguageOptions name="Properties">
+      <option name="templateOptions">
+        <value>
+          <option name="block" value="true" />
+          <option name="separateBefore" value="false" />
+          <option name="separateAfter" value="false" />
+          <option name="prefixLines" value="true" />
+          <option name="lenBefore" value="80" />
+          <option name="lenAfter" value="80" />
+          <option name="box" value="false" />
+          <option name="filler" value=" " />
+        </value>
+      </option>
+      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
+      <option name="keyword" value="Copyright" />
+      <option name="fileTypeOverride" value="2" />
+      <option name="relativeBefore" value="true" />
+      <option name="addBlankAfter" value="true" />
+      <option name="fileLocation" value="1" />
+      <option name="useAlternate" value="false" />
+    </LanguageOptions>
+    <LanguageOptions name="XML">
+      <option name="templateOptions">
+        <value>
+          <option name="block" value="true" />
+          <option name="separateBefore" value="false" />
+          <option name="separateAfter" value="false" />
+          <option name="prefixLines" value="true" />
+          <option name="lenBefore" value="80" />
+          <option name="lenAfter" value="80" />
+          <option name="box" value="false" />
+          <option name="filler" value=" " />
+        </value>
+      </option>
+      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
+      <option name="keyword" value="Copyright" />
+      <option name="fileTypeOverride" value="2" />
+      <option name="relativeBefore" value="true" />
+      <option name="addBlankAfter" value="true" />
+      <option name="fileLocation" value="1" />
+      <option name="useAlternate" value="false" />
+    </LanguageOptions>
+  </component>
+</module>
+

Added: incubator/composer/trunk/composer-site/picocontainer-distribution.iml
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/picocontainer-distribution.iml?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/picocontainer-distribution.iml (added)
+++ incubator/composer/trunk/composer-site/picocontainer-distribution.iml Sun Feb  3 22:33:20 2008
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="false" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <exclude-output />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library" exported="">
+      <library name="com.thoughtworks.paranamer:paranamer:1.1">
+        <CLASSES>
+          <root url="jar://$M2_REPOSITORY$/com/thoughtworks/paranamer/paranamer/1.1/paranamer-1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://$M2_REPOSITORY$/com/thoughtworks/paranamer/paranamer/1.1/paranamer-1.1-javadoc.jar!/" />
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://$M2_REPOSITORY$/com/thoughtworks/paranamer/paranamer/1.1/paranamer-1.1-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="com.thoughtworks.xstream:xstream:1.2.2">
+        <CLASSES>
+          <root url="jar://$M2_REPOSITORY$/com/thoughtworks/xstream/xstream/1.2.2/xstream-1.2.2.jar!/" />
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://$M2_REPOSITORY$/com/thoughtworks/xstream/xstream/1.2.2/xstream-1.2.2-javadoc.jar!/" />
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://$M2_REPOSITORY$/com/thoughtworks/xstream/xstream/1.2.2/xstream-1.2.2-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="jmock:jmock:1.2.0">
+        <CLASSES>
+          <root url="jar://$M2_REPOSITORY$/jmock/jmock/1.2.0/jmock-1.2.0.jar!/" />
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://$M2_REPOSITORY$/jmock/jmock/1.2.0/jmock-1.2.0-javadoc.jar!/" />
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://$M2_REPOSITORY$/jmock/jmock/1.2.0/jmock-1.2.0-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="junit:junit-dep:4.4">
+        <CLASSES>
+          <root url="jar://$M2_REPOSITORY$/junit/junit-dep/4.4/junit-dep-4.4.jar!/" />
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://$M2_REPOSITORY$/junit/junit-dep/4.4/junit-dep-4.4-javadoc.jar!/" />
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://$M2_REPOSITORY$/junit/junit-dep/4.4/junit-dep-4.4-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="junit:junit:3.8.1">
+        <CLASSES>
+          <root url="jar://$M2_REPOSITORY$/junit/junit/3.8.1/junit-3.8.1.jar!/" />
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://$M2_REPOSITORY$/junit/junit/3.8.1/junit-3.8.1-javadoc.jar!/" />
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://$M2_REPOSITORY$/junit/junit/3.8.1/junit-3.8.1-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="org.hamcrest:hamcrest-core:1.1">
+        <CLASSES>
+          <root url="jar://$M2_REPOSITORY$/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://$M2_REPOSITORY$/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-javadoc.jar!/" />
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://$M2_REPOSITORY$/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="org.hamcrest:hamcrest-library:1.1">
+        <CLASSES>
+          <root url="jar://$M2_REPOSITORY$/org/hamcrest/hamcrest-library/1.1/hamcrest-library-1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://$M2_REPOSITORY$/org/hamcrest/hamcrest-library/1.1/hamcrest-library-1.1-javadoc.jar!/" />
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://$M2_REPOSITORY$/org/hamcrest/hamcrest-library/1.1/hamcrest-library-1.1-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="org.jmock:jmock-junit4:2.4.0">
+        <CLASSES>
+          <root url="jar://$M2_REPOSITORY$/org/jmock/jmock-junit4/2.4.0/jmock-junit4-2.4.0.jar!/" />
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://$M2_REPOSITORY$/org/jmock/jmock-junit4/2.4.0/jmock-junit4-2.4.0-javadoc.jar!/" />
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://$M2_REPOSITORY$/org/jmock/jmock-junit4/2.4.0/jmock-junit4-2.4.0-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="org.jmock:jmock:2.4.0">
+        <CLASSES>
+          <root url="jar://$M2_REPOSITORY$/org/jmock/jmock/2.4.0/jmock-2.4.0.jar!/" />
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://$M2_REPOSITORY$/org/jmock/jmock/2.4.0/jmock-2.4.0-javadoc.jar!/" />
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://$M2_REPOSITORY$/org/jmock/jmock/2.4.0/jmock-2.4.0-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module" module-name="picocontainer-gems" exported="" />
+    <orderEntry type="module" module-name="picocontainer-tck" exported="" />
+    <orderEntry type="module" module-name="picocontainer" exported="" />
+    <orderEntry type="module-library" exported="">
+      <library name="xpp3:xpp3_min:1.1.3.4.O">
+        <CLASSES>
+          <root url="jar://$M2_REPOSITORY$/xpp3/xpp3_min/1.1.3.4.O/xpp3_min-1.1.3.4.O.jar!/" />
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://$M2_REPOSITORY$/xpp3/xpp3_min/1.1.3.4.O/xpp3_min-1.1.3.4.O-javadoc.jar!/" />
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://$M2_REPOSITORY$/xpp3/xpp3_min/1.1.3.4.O/xpp3_min-1.1.3.4.O-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntryProperties />
+  </component>
+</module>
+

Added: incubator/composer/trunk/composer-site/pom.xml
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/pom.xml?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/pom.xml (added)
+++ incubator/composer/trunk/composer-site/pom.xml Sun Feb  3 22:33:20 2008
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.picocontainer</groupId>
+    <artifactId>picocontainer-parent</artifactId>
+    <version>2.1-SNAPSHOT</version>
+  </parent>
+  <artifactId>picocontainer-distribution</artifactId>
+  <packaging>pom</packaging>
+  <name>Picocontainer Distribution</name>
+  <dependencies>
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>picocontainer</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>picocontainer-gems</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>picocontainer-tck</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>unpack</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+            <configuration>
+              <overWriteReleases>false</overWriteReleases>
+              <overWriteSnapshots>true</overWriteSnapshots>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>${pom.groupId}</groupId>
+                  <artifactId>picocontainer</artifactId>
+                  <version>${pom.version}</version>
+                  <classifier>javadoc</classifier>
+                  <outputDirectory>${project.build.directory}/site/javadoc/core</outputDirectory>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>${pom.groupId}</groupId>
+                  <artifactId>picocontainer-gems</artifactId>
+                  <version>${pom.version}</version>
+                  <classifier>javadoc</classifier>
+                  <outputDirectory>${project.build.directory}/site/javadoc/gems</outputDirectory>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>${pom.groupId}</groupId>
+                  <artifactId>picocontainer-tck</artifactId>
+                  <version>${pom.version}</version>
+                  <classifier>javadoc</classifier>
+                  <outputDirectory>${project.build.directory}/site/javadoc/tck</outputDirectory>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <!--
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>bin</id>
+            <phase>install</phase>
+            <goals>
+              <goal>assembly</goal>
+            </goals>
+            <configuration>
+              <descriptor>${basedir}/src/assembly/assembly-bin.xml</descriptor>
+              <finalName>picocontainer-${pom.version}</finalName>
+              <workDirectory>target/assembly/bin</workDirectory>
+            </configuration>
+          </execution>
+          <execution>
+            <id>src</id>
+            <phase>install</phase>
+            <goals>
+              <goal>assembly</goal>
+            </goals>
+            <configuration>
+              <descriptor>${basedir}/src/assembly/assembly-src.xml</descriptor>
+              <finalName>picocontainer-${pom.version}</finalName>
+              <workDirectory>target/assembly/src</workDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>   -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <configuration>
+          <includeProjectDocumentation>false</includeProjectDocumentation>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>install</phase>
+            <goals>
+              <goal>site</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.xsite</groupId>
+        <artifactId>xsite-maven-plugin</artifactId>
+        <configuration>
+          <sourceDirectoryPath>${basedir}/src/site</sourceDirectoryPath>
+          <sitemapPath>content/sitemap.xml</sitemapPath>
+          <skinPath>templates/skin.html</skinPath>
+          <resourcePaths>resources</resourcePaths>
+          <outputDirectoryPath>${project.build.directory}/site</outputDirectoryPath>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>install</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
\ No newline at end of file

Added: incubator/composer/trunk/composer-site/src/assembly/assembly-bin.xml
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/assembly/assembly-bin.xml?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/assembly/assembly-bin.xml (added)
+++ incubator/composer/trunk/composer-site/src/assembly/assembly-bin.xml Sun Feb  3 22:33:20 2008
@@ -0,0 +1,26 @@
+<assembly>
+	<id>bin</id>
+	<formats>
+		<format>zip</format>
+	</formats>
+	<fileSets>
+		<fileSet>
+			<directory>..</directory>
+			<outputDirectory>/</outputDirectory>
+			<includes>
+				<include>LICENSE.txt</include>
+			</includes>
+		</fileSet>
+        <fileSet>
+            <directory>target/javadoc</directory>
+            <outputDirectory>/javadoc</outputDirectory>
+        </fileSet>
+    </fileSets>
+	<dependencySets>
+		<dependencySet>
+			<outputDirectory>/lib</outputDirectory>
+			<unpack>false</unpack>
+			<scope>runtime</scope>
+		</dependencySet>
+	</dependencySets>
+</assembly>
\ No newline at end of file

Added: incubator/composer/trunk/composer-site/src/assembly/assembly-src.xml
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/assembly/assembly-src.xml?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/assembly/assembly-src.xml (added)
+++ incubator/composer/trunk/composer-site/src/assembly/assembly-src.xml Sun Feb  3 22:33:20 2008
@@ -0,0 +1,24 @@
+<assembly>
+	<id>src</id>
+	<formats>
+		<format>zip</format>
+	</formats>
+	<fileSets>
+		<fileSet>
+			<directory>..</directory>
+			<outputDirectory>/</outputDirectory>
+			<excludes>
+            	<exclude>**/build/**</exclude>
+            	<exclude>**/target/**</exclude>
+            	<exclude>**/.*/**</exclude>
+            	<exclude>**/.*</exclude>
+            	<exclude>**/cobertura.ser</exclude>
+            	<exclude>**/release.properties</exclude>
+            	<exclude>**/surefire*.properties</exclude>
+            	<exclude>**/*~</exclude>
+            	<exclude>**/*.bak</exclude>
+            	<exclude>**/*.classpath</exclude>
+      		</excludes>			
+		</fileSet>
+	</fileSets>
+</assembly>

Added: incubator/composer/trunk/composer-site/src/resources/images/pico-logo.png
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/resources/images/pico-logo.png?rev=618174&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/composer/trunk/composer-site/src/resources/images/pico-logo.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/composer/trunk/composer-site/src/resources/style/maven-pico-javadoc.css
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/resources/style/maven-pico-javadoc.css?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/resources/style/maven-pico-javadoc.css (added)
+++ incubator/composer/trunk/composer-site/src/resources/style/maven-pico-javadoc.css Sun Feb  3 22:33:20 2008
@@ -0,0 +1,50 @@
+/* Javadoc style sheet */
+
+/* Define colors, fonts and other style attributes here to override the defaults  */
+
+/* Page background color */
+body { background-color: #FFFFFF }
+
+a:link {
+  color:#177154;
+}
+a:visited  {
+  color:#2aa426;
+}
+a:active, a:hover {
+  color:#ff5a00;
+}
+
+.a td {
+ background: #7ee27c;
+ color: #000;
+}
+
+/* Table colors */
+.TableHeadingColor     { background: #2aa256; color:#FFFFFF } /* Dark blue */
+.TableSubHeadingColor  { background: #7ee27c; color:#fff } /* Dark grey */
+.TableRowColor         { background: #f5f4f1 } /* White */
+.TableHeadingColor td  { border: 1px solid #7ee27c }
+.TableSubHeadingColor td { border: 1px solid #2aa256 }
+.TableRowColor td      { border: 1px solid #2aa256 }
+
+/* Font used in left-hand frame lists */
+.FrameTitleFont   { font-size: normal; font-family: Arial, Helvetica, sans-serif; color:#000000 }
+.FrameHeadingFont { font-size: normal; font-family: Arial, Helvetica, sans-serif; color:#000000 }
+.FrameItemFont    { font-size: normal; font-family: Arial, Helvetica, sans-serif; color:#000000 }
+
+/* Example of smaller, sans-serif font in frames */
+/* .FrameItemFont  { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
+
+/* Navigation bar fonts and colors */
+.NavBarCell1    { background-color:#7ee27c;}/* Light mauve */
+.NavBarCell1Rev { background-color:#2aa256;}/* Dark Blue */
+.NavBarFont1    { font-family: Arial, Helvetica, sans-serif; color:#000000;}
+.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
+
+.NavBarCell2    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
+.NavBarCell3    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
+
+table           { border-spacing:0; border-collapse:collapse; }
+hr              { border: 1px solid #2aa256 }
+.logo           { width: 112px; height: 35px }

Added: incubator/composer/trunk/composer-site/src/resources/style/maven-pico-theme.css
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/resources/style/maven-pico-theme.css?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/resources/style/maven-pico-theme.css (added)
+++ incubator/composer/trunk/composer-site/src/resources/style/maven-pico-theme.css Sun Feb  3 22:33:20 2008
@@ -0,0 +1,86 @@
+body {
+  margin: 0;
+  color:#0a2509;
+  background-color: #fff;
+}
+body, td, select, input, li{
+  font-family: Verdana, Helvetica, Arial, sans-serif;
+  font-size: 12px;
+}
+a {
+  text-decoration: none;
+}
+a:link {
+  color:#177154;
+}
+a:visited  {
+  color:#2aa426;
+}
+a:active, a:hover {
+  color:#ff5a00;
+}
+h2 {
+  padding: 4px 4px 4px 6px;
+  border: 1px solid #7ee27c;
+  color: #fff;
+  background-color: #2aa526;
+  font-weight: 900;
+  font-size: x-large;
+}
+h3 {
+  padding: 4px 4px 4px 6px;
+  border: 1px solid #2aa526;
+  color: #0a2509;
+  background-color: #7ee27c;
+  font-weight: 500;
+  font-size: large;
+}
+p {
+  line-height: 1.2em;
+  font-size: 1em;
+}
+#breadcrumbs {
+  border-top: 1px solid #2aa526;
+  border-bottom: 1px solid #2aa526;
+  background-color: #7ee27c;
+  font-size: small;
+}
+#leftColumn {
+  margin: 10px 0 0 10px;
+  border: 1px solid #2aa526;
+  background-color: #ebebeb;
+}
+#navcolumn h5 {
+   font-size: smaller;
+   border-bottom: 1px solid #2aa526;
+   padding-top: 2px;
+}
+
+table {
+  border-spacing:0;
+  border-collapse:collapse;
+}
+
+table.bodyTable th {
+  color: #686868;
+  background-color: #e5e3db;
+  text-align: left;
+  font-weight: bold;
+}
+
+table.bodyTable th, table.bodyTable td {
+  border: 1px solid #2aa526;
+  font-size: 1em;
+}
+
+table.bodyTable tr.a {
+  background-color: #f5f4f1;
+}
+
+table.bodyTable tr.b {
+  background-color: #f5f4f1;
+}
+
+.source {
+  border: 1px solid #2aa526;
+}

Added: incubator/composer/trunk/composer-site/src/site/content/CommandLineArgumentsPicoContainer.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/CommandLineArgumentsPicoContainer.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/CommandLineArgumentsPicoContainer.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/CommandLineArgumentsPicoContainer.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+<title>CommandLineArgumentsApache Composer</title>
+</head>
+<body>
+<p>
+CommandLineArgumentsApache Composer is a special type of Apache Composer that processes the arguments passed into from the command line, and sets them up as configuration for other components. 
+<p>Here is an example of how to use CommandLineArgumentsApache Composer to map command line arguments as configuration for a component, with parameter names as the bindings.
+<p>Consider this component:
+<div class="source">
+    <pre>public class BigFatComponent {
+  URL spellWebService;
+  int timeout;
+  public BigFatComponent(String spellingWebServiceURL, int timeout) throws MalformedURLExeption {
+    this.spellWebService = new URL(spellingWebServiceURL);
+    this.timeout = timeout;
+  }  
+  public String toString() {
+    return &quot;URL=&quot; + spellWebService + &quot;, timeout=&quot; + timeout;  
+  }
+
+  // other methods
+}
+
+</pre>
+</div>
+<p>For automatic binding of command line arguments to parameter names of the component:</p>
+<div class="source">
+<pre>public static void main(String[] args) {
+    Apache Composer argsContainer = new CommandLineArgumentsApache Composer(args);
+                
+    MutableApache Composer mpc = new DefaultApache Composer(argsContainer);
+                
+    mpc.as(Characteristics.USE_NAMES).addComponent(BigFatComponent.class);
+   
+    Object o = mpc.getComponent(BigFatComponent.class);
+
+}
+
+...
+
+java -jar myAppJar.jar -cp picocontainer-2.0.jar timeout=100 spellingWebServiceURL=http://ws.com/someService.wsdl</pre>
+</div>
+<p>Here is another manual use forcing an association between a item in the properties file, and the relative position of a parameter in the constructor:</p>
+<div class="source">
+<pre>mpc.addComponent(BigFatComponent.class, ConfigParameter(&quot;config1&quot;), ConfigParameter(&quot;moreConfig&quot;));
+...
+
+java -jar myAppJar.jar -cp picocontainer-2.0.jar config1=http://ws.com/someService.wsd moreConfig=100 </pre>
+</div>
+<p>Type conversion is automatic in many cases. Properties in a properties file are clearly strings. Parameters can be any of:</p>
+        <ul>
+          <li> String </li>
+          <li> All numeric types, boxed as well as primitives </li>
+          <li> java.util.Date </li>
+          <li> java.io.File as well as java.io.URL </li>
+          <li> java.util.Date </li>
+          <li> java.sql.(Date|Time|Timestamp) </li>
+          <li> Any type sporting accessible constructor taking single string parameter. </li>
+</ul>
+        <p>CommandLineArgumentsApache Composer can be part of a tree of containers. It makes sense, of course, being more near the root of that tree.</p>
+</body>
+
+
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/DefaultPicoContainer.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/DefaultPicoContainer.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/DefaultPicoContainer.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/DefaultPicoContainer.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+<title>DefaultApache Composer</title>
+</head>
+<body>
+<p>
+DefaultApache Composer is the main workhorse container.  
+<p>Here is an example of use:
+<div class="source">
+<pre>DefaultApache Composer dpc = new DefaultApache Composer();
+dpc.addComponent(Foo.class, FooImpl.class);
+Foo foo = dpc.getComponent(Foo.class)</pre>
+</div>
+<p>Parameters in its  constructors can be:</p>
+<ul>
+  <li><a href="behaviors.html">Behavior Factories or Component Factories</a></li>
+  <li><a href="lifecycle.html">Lifecycle Strategies</a></li>
+  <li><a href="monitors.html">Component Monitors</a></li>
+  <li>Parent Containers of various types</li>
+</ul>
+</body>
+
+
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/ImmutablePicoContainer.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/ImmutablePicoContainer.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/ImmutablePicoContainer.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/ImmutablePicoContainer.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+<title>TransientApache Composer</title>
+</head>
+<body>
+<p>
+ImmutableApache Composer is wapper mechanims for a MutableApache Composer. The resulting reference is not able to accept mutating method invocations by any means.
+<p>Here is an example of use:
+<div class="source">
+<pre>Apache Composer imPC = new ImmutableApache Composer(someMutableContainer);
+
+// imPC has no addComponent methods nor is it castable back to MutableApache Composer</pre>
+</div>
+</body>
+
+
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/PropertiesPicoContainer.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/PropertiesPicoContainer.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/PropertiesPicoContainer.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/PropertiesPicoContainer.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+<title>PropertiesApache Composer</title>
+</head>
+<body>
+<p>
+PropertiesApache Composer is a special type of Apache Composer that is populated from the entries in a properties file. 
+<p>Here is an example of how to use PropertiesApache Composer to map properties  as configuration for a component, with parameter names as the bindings.<br />
+<p>Consider this component:
+<div class="source">
+    <pre>public class BigFatComponent {
+  URL spellWebService;
+  int timeout;
+  public BigFatComponent(String spellingWebServiceURL, int timeout) throws MalformedURLExeption {
+    this.spellWebService = new URL(spellingWebServiceURL);
+    this.timeout = timeout;
+  }  
+  public String toString() {
+    return &quot;URL=&quot; + spellWebService + &quot;, timeout=&quot; + timeout;  
+  }
+
+  // other methods
+}
+
+</pre>
+</div>
+<p>For automatic binding of properties to parameter names of the component:</p>
+<div class="source">
+<pre>Properties defaultProperties = new Properties();
+defaultProperties.load("my-application.properties");
+        
+// default properties are taken from here
+Apache Composer propsContainer = new PropertiesApache Composer(defaultProperties);
+                
+MutableApache Composer mpc = new DefaultApache Composer(propsContainer);
+                
+mpc.as(Characteristics.USE_NAMES).addComponent(BigFatComponent.class);
+</pre>
+</div>
+<p>Here is another manual use forcing an association between a item in the properties file, and the relative position of a parameter in the constructor. It is most useful when there is not a tie-up between the parameter names and the properties. In this case the arg passed in to the ConfigParameter (varargs list) is the one that matches the property name:</p>
+<div class="source">
+<pre>mpc.addComponent(BigFatComponent.class, ConfigParameter(&quot;wsURL&quot;), ConfigParameter(&quot;serviceTimeout&quot;));</pre>
+    </div>
+<p>Type conversion is automatic in many cases. Properties in a properties file are clearly strings. Parameters can be any of:</p>
+        <ul>
+          <li> String </li>
+          <li> All numeric types, boxed as well as primitives </li>
+          <li> java.util.Date </li>
+          <li> java.io.File as well as java.io.URL </li>
+          <li> java.util.Date </li>
+          <li> java.sql.(Date|Time|Timestamp) </li>
+          <li> Any type sporting accessible constructor taking single string parameter. </li>
+</ul>
+        <p>PropertiesApache Composer can be part of a tree of containers. It makes sense, of course, being more near the root of that tree.</p>
+</body>
+
+
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/SystemPropertiesPicoContainer.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/SystemPropertiesPicoContainer.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/SystemPropertiesPicoContainer.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/SystemPropertiesPicoContainer.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+<title>SystemPropertiesApache Composer</title>
+</head>
+<body>
+<p>
+SystemPropertiesApache Composer is a special type of Apache Composer that is populated from the <a href="http://www.mindspring.com/~mgrand/java-system-properties.htm">System Properties</a> passed into the Java application when it started. 
+<p>Here is an example of how to use SystemPropertiesApache Composer to map system properties  as configuration for a component, with parameter names as the bindings.
+<p>Consider this component:
+
+<div class="source">
+  <pre>public class BigFatComponent {
+  URL spellWebService;
+  int timeout;
+  public BigFatComponent(String spellingWebServiceURL, int timeout) throws MalformedURLExeption {
+    this.spellWebService = new URL(spellingWebServiceURL);
+    this.timeout = timeout;
+  }  
+  public String toString() {
+    return &quot;URL=&quot; + spellWebService + &quot;, timeout=&quot; + timeout;  
+  }
+
+  // other methods
+}
+
+</pre>
+</div>
+<p>For automatic binding of system properties to parameter names of the component:</p>
+<div class="source">
+  <pre>
+Apache Composer syspropsContainer = new SystemPropertiesApache Composer();
+                
+MutableApache Composer mpc = new DefaultApache Composer(syspropsContainer);
+                
+mpc.as(Characteristics.USE_NAMES).addComponent(BigFatComponent.class);
+</pre>
+</div>
+<p>Here is another manual use forcing an association between a system properties, and the relative position of a parameter in the constructor. It is most useful when there is not a tie-up between the parameter names and the system properties. In this case the arg passed in to the ConfigParameter (varargs list) is the one that matches the syst property name:</p>
+<div class="source">
+  <pre>mpc.addComponent(BigFatComponent.class, ConfigParameter(&quot;wsURL&quot;), ConfigParameter(&quot;serviceTimeout&quot;));</pre>
+</div>
+<p> System properties can be set for the scope of the application only, as you start the application: </p>
+<div class="source">
+<pre>
+java -Dwebservice.url=http://servicehost/service -Dwebservice.timeout=50 -jar myAppJar.jar -cp picocontainer-2.0.jar</pre>
+</div>
+<p>Type conversion is automatic in many cases. Properties in a properties file are clearly strings. Parameters can be any of:</p>
+<ul>
+  <li> String </li>
+  <li> All numeric types, boxed as well as primitives </li>
+  <li> java.util.Date </li>
+  <li> java.io.File as well as java.io.URL </li>
+  <li> java.util.Date </li>
+  <li> java.sql.(Date|Time|Timestamp) </li>
+  <li> Any type sporting accessible constructor taking single string parameter. </li>
+</ul>
+<p>SystemPropertiesApache Composer can be part of a tree of containers. It makes sense, of course, being more near the root of that tree.</p>
+</body>
+
+
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/TransientPicoContainer.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/TransientPicoContainer.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/TransientPicoContainer.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/TransientPicoContainer.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+<title>TransientApache Composer</title>
+</head>
+<body>
+<p>
+TransientApache Composer is a for short term needs for object instantion, where the container is going to be de-referenced shortly after use.
+<p>Here is an example of use:
+<div class="source">
+<pre>public Foo makeSuitableFoo() {
+    MutableApache Composer temp = new TransientApache Composer(someParentContainer);
+    temp.addComponent(somethingElseThatMightBeNeeded);  // by instance
+    temp.addComponent(Foo.class, FooImpleThatNeedsTheAbove.class); // by type
+    return temo.getComponent(Foo.class);
+}
+</pre>
+</div>
+</body>
+
+
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/adapters.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/adapters.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/adapters.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/adapters.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+<title>Adapters</title></head>
+<body>
+<p>Each time  you use addComponent(..) on Apache Composer, behind the scenes a ComponentAdapter instance is set up. There is one ComponentAdapter implementation per component instance. The ComponentAdapters can be added to a container directly, or made by the ComponentFactory the container is using. Both for BehaviorFactory and InjectionFactory implementations. Its all kinda hidden from you to make Apache Composer's API appear simple.</p>
+<h3>Using ComponentAdapter directly. </h3>
+<p>Some examples : </p>
+<div class="source">
+  <pre>public class MyAdapter extends AbstractAdapter {
+  private QuantumEntanglement qe = new QuantumEntanglementImpl.class
+  public MyAdapter() {
+    super(QuantumEntanglement.class, QuantumEntanglementImpl.class);
+  }
+  public Object getComponent(Apache Composer pico) {
+    Auditor a = pico.getComponent(Auditor.class);
+    a.audit("QE used", new Date());
+    return qe;
+  }
+  public void verify(Apache Composer container) {
+  }
+}
+...
+pico = new DefaultApache Composer();
+pico.addAdapter(new MyAdapter());
+QuantumEntanglement e = pico.getComponent(QuantumEntanglement.class);
+</pre>
+</div>
+</body>
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/antipatterns/container-dependency-antipattern.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/antipatterns/container-dependency-antipattern.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/antipatterns/container-dependency-antipattern.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/antipatterns/container-dependency-antipattern.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <title>Container Dependency</title>
+</head>
+<body>
+<div>
+    <h2>Symptoms</h2>
+
+    <p>Classes that depend on the container.</p>
+
+    <p>Consider the following example. We have a class BImpl that requires an A instance. It declares the dependency on
+       the container so it can look up that A:</p>
+
+    <div class="source">
+        <div>
+            <pre>public interface A {
+}
+
+public class AImpl implements A {
+}
+
+public class BImpl implements B {
+    private final A a;
+
+    BImpl(Apache Composer pico) {
+        a = (A) pico.getComponentOfType(A.class);
+        
+        /*
+        alternatively:
+        a = (A) pico.getComponent(&quot;a&quot;);
+        */
+    }
+}</pre>
+        </div>
+    </div>
+    <p>It can be used in the following way:</p>
+
+    <div class="source">
+        <div>
+            <pre>MutableApache Composer pico = new DefaultApache Composer();
+pico.addComponent(&quot;a&quot;, AImpl.class);
+pico.addComponent(&quot;b&quot;, BImpl.class);
+pico.addComponent(pico);
+
+...
+B b = (B) pico.getComponent(&quot;b&quot;);</pre>
+        </div>
+    </div>
+    <p>This will work, but it's an antipattern. </p>
+
+    <p>The reasons why the above implementation of BImpl is an antipattern are:</p>
+    <ul>
+        <li>It introduces an unneeded dependency from BImpl to the container.</li>
+        <li>This makes BImpl hard to test without a container.</li>
+        <li>B assumes that the container has a registered an A. As a result, B won't FailFast if it hasn't. Instead, a
+            will reference null, and BImpl will FailLate.
+        </li>
+    </ul>
+</div>
+<div>
+    <h2>Causes</h2>
+
+    <p>Not sure. Poor understanding of how Apache Composer works? Not being able to think &quot;simple&quot;?</p>
+</div>
+<div>
+    <h2>What to do</h2>
+
+    <p>The simple and elegant solution to this antipattern is not to complicate the world more than it is.<br />
+        <br />
+       Here is how it should be:</p>
+
+    <div class="source">
+        <div>
+            <pre>public class BImpl implements B {
+    private final A a;
+
+    BImpl(A a) {
+        this.a = a;
+    }
+}</pre>
+        </div>
+    </div>
+    <p>Apache Composer will figure out that BImpl needs an A instance, and will pass in the AImpl, as this is an
+       implementation of A.</p>
+</div>
+</body>
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/antipatterns/long-constructor-argument-list-antipattern.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/antipatterns/long-constructor-argument-list-antipattern.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/antipatterns/long-constructor-argument-list-antipattern.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/antipatterns/long-constructor-argument-list-antipattern.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <title>Long Constructor Argument List</title>
+</head>
+<body>
+<div>
+    <h2>Symptoms</h2>
+
+    <p>The constructor for an object takes a long list of arguments. </p>
+</div>
+<div>
+    <h2>Causes</h2>
+    <ul>
+        <li>Can be a result of <a href="propagating-dependency-antipattern.html" title="Propagating Dependency">Propagating
+                                                                                                                Dependency</a>.
+        </li>
+        <li>Class is concerned with doing more than one thing and therefore has many dependencies.</li>
+    </ul>
+</div>
+<div>
+    <h2>What To Do</h2>
+
+    <p>If the class is doing too much, it should be refactored into a set of smaller classes. Each class should have a
+       clearly defined responsibility and therefore a smaller set of dependencies.</p>
+</div>
+</body>
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/antipatterns/propagating-dependency-antipattern.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/antipatterns/propagating-dependency-antipattern.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/antipatterns/propagating-dependency-antipattern.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/antipatterns/propagating-dependency-antipattern.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <title>Propagating Dependency</title>
+</head>
+<body>
+<div>
+    <h2>Symptoms</h2>
+
+    <p>A dependency exists solely to be propagated to another class, but no methods are called upon the dependent object
+       itself. For example:</p>
+
+    <div class="source">
+        <div>
+            <pre>public class AControllerImpl implements AController {
+
+    private SomeService service;
+    private int someId;
+
+    public AControllerImpl(SomeService service) {
+        this.service = service;
+        this.someId = generateRandomNumber();
+    }
+
+    public launchAnotherController() {
+        AnotherController anotherController = new AnotherControllerImpl(service, fooId);
+        anotherController.launch();
+    }
+
+    // ...
+}</pre>
+        </div>
+    </div>
+    <p>In this example, no method-calls are made upon 'service', it is simply propagated to the constructor of
+       'AnotherControllerImpl'. Therefore, it is not a valid dependency for 'AControllerImpl'. </p>
+</div>
+<div>
+    <h2>Causes</h2>
+
+    <p>DependencyInjection has been partially applied to a hierarchy of classes. This could be because some classes in
+       the hierarchy depend upon instance state not available at container-registration time.</p>
+</div>
+<div>
+    <h2>What To Do</h2>
+
+    <p>Apply DependencyInjection to 'AControllerImpl' by replacing the dependency on 'SomeService' with a dependency on
+       'AnotherController'. If, as in the example above, 'AnotherControllerImpl' has a dependency upon some state that
+       is not available at container-registration time, then we need to introduce a factory for creating
+       'AnotherController' as follows:</p>
+
+    <p>TODO: This is maybe a little contrieved for this example. Maybe remove or simplify. (AH).</p>
+
+    <div class="source">
+        <div>
+            <pre>public class AControllerImpl implements AController {
+
+    private AnotherControllerFactory anotherControllerFactory;
+    private int someId;
+
+    public AControllerImpl(AnotherControllerFactory anotherControllerFactory) {
+        this.anotherControllerFactory = anotherControllerFactory;
+        this.someId = generateRandomNumber();
+    }
+
+    public launchAnotherController() {
+        AnotherController anotherController = anotherControllerFactory.createAnotherController(someId);
+        anotherController.launch();
+    }
+
+    // ...
+}</pre>
+        </div>
+    </div>
+    <p>'AnotherControllerFactory' is an interface:</p>
+
+    <div class="source">
+        <div>
+            <pre>public interface AnotherControllerFactory {
+    AnotherController createAnotherController(int someId);
+}</pre>
+        </div>
+    </div>
+    <p>It can be implemented as follows::</p>
+
+    <div class="source">
+        <div>
+            <pre>public class AnotherControllerFactoryImpl implements AnotherControllerFactory {
+    private SomeService service;
+
+    public AnotherControllerFactoryImpl(SomeService service) {
+        this.service = service;
+    }
+
+    public AnotherController createAnotherController(int someId) {
+        return new AnotherControllerImpl(service, someId);
+    }
+}</pre>
+        </div>
+    </div>
+    <p>Now we can register both 'AControllerImpl' and 'AnotherControllerFactoryImpl' in the container. When
+       'AControllerImpl' is instantiated, it is supplied with an implementation of 'AnotherControlFactory' that it can
+       use to create an 'AnotherController' instance.</p>
+
+    <div class="section_1">
+        <h1>Exceptions</h1>
+
+        <p>When [Migrating from executors to services], it can sometimes be difficult to avoid introducing a Propagating
+           Dependency. In these cases, the Propogating Dependency can be considered as a good first step towards
+           making a set of classes good for Apache Composer. An effort should be made to complete decomposition at some stage by making a
+           series of further steps as described above.</p>
+    </div>
+</div>
+
+</body>
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/antipatterns/singleton-antipattern.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/antipatterns/singleton-antipattern.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/antipatterns/singleton-antipattern.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/antipatterns/singleton-antipattern.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <title>Singleton</title>
+</head>
+<body>
+<p>The singleton pattern was described in the GoF <a href="http://en.wikipedia.org/wiki/Design_Patterns">Design
+                                                                                                         Patterns</a>
+   book. Because of its static nature and global availability, it allows component writers to obscurely reference other
+   components. Overuse makes for bad solutions. Overuse at the enterprise level, it makes for very bad solutions.</p>
+
+<p>We claim that the GoF Singleton pattern is, in fact, quite often an anti-pattern. The downside of the singleton is
+   that there are many transitive dependancies that are not easy to spot. Singletons cannot easily be replaced with <a
+    href="mock-objects.html" title="Mock Objects">Mock Objects</a> for the sake of easy unit testing.</p>
+
+<p>With Apache Composer we would replace this with a container <em>managed single instance</em>, possibly in a container
+   hierarchy (see <a href="introduction.html">Introduction</a>
+   and <a href="behaviors.html" title="Caching">Caching</a>).</p>
+
+<p>Quite often with J2EE solutions, the component model is honored to a degree for the sake of external APIs, but is
+   sidestepped for the sake of the internals of the application. Session beans Foo and Bar are likely to leverage a
+   hairball of singletons to achieve their ends. Systems developed along these lines, rapidly become entangled and
+   unmaintainable. These entangled systems can also be referred to as:</p>
+<ul>
+    <li>Raymen Noodle Design</li>
+    <li>Big Ball of Mud <a href="http://www.laputan.org/pub/foote/mud.pdf">http://www.laputan.org/pub/foote/mud.pdf</a>
+    </li>
+    <li>Spaghetti Code</li>
+</ul>
+<p>In case its not clear, Singletons as a core feature of a component design are mutually exclusive with <a
+    href="inversion-of-control.html">Inversion of Control</a>.</p>
+</body>
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/antipatterns/tests-use-container-antipattern.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/antipatterns/tests-use-container-antipattern.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/antipatterns/tests-use-container-antipattern.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/antipatterns/tests-use-container-antipattern.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <title>Tests Use Container</title>
+</head>
+<body>
+<div>
+    <h2>Symptoms</h2>
+
+    <p> A class is directly instantiating a Apache Composer and registering components within it. </p>
+</div>
+<div>
+    <h2>Causes</h2>
+
+<p>This smell is most often found in unit tests. It could be as a
+result of Container Dependency. The container is supplied to the class
+being tested, which then uses it to locate its dependencies.</p>
+
+<p>Another cause is using the container to build the object we are testing, which itself may have several
+       dependencies. For example::</p>
+
+    <div class="source">
+        <div>
+            <pre>public void testCocktailWithVodkaIsAlcoholic() {
+    DefaultApache Composer container = new DefaultApache Composer();
+    container.addComponent(Banana.class);
+    container.addComponent(Vanilla.class);
+    container.addComponent(Vodka.class);
+    container.addComponent(Cocktail.class);
+
+    Cocktail cocktail = (Cocktail) container.getComponent(Cocktail.class);
+
+    assertTrue(cocktail.isAlcoholic());
+}</pre>
+        </div>
+    </div>
+</div>
+<div>
+    <h2>What To Do</h2>
+
+<p>For unit tests like this, the class being tested should be
+instantiated directly by the test. <a href="mock-objects.html"
+  title="Mock Objects">Mock Objects</a> should be used to
+&quot;mock&quot; the dependent objects, i.e. supplying a fake
+implementation that can have expectations set and verified on it, rather
+than a real implementataion. So, the test becomes:</p>
+
+<div class="source">
+        <div>
+            <pre>public void testCocktailWithVodkaIsAlcoholic() {
+
+    Banana banana = createMockBanana();
+    Vanilla vanilla = createMockVanilla();
+    Vodka vodka = createMockVodka();
+
+    // set expectations on banana, vanilla and vodka here.
+
+    Cocktail cocktail = new Cocktail(banana, vanilla, vodka);
+    assertTrue(cocktail.isAlcoholic());
+
+    // verify expectations on banana, vanilla and vodka here.
+}</pre>
+        </div>
+    </div>
+    <p>The implementation details of creating a mock object and setting and verifying expectations have been left out of
+       the example, as the details depend on which mock object library/technique is used.</p>
+</div>
+<div>
+    <h2>Exceptions</h2>
+
+    <p>The container has to be instantiated somewhere!</p>
+
+    <div>
+        <h3>Bootstrappers
+        </h3>
+
+        <p>A common place to instantiate containers is in some bootstrap class in the application.</p>
+
+        <div class="section_1">
+            <h1>Functional
+                                                                                                                 Tests
+            </h1>
+
+            <p>There may be a requirement to write a high-level &quot;functional&quot; test, in which you wish to test
+               the interactions between a set of real components (not mocks). In this case, you may wish to create a
+               container with the appropriate components registered for your test.</p>
+
+            <div>
+                <h3>NanoContainer
+                </h3>
+
+                <p>If you are using <a href="http://www.nanocontainer.org" title="Sister Projects">NanoContainer</a>,
+                   you can use NanoContainer's Standalone class (a bootstrapper) to start the application. All the
+                   container configuration can live in a script and NanoContainer (and thereby Apache Composer(s)) will be
+                   instantiated.</p>
+            </div>
+        </div>
+    </div>
+</div>
+
+</body>
+</html>

Added: incubator/composer/trunk/composer-site/src/site/content/behaviors.html
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-site/src/site/content/behaviors.html?rev=618174&view=auto
==============================================================================
--- incubator/composer/trunk/composer-site/src/site/content/behaviors.html (added)
+++ incubator/composer/trunk/composer-site/src/site/content/behaviors.html Sun Feb  3 22:33:20 2008
@@ -0,0 +1,464 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <title>Modifying Behaviors</title>
+
+    <style type="text/css">
+<!--
+.style1 {font-family: "Courier New", Courier, monospace}
+-->
+    </style>
+</head>
+<body>
+<p>Components as managed by Apache Composer can have behaviors added
+   to them by the container during instantiation.</p>
+
+<p>Behaviors are deleivered by passing a BehaviorFactory reference into the Apache Composer instance on construction. For
+   the most part BehaviorFactories are completely stateless.</p>
+<p>See below for details on <a href="#cns">Caching and Singletons</a>, <a href="#hasi">Implementation Hiding and Hot Swapping</a>, as well as <a href="#o">Other</a>  behaviors</p>
+<h3>General use</h3>
+<p>DefaultApache Composer can take a behavior factory instance in its constructor:</p>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer(new BehaviorClass());
+
+pico.addComponent(Foo.class); // the behavior will affect Foo's instance</pre>
+</div>
+<p>Or it can take behaviours that wrap each other:</p>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer(new BehaviorClass().wrap(new AnotherBehaviorClass())); 
+pico.addComponent(Foo.class);  // both behaviors will affect Foo's instance
+</pre>
+</div>
+<p>Behaviors can be signalled by properties per component:</p>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer();
+pico.as(SOME_BEHAVIOR).addComponent(Foo.class);  // the behavior has a property marking it, and the default 
+                                                    component facory understands that property</pre>
+</div>
+<p>You can build a container with the applicable property:</p>
+<div class="source">
+  <pre>pico = new ContainerBuilder().withXxxxxxxx().build();
+pico.addComponent(Foo.class); // the behavior will affect Foo's instance</pre>
+</div>
+<p>Behaviors can be chained together by ContainerBuilder:</p>
+<div class="source">
+  <pre>import static org.picocontainer.behaviors.Behaviors.xxxxxxx;
+...
+pico = new ContainerBuilder().withBehaviors(xxxxxxx(), yyyyyyy()).build();
+pico.addComponent(Foo.class); // both behaviors will affect Foo's instance</pre>
+</div>
+<h2><a name="cns" id="cns"></a>Cashing and Singletons</h2>
+<h3>Caching</h3>
+
+<p>This is where a component has a single instance in the container
+   rather that a new one created each time the container is asked for that
+   type. <a href="http://code.google.com/p/google-guice/">Guice</a> calls
+   this a Singleton. After guice came out we debated this, and decided that
+   we should not call this a Singleton. Another Apache Composer instance
+   could be manging another single instance of the same component, so it
+   does not fit the definition of Singleton as defined in the Design
+   Patterns book.</p>
+
+<p>Choose your style for caching behavior:</p>
+
+<div class="source"><pre>
+pico = new DefaultApache Composer(new Caching());
+pico.addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<div class="source"><pre>
+pico = new DefaultApache Composer();
+pico.as(CACHE).addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<div class="source"><pre>pico = new ContainerBuilder().withCaching().build();
+pico.addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<div class="source">
+  <pre>import static org.picocontainer.behaviors.Behaviors.caching;
+...
+pico = new ContainerBuilder().withBehaviors(caching()).build();
+pico.addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<h3>Opt in Caching</h3>
+<p>This is caching as above, but only when that property is set.</p>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer(new OptinCaching());
+pico.addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// different instances
+</pre>
+</div>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer(new OptinCaching());
+pico.as(CACHE).addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<h3>Thread Caching</h3>
+
+<p>This is where a component has a single instance in the container
+   rather that a new one created each time the container is asked for that
+   type. The difference to 'Caching' is that there is one cache per thread using the container. For the most part you
+   are not going to use this behavior unless you are 100% sure that the muti-threaded application you are writing maps
+   threads to the notional session you are trying to model.</p>
+
+<p>Choose your style for thread caching behavior:</p>
+
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer(new ThreadCaching());
+pico.addComponent(Apple.class);
+new Thread() {
+  public void run() {
+
+    Apple a1 = pico.getComponent(Apple.class);
+
+    Apple a2 = pico.getComponent(Apple.class);
+
+  }
+}).start();
+new Thread() {
+  public void run() {
+    Apple a3 = pico.getComponent(Apple.class);
+  }
+}).start();
+// a1 and a2 are the same instance
+// a1 and a3 are different instances
+</pre>
+</div>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer();
+pico.as(THREAD_CACHE).addComponent(Apple.class);
+
+</pre>
+</div>
+<div class="source">
+    <pre>pico = new ContainerBuilder().withThreadCaching().build();
+pico.addComponent(Apple.class);</pre>
+</div>
+<h3>Storing</h3>
+
+<p>This is where a component has a single instance in the container
+   rather that a new one created each time the container is asked for that
+   type. This is like 'ThreadCaching' as it has the one cache per thread behavior, but the whole store is can be
+   extracted and set outside if you have a referene to the Storing instance. Again you are likely to use this behavior
+   if you are trying to model 'session' behavior. With this one though you able to retrieve the cache from some place
+   associated with the session and set it for the thread before use. After use, it can be extracted and stored back with
+   the sesion.</p>
+
+<p>Only one style is shown here as you will need to hang on to the reference to the BehaviorFactory to make use of
+   it:</p>
+
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer(new Storing());
+pico.addComponent(Apple.class);
+Apple a1, a2, a3
+
+new Thread() {
+  public void run() {
+
+    a1 = pico.getComponent(Apple.class);
+
+    a2 = pico.getComponent(Apple.class);
+
+  }
+}).start();
+new Thread() {
+  public void run() {
+    a3 = pico.getComponent(Apple.class);
+  }
+}).start();
+// a1 and a2 are the same instance
+// a1 and a3 are different instances
+</pre>
+</div>
+<p>The BehaviorFactory for Storing behavior is not stateless. It allows the cache to be set for the thread as well as
+   extracted. Here's a code snippet to illustrate that:</p>
+
+<div class="source">
+  <pre>storing = new Storing();
+pico = new DefaultApache Composer(sc);
+....
+storing.putCacheForThread(httpRequest.getSession().getAttribute(&quot;sessionComponentStore&quot;);
+// do other methods that process request in session concept and may do getComponent(..) from the sesion container.
+httpRequest.getSession().setAttribute(&quot;sessionComponentStore&quot;, sc.getCacheForThread());</pre></div>
+
+<p>See <a href="scopes.html">scopes</a> for another example for a web framework</p>
+
+<h2><a name="hasi" id="hasi"></a>Hiding and Swapping of Implementations</h2>
+<h3>Implementation Hiding</h3>
+<p>This is where the implementation of the component is hidden from
+   other components using it. The instance cannot be cast back to the implementation. It only works if the type has an
+   interface
+   that it implements. </p>
+
+<div class="source"><pre>
+pico = new DefaultApache Composer(new ImplementationHiding());
+pico.addComponent(Apple.class, AppleImpl.class);
+Apple a1 = pico.getComponent(Apple.class);
+// cannot cast back to AppleImpl
+</pre>
+</div>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer();
+pico.as(HIDE_IMPL).addComponent(Apple.class, AppleImpl.class);
+Apple a1 = pico.getComponent(Apple.class);
+// cannot cast back to AppleImpl
+</pre>
+</div>
+<div class="source"><pre>pico = new ContainerBuilder().withImplementationHiding().build();
+pico.addComponent(Apple.class, AppleImpl.class);
+Apple a1 = pico.getComponent(Apple.class);
+// cannot cast back to AppleImpl
+</pre>
+</div>
+<div class="source">
+  <pre>import static org.picocontainer.behaviors.Behaviors.implementationHiding;
+...
+pico = new ContainerBuilder().withBehaviors(implementationHiding()).build();
+pico.addComponent(Apple.class, AppleImpl.class);
+Apple a1 = pico.getComponent(Apple.class);
+// cannot cast back to AppleImpl
+</pre>
+</div>
+
+<p>This behavior leverages Reflection's dynamic proxy capability.   </p>
+<p>There's another implementation hiding behavior called <span class="style1">AsmImplemenationHiding</span> that
+  leverages ASM to make 'more concrete' hidden implementations than is possible via reflection. It generates real classes using <a href="http://asm.objectweb.org/">ASM</a></p>
+<h3>Hot Swapping</h3>
+<p>This builds on the <span class="style1">ASMImplementationHiding</span> behavior above, but also allows the hot swapping of component implementations during use. It has implicit caching behavior too.</p>
+
+<div class="source"><pre>DefaultApache Composer pico = new DefaultApache Composer(new HotSwapping());<br />pico.addComponent(Map.class, HashMap.class);<br />Map firstMap = pico.getComponent(Map.class);<br />firstMap.put(&quot;foo&quot;, &quot;bar&quot;);<br />HotSwappable hs = (HotSwappable) pico.getComponentAdapter(Map.class);<br />Object oldMap = hs.getSwappable().swap(new HashMap());<br />Map secondMap = pico.getComponent(Map.class);<br />secondMap.put(&quot;apple&quot;, &quot;orange&quot;);<br />
+// first map and second map are the same
+// 'foo' is not a key in the map, wereas 'apple' is</pre>
+</div>
+<h2>Thread Safety</h2>
+<p>When components are created by two threads concurrently, with the intention of the instance being cached, it is
+   possible in a small percentage of cases for the first instance into the cache to be replaced with a second instance.
+   To prevent this, you may want to try one of two behaviors to make the operation thread safe.</p>
+<h3>Synchronizing</h3>
+<p>Synchronizing wraps object creation in Java's classic <span class="style1">synchronize</span> feature:</p>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer(new Synchronizing().wrap(new Caching()));
+pico.addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer();
+pico.as(SYNCHRONIZE, CACHE).addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<div class="source">
+    <pre>pico = new ContainerBuilder().withSynchronizing().withCaching().build();
+pico.addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<div class="source">
+  <pre>import static org.picocontainer.behaviors.Behaviors.synchronizing;
+import static org.picocontainer.behaviors.Behaviors.caching;
+...
+pico = new ContainerBuilder().withBehaviors(synchronizing(), caching()).build();
+pico.addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<h3>Locking</h3>
+<p>Locking wraps object creation in JDK 1.5's ReentrantLock facility. It is suggested that this is a more efficient alternative to the <span class="style1">Synchronizing</span> behaviour above:</p>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer(new Locking().wrap(new Caching()));
+pico.addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer();
+pico.as(LOCK, CACHE).addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<div class="source">
+  <pre>pico = new ContainerBuilder().withLocking().withCaching().build();
+pico.addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+<div class="source">
+  <pre>import static org.picocontainer.behaviors.Behaviors.locking;
+import static org.picocontainer.behaviors.Behaviors.caching;
+...
+pico = new ContainerBuilder().withBehaviors(synchronizing(), caching()).build();
+pico.addComponent(Apple.class);
+Apple a1 = pico.getComponent(Apple.class);
+Apple a2 = pico.getComponent(Apple.class);
+// both the same instance
+</pre>
+</div>
+
+<h2><a name="o" id="o"></a>Others</h2>
+<h3>Property Applying</h3>
+<p>This is where there are a number of setters for a component that will be could be set after instantiation. A way of
+   handing in some configuration if you like.</p>
+
+<div class="source">
+  <pre>
+class Foo {
+  String message;
+  public void setMessage(String message) {
+     this.message = message;
+  }
+  public String toString() {
+      return message;
+  }
+}
+...
+pico = new DefaultApache Composer(new PropertyApplying());
+pico.addComponent(Foo.class);
+PropertyApplicator pa = (PropertyApplicator) pico.getAdapter(Foo.class);
+pa.setProperty(&quot;message&quot;, &quot;hello&quot;);
+System.out.println(pico.getComponent(Foo.class)); // prints hello
+</pre>
+</div>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer();
+pico.as(APPLY_PROPERTIES).addComponent(Foo.class);
+PropertyApplicator pa = (PropertyApplicator) pico.getAdapter(Foo.class);
+pa.setProperty(&quot;message&quot;, &quot;hello&quot;);
+System.out.println(pico.getComponent(Foo.class)); // prints hello
+</pre>
+</div>
+<div class="source">
+    <pre>pico = new ContainerBuilder().withProperties().build();
+pico.addComponent(Foo.class);
+PropertyApplicator pa = (PropertyApplicator) pico.getAdapter(Foo.class);
+pa.setProperty(&quot;message&quot;, &quot;hello&quot;);
+System.out.println(pico.getComponent(Foo.class)); // prints hello
+</pre>
+</div>
+<div class="source">
+    <pre>import static org.picocontainer.behaviors.Behaviors.propertyApplying;
+...
+pico = new ContainerBuilder().withBehaviors(propertyApplying()).build();
+pico.addComponent(Foo.class);
+PropertyApplicator pa = (PropertyApplicator) pico.getAdapter(Foo.class);
+pa.setProperty(&quot;message&quot;, &quot;hello&quot;);
+System.out.println(pico.getComponent(Foo.class)); // prints hello
+</pre>
+</div>
+<div class="source">
+    <pre>import static org.picocontainer.behaviors.Behaviors.caching;
+import static org.picocontainer.behaviors.Behaviors.propertyApplying;
+...
+pico = new ContainerBuilder().withBehaviors(caching(), propertyApplying()).build();
+pico.addComponent(Foo.class);
+Cached cached = (Cached) pico.getAdapter(Foo.class);
+PropertyApplicator pa = (PropertyApplicator) getDelegate(PropertyApplicator.class);
+pa.setProperty(&quot;message&quot;, &quot;hello&quot;);
+System.out.println(pico.getComponent(Foo.class)); // prints hello
+</pre>
+</div>
+<h3>Automatic</h3>
+
+<p>This is where a component is going to be instantiated regardless of whether:</p>
+<ul>
+    <li> it is looked up</li>
+    <li> any component that needs it is looked up</li>
+    <li>it is Startable</li>
+</ul>
+<p>It is most likely that you're doing this because the component in question is self contained and doing something once
+   only. Alternatively, you're cutting a legacy codebase over from nest-of-singletons to dependency injection in
+   stages.</p>
+
+<div class="source">
+  <pre>
+class Foo {
+
+  public Foo() {
+      System.out.println(&quot;Foo was instantiated&quot;);
+  }
+}
+
+...
+pico = new DefaultApache Composer(new Automatic());
+pico.addComponent(Foo.class);
+pico.addComponent(&quot;bar&quot;, String.class);
+pico.getComponent(&quot;bar&quot;); // Foo instantiated too.
+</pre>
+</div>
+<div class="source">
+  <pre>
+pico = new DefaultApache Composer();
+pico.as(AUTOMATIC).addComponent(Foo.class);
+pico.addComponent(&quot;bar&quot;, String.class);
+pico.getComponent(&quot;bar&quot;); // Foo instantiated too.
+</pre>
+</div>
+<div class="source">
+  <pre>
+pico = new ContainerBuilder().withAutomatic().build();
+pico.addComponent(Foo.class);
+pico.addComponent(&quot;bar&quot;, String.class);
+pico.getComponent(&quot;bar&quot;); // Foo instantiated too.
+</pre>
+</div>
+<div class="source">
+    <pre>import static org.picocontainer.behaviors.Behaviors.automatic;
+...
+pico = new ContainerBuilder().withBehaviors(automatic()).build();
+pico.addComponent(Foo.class);
+pico.addComponent(&quot;bar&quot;, String.class);
+pico.getComponent(&quot;bar&quot;); // Foo instantiated too.
+</pre>
+</div>
+</body>
+
+
+</html>



Mime
View raw message