You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by bu...@apache.org on 2010/12/27 19:31:47 UTC

svn commit: r781778 [12/15] - in /websites/staging/aries/trunk/content: community/ development/ documentation/ documentation/tutorials/ downloads/ downloads/archived-releases/ downloads/ct/ downloads/ct/current-release/ modules/ modules/samples/ overvi...

Added: websites/staging/aries/trunk/content/modules/applications.html
==============================================================================
--- websites/staging/aries/trunk/content/modules/applications.html (added)
+++ websites/staging/aries/trunk/content/modules/applications.html Mon Dec 27 18:31:45 2010
@@ -0,0 +1,355 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License. You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="resources/site.css"></link>
+    <script src="resources/space.js" type="text/javascript"></script>
+    </script><script src="resources/getMenu.js" language="javascript" type="text/javascript"></script>
+	<meta name="keywords" content="..."/>
+	<meta name="description" content="..." />
+    <title>
+		Apache Aries - Applications
+    </title>
+  </head>
+<body onload="init()">
+
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr width="100%">
+    <td id="cell-0-0" colspan="2">&nbsp;</td>
+    <td id="cell-0-1">&nbsp;</td>
+    <td id="cell-0-2" colspan="2">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+    <td id="cell-1-0">&nbsp;</td>
+    <td id="cell-1-1">&nbsp;</td>
+    <td id="cell-1-2">
+      <div style="padding: 5px;">
+        <div id="banner">
+          <!-- Banner -->
+			<table border="0" cellpadding="0" cellspacing="0" width="100%">
+				<tr>
+					<td align="left" class="topbardiv" nowrap="">
+						<a href="http://incubator.apache.org/aries/" title="Apache Aries"> <img border="0" src="images/Arieslogo_Horizontal.gif"> </a>
+					</td>
+					<td align="right" nowrap="">
+						<a href="http://www.apache.org/" title="The Apache Software Foundation"> <img border="0" src="images/apache_feather.png"> </a>
+      				</td>
+				</tr>
+			</table>
+          <!-- Banner -->
+        </div>
+      </div>
+      <div id="top-menu">
+        <table border="0" cellpadding="1" cellspacing="0" width="100%">
+          <tr>
+            <td>
+              <div align="left">
+                <!-- Breadcrumbs -->
+                <!-- Breadcrumbs -->
+              </div>
+            </td>
+            <td>
+              <div align="right">
+                <!-- Quicklinks -->
+					<DIV style="padding: 5px 5px 0px 25px;">
+						<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+						<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A> <A href="sitemap.html" title="SiteMap">Site Map</A> 
+						<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+						<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+						<INPUT maxlength="255" name="q" size="15" type="text" value></INPUT>
+						<INPUT name="btnG" type="submit" value="Search"></INPUT>
+						<INPUT name="domains" type="hidden" value="incubator.apache.org/aries"></INPUT>
+						<INPUT name="sitesearch" type="hidden" value="incubator.apache.org/aries"></INPUT>
+						</FORM>
+					</DIV>
+                <!-- Quicklinks -->
+              </div>
+            </td>
+          </tr>
+        </table>
+      </div>
+    </td>
+    <td id="cell-1-3">&nbsp;</td>
+    <td id="cell-1-4">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+    <td id="cell-2-0" colspan="2">&nbsp;</td>
+    <td id="cell-2-1">
+      <table>
+        <tr height="100%" valign="top">
+          <td height="100%">
+            <div id="wrapper-menu-page-right">
+              <div id="wrapper-menu-page-top">
+                <div id="wrapper-menu-page-bottom">
+                  <div id="menu-page">
+                    <!-- NavigationBar -->
+					<ul>
+<li><h3><a href="overview.html">Overview</a></h3><ul>
+<li><h4><a href="boardreports.html">Board Reports</a></h4></li>
+<li><h4><a href="sitemap.html">Site Map</a></h4></li>
+</ul>
+</li>
+<li><h3><a href="documentation.html">Documentation</a></h3><ul>
+<li><h4><a href="ariesprogrammingmodel.html">Programming Model</a></h4></li>
+<li><h4><a href="pointerstoosgispecifications.html">Pointers to OSGi specs</a></h4></li>
+<li><h4><a href="integrators-guide.html">Integrators Guide</a></h4></li>
+<li><h4><a href="articles.html">Articles</a></h4></li>
+<li><h4><a href="https://svn.apache.org/repos/asf/incubator/aries/slides/">Slides</a></h4></li>
+<li><h4><a href="tutorials.html">Tutorials</a></h4></li>
+</ul>
+</li>
+<li><h3><a href="downloads.html">Downloads</a></h3></li>
+<li><h3><a href="community.html">Community</a></h3><ul>
+<li><h4><a href="gettinginvolved.html">Getting Involved</a></h4></li>
+<li><h4><a href="people.html">Who we are</a></h4></li>
+<li><h4><a href="mailinglists.html">Mailing lists</a></h4></li>
+<li><h4><a href="http://blogs.apache.org/aries/">Aries Group Blog</a></h4></li>
+</ul>
+</li>
+<li><h3><a href="development.html">Development</a></h3><ul>
+<li><h4><a href="https://svn.apache.org/repos/asf/incubator/aries/">Source Control </a></h4></li>
+<li><h4><a href="https://issues.apache.org/jira/browse/ARIES">Bug Tracking</a></h4></li>
+<li><h4><a href="buildingaries.html">Building Aries </a></h4></li>
+<li><h4><a href="releasingaries.html">Releasing Aries </a></h4></li>
+<li><h4><a href="compliancetesting.html">OSGi Compliance Tests </a></h4></li>
+<li><h4><a href="http://hudson.zones.apache.org/hudson/">Build System</a></h4></li>
+<li><h4><a href="maintainingthewebpages.html">Web Site Maintenance </a></h4></li>
+</ul>
+</li>
+<li><h3><a href="modules.html">Modules</a></h3><ul>
+<li><h4><a href="samples.html">Samples</a></h4></li>
+<li><h4><a href="blueprint.html">Blueprint</a></h4></li>
+<li><h4><a href="jndiproject.html">JNDI</a></h4></li>
+<li><h4><a href="jpaproject.html">JPA</a></h4></li>
+<li><h4><a href="applications.html">Applications</a></h4></li>
+<li><h4><a href="transactionsproject.html">Transactions</a></h4></li>
+<li><h4><a href="-ebamavenpluginproject.html">EBA Maven Plugin </a></h4></li>
+<li><h4><a href="spi-fly.html">SPI Fly</a></h4></li>
+</ul>
+</li>
+<li><h3> <a href="sponsorship.html">Sponsorship</a></h3></li>
+</ul>
+                    <!-- NavigationBar -->
+                  </div>
+                </div>
+              </div>
+            </div>
+          </td>
+          <td height="100%" width="100%">
+            <!-- Content -->
+            <div class="wiki-content"><p><a name="Applications-AriesApplications"></a></p>
+<h1 id="aries_applications">Aries Applications</h1>
+<p>An Aries application is a collection of one or more OSGi modules that
+together provide a coherent business function. An Aries application can
+consist of modules of many different types.  For example, a Aries
+application providing Web banking might consist of bundles with Web content
+(Web Application Bundles), bundles with Blueprint contexts, and bundles
+with JPA entities and persistence configuration (Persistence Bundles).<br />
+</p>
+<p>An Aries application isolates the OSGi services offered by its contained
+modules so that they are not visible outside the application unless
+explicitly configured to be exported from the application. Aries
+applications have several ways of accepting workloads: an Aries
+applications may include Web bundles for processing HTTP workloads; it may
+export one or more of the services offered by its contained modules to
+other Aries applications or for distribution as a Web service.<br />
+</p>
+<p>With the isolation runtime, each Aries application runs in its own isolated
+OSGi framework instance with its own OSGi service registry. Bundles in one
+Aries application cannot see bundles, services, or packages that are
+defined in another OSGi application, unless the bundles, services, or
+packages are explicitly shared by both applications. An Aries application
+can also load packages and consume OSGi services from a shared bundle
+space, that is, the OSGi framework instance that is the parent of all the
+isolated framework instances of the OSGi applications.</p>
+<p><a name="Applications-StructureofanAriesapplication"></a></p>
+<h2 id="structure_of_an_aries_application">Structure of an Aries application</h2>
+<p>An Aries application is packaged as a zip file with a '.eba' suffix. Its
+structure is as follows:</p>
+<DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>Sample Aries application structure</B></DIV><DIV class="codeContent panelContent">
+    META-INF/APPLICATION.MF<br>
+    bundle1.jar<br>
+    bundle2.jar<br>
+    bundle3.jar<br>
+</DIV>
+</DIV>
+
+<p>The file must contain either an APPLICATION.MF with at least one bundle
+listed in its Application-Content header (see below), or at least one
+bundle 'by value' within the .eba. No 'by value' bundles are required if a
+valid APPLICATION.MF is present. </p>
+<p>Application metadata, APPLICATION.MF,  stored in the .eba file defines the
+isolation scope of the bundles that the OSGi application uses. An Aries
+applicaiton can also use metadata to permit some of its constituent bundles
+to be shared. Sharing in this way can reduce the memory and resource
+requirements of a system. Shared bundles must be provided by reference
+rather than contained directly in an application.</p>
+<p><a name="Applications-AriesApplicationManifest"></a></p>
+<h2 id="aries_application_manifest">Aries Application Manifest</h2>
+<p>An Aries Application is defined using a Manifest. The Aries manifest is
+located at META-INF/APPLICATION.MF and describes modularity at the
+application level. The manifest enumerates the modules that comprise the
+Aries application along with any OSGi services exported from, or referenced
+by, those modules.  The following is an example of an Aries manifest:</p>
+<DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>APPLICATION.MF</B></DIV><DIV class="codeContent panelContent">
+    Manifest-Version: 1.0<br>
+    Application-ManifestVersion: 1.0<br>
+    Application-Name: Bank Account<br>
+    Application-SymbolicName: com.mybank.account.app<br>
+    Application-Version: 1.0<br>
+    Application-Content: <br>
+        com.mybank.account.bankWeb; version=1.0.0,<br>
+        com.mybank.account.bankAccount; version=1.0.0,<br>
+        com.mybank.account.common; version=1.0.0,<br>
+        com.mybank.account.utility; version=1.0.0<br>
+    Use-Bundle: com.mybank.account.admin;version="[1.0.0,2.0.0)"<br>
+    Application-ExportService: com.mybank.account.service.AccountService<br>
+    Application-ImportService:<br>
+com.mybank.security.UserAuthService;filter="(security=strong)"<br>
+</DIV>
+</DIV>
+
+<p>The manifest headers are as follows:</p>
+<ul>
+<li>Manifest-Version - a version number for the manifest format.</li>
+<li>Application-ManifestVersion - identifies the application manifest version
+to which this manifest conforms</li>
+<li>Application-Name - a human readable name for the application</li>
+<li>Application-SymbolicName - a name to uniquely identify the application.
+Follows the same scheme as Bundle-SymbolicName.</li>
+<li>Application-Version - uniquely identify the version of the application.
+The combination of symbolic name and version must be unique within an Aries
+application runtime.</li>
+<li>Application-Content - a list of 'root' bundles to provision for the
+application. 'Version' identifies a version range for the bundle to be
+provisioned thus allowing flexibility. The version format is identical to
+that used for OSGi import (e.g. Import-Package).</li>
+<li>Use-Bundle - a list of bundles bundles to use to satisfy the package
+dependencies of bundles in the Application-Content list. Each bundle in the
+Use-Bundle list must provide at least one package to at least one bundle in
+the Application-Content list. These bundles will be provisioned into the
+shared bundle space at run time.</li>
+<li>Application-ExportService - a list of service interface names and
+optional filters identifying services provided by the application which can
+be accessed outside the application.</li>
+<li>Application-ImportService - a list of service interface names and
+optional filters identifying services which the application would like to
+consume from outside the application.</li>
+</ul>
+<p>Often, you do not require a Use-Bundle header, but there are some
+situations where it is useful. You can use it to restrict the level at
+which sharing is possible. For example, you can ensure that an application
+uses the same bundle for package imports that it was tested with.
+Alternatively, you can ensure that two applications use the same bundle for
+package imports. By setting the restriction at application level, the
+bundle can remain flexible.</p>
+<p><a name="Applications-AriesDeploymentManifest"></a></p>
+<h2 id="aries_deployment_manifest">Aries Deployment Manifest</h2>
+<p>The Aries application model allows for the possibility that the bundles
+listed in APPLICATION.MF's Application-Content header, plus those
+optionally included within a .eba file, may have unsatisfied package or
+service dependencies. Such missing dependencies may be obtained
+('provisioned') from one or more bundle repositories. Aries will provide a
+generic 'Resolver' API which may be backed by technology such as <a href="http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html">Felix OBR</a>
+ or [Equinox p2|http://wiki.eclipse.org/Equinox_p2_Getting_Started]
+. Although it is possible to re-resolve an application every time it is
+installed, or even started, this may result in inconsistent behaviour as
+the contents of an associated bundle repository changes. Aries uses a
+second file, META-INF/DEPLOYMENT.MF to record a single consistent set of
+bundles that fully satisfy an application's dependencies. The bundles
+recorded in DEPLOYMENT.MF will be loaded into the runtime each time the
+application is installed. A DEPLOYMENT.MF file will be generated if one
+does not exist, or honoured if provided. Here's an example:</p>
+<DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>DEPLOYMENT.MF</B></DIV><DIV class="codeContent panelContent">
+    Manifest-Version: 1.0<br>
+    Application-Version: 1.0<br>
+    Application-SymbolicName: com.mybank.account.app<br>
+    Deployed-Content: com.mybank.account.bankWeb; deployed-version=1.0.0,<br>
+        com.mybank.account.bankAccount; deployed-version=1.0.0,<br>
+        com.mybank.account.common; deployed-version=1.2.0,<br>
+        com.mybank.account.utility; deployed-version=1.0.0, <br>
+        com.mybank.utils.logging; deployed-version=1.3.1<br>
+    Provision-Bundle: com.mybank.account.delivery;deployed-version=1.0.1<br>
+    Import-Package: com.mybank.account.admin.login;version="1.0.1";bundle-symbolic-name="com.mybank.account.admin";bundle-version="[1.0.1,1.0.1]",com.mybank.account.delivery.bycar;version="[1.0.0,2.0.0)",javax.servlet;version="2.5.0"<br>
+    Deployed-Use-Bundle: com.mybank.account.admin;deployed-version=1.0.1<br>
+</DIV>
+</DIV>
+
+<p>The manifest headers are as follows:</p>
+<ul>
+<li>Manifest-Version - a version number for the manifest format.</li>
+<li>Application-Version - uniquely identify the version of the application.
+Must match that in the associated APPLICATION.MF. </li>
+<li>Application-SymbolicName - a name to uniquely identify the application.
+Follows the same scheme as Bundle-SymbolicName. Must match that in the
+associated APPLICATION.MF. </li>
+<li>Deployed-Content: the complete list of bundles, with exact version
+numbers, that comprise the application and its dependencies. </li>
+<li>Deployed-Use-Bundle - a list of bundles that satisfy the package
+dependencies of bundles in the Deployed-Content list. Each element in the
+Deployed-Use-Bundle list must provide at least one package to at least one
+bundle in the Deployed-Content list. The Deployed-Use-Bundle list is an
+exact subset of the Use-Bundle list in the APPLICATION.MF. These bundles
+will be loaded into the shared bundle space at run time. Each bundle in the
+Deployed-Use-Bundle list is guaranteed to be wired to its dependent bundles
+in the Deployed-Content list at run time. </li>
+<li>Provision-Bundle - a list of additional bundles that are required as a
+result of resolving the OSGi application. Each bundle is loaded into the
+shared bundle space at run time.</li>
+<li>Import-Package - a list of the packages that the bundles in the
+Deployed-Content list consume from the bundles in the Deployed-Use-Bundle
+and Provision-Bundle lists. For packages that are consumed from the
+Deployed-Use-Bundle list, the package import has ;bundle-symbolic-name and
+;bundle-version attributes. </li>
+</ul>
+<p>Versions in APPLICATION.MF are ranges: in DEPLOYMENT.MF they are exact.
+Hence we see Application-Content: com.mybank.account.common; version=1.0.0
+having been interpreted as '1.0.0 or higher' and so resolved to 1.2.0. Also
+a common logging bundle at version 1.3.1 will be deployed with the
+application. </p></div>
+            <!-- Content -->
+          </td>
+        </tr>
+      </table>
+   </td>
+   <td id="cell-2-2" colspan="2">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+   <td id="cell-3-0">&nbsp;</td>
+   <td id="cell-3-1">&nbsp;</td>
+   <td id="cell-3-2">
+     <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+         <a href="http://incubator.apache.org/aries/privacy-policy.html";>Privacy
+Policy</a> 
+       </div>
+       <!-- Footer -->
+     </div>
+   </td>
+   <td id="cell-3-3">&nbsp;</td>
+   <td id="cell-3-4">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+    <td id="cell-4-0" colspan="2">&nbsp;</td>
+    <td id="cell-4-1">&nbsp;</td>
+    <td id="cell-4-2" colspan="2">&nbsp;</td>
+  </tr>
+</table>
+</body>
+</html> 

Added: websites/staging/aries/trunk/content/modules/blueprint.html
==============================================================================
--- websites/staging/aries/trunk/content/modules/blueprint.html (added)
+++ websites/staging/aries/trunk/content/modules/blueprint.html Mon Dec 27 18:31:45 2010
@@ -0,0 +1,573 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License. You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="resources/site.css"></link>
+    <script src="resources/space.js" type="text/javascript"></script>
+    </script><script src="resources/getMenu.js" language="javascript" type="text/javascript"></script>
+	<meta name="keywords" content="..."/>
+	<meta name="description" content="..." />
+    <title>
+		Apache Aries - Blueprint
+    </title>
+  </head>
+<body onload="init()">
+
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr width="100%">
+    <td id="cell-0-0" colspan="2">&nbsp;</td>
+    <td id="cell-0-1">&nbsp;</td>
+    <td id="cell-0-2" colspan="2">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+    <td id="cell-1-0">&nbsp;</td>
+    <td id="cell-1-1">&nbsp;</td>
+    <td id="cell-1-2">
+      <div style="padding: 5px;">
+        <div id="banner">
+          <!-- Banner -->
+			<table border="0" cellpadding="0" cellspacing="0" width="100%">
+				<tr>
+					<td align="left" class="topbardiv" nowrap="">
+						<a href="http://incubator.apache.org/aries/" title="Apache Aries"> <img border="0" src="images/Arieslogo_Horizontal.gif"> </a>
+					</td>
+					<td align="right" nowrap="">
+						<a href="http://www.apache.org/" title="The Apache Software Foundation"> <img border="0" src="images/apache_feather.png"> </a>
+      				</td>
+				</tr>
+			</table>
+          <!-- Banner -->
+        </div>
+      </div>
+      <div id="top-menu">
+        <table border="0" cellpadding="1" cellspacing="0" width="100%">
+          <tr>
+            <td>
+              <div align="left">
+                <!-- Breadcrumbs -->
+                <!-- Breadcrumbs -->
+              </div>
+            </td>
+            <td>
+              <div align="right">
+                <!-- Quicklinks -->
+					<DIV style="padding: 5px 5px 0px 25px;">
+						<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+						<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A> <A href="sitemap.html" title="SiteMap">Site Map</A> 
+						<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+						<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+						<INPUT maxlength="255" name="q" size="15" type="text" value></INPUT>
+						<INPUT name="btnG" type="submit" value="Search"></INPUT>
+						<INPUT name="domains" type="hidden" value="incubator.apache.org/aries"></INPUT>
+						<INPUT name="sitesearch" type="hidden" value="incubator.apache.org/aries"></INPUT>
+						</FORM>
+					</DIV>
+                <!-- Quicklinks -->
+              </div>
+            </td>
+          </tr>
+        </table>
+      </div>
+    </td>
+    <td id="cell-1-3">&nbsp;</td>
+    <td id="cell-1-4">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+    <td id="cell-2-0" colspan="2">&nbsp;</td>
+    <td id="cell-2-1">
+      <table>
+        <tr height="100%" valign="top">
+          <td height="100%">
+            <div id="wrapper-menu-page-right">
+              <div id="wrapper-menu-page-top">
+                <div id="wrapper-menu-page-bottom">
+                  <div id="menu-page">
+                    <!-- NavigationBar -->
+					<ul>
+<li><h3><a href="overview.html">Overview</a></h3><ul>
+<li><h4><a href="boardreports.html">Board Reports</a></h4></li>
+<li><h4><a href="sitemap.html">Site Map</a></h4></li>
+</ul>
+</li>
+<li><h3><a href="documentation.html">Documentation</a></h3><ul>
+<li><h4><a href="ariesprogrammingmodel.html">Programming Model</a></h4></li>
+<li><h4><a href="pointerstoosgispecifications.html">Pointers to OSGi specs</a></h4></li>
+<li><h4><a href="integrators-guide.html">Integrators Guide</a></h4></li>
+<li><h4><a href="articles.html">Articles</a></h4></li>
+<li><h4><a href="https://svn.apache.org/repos/asf/incubator/aries/slides/">Slides</a></h4></li>
+<li><h4><a href="tutorials.html">Tutorials</a></h4></li>
+</ul>
+</li>
+<li><h3><a href="downloads.html">Downloads</a></h3></li>
+<li><h3><a href="community.html">Community</a></h3><ul>
+<li><h4><a href="gettinginvolved.html">Getting Involved</a></h4></li>
+<li><h4><a href="people.html">Who we are</a></h4></li>
+<li><h4><a href="mailinglists.html">Mailing lists</a></h4></li>
+<li><h4><a href="http://blogs.apache.org/aries/">Aries Group Blog</a></h4></li>
+</ul>
+</li>
+<li><h3><a href="development.html">Development</a></h3><ul>
+<li><h4><a href="https://svn.apache.org/repos/asf/incubator/aries/">Source Control </a></h4></li>
+<li><h4><a href="https://issues.apache.org/jira/browse/ARIES">Bug Tracking</a></h4></li>
+<li><h4><a href="buildingaries.html">Building Aries </a></h4></li>
+<li><h4><a href="releasingaries.html">Releasing Aries </a></h4></li>
+<li><h4><a href="compliancetesting.html">OSGi Compliance Tests </a></h4></li>
+<li><h4><a href="http://hudson.zones.apache.org/hudson/">Build System</a></h4></li>
+<li><h4><a href="maintainingthewebpages.html">Web Site Maintenance </a></h4></li>
+</ul>
+</li>
+<li><h3><a href="modules.html">Modules</a></h3><ul>
+<li><h4><a href="samples.html">Samples</a></h4></li>
+<li><h4><a href="blueprint.html">Blueprint</a></h4></li>
+<li><h4><a href="jndiproject.html">JNDI</a></h4></li>
+<li><h4><a href="jpaproject.html">JPA</a></h4></li>
+<li><h4><a href="applications.html">Applications</a></h4></li>
+<li><h4><a href="transactionsproject.html">Transactions</a></h4></li>
+<li><h4><a href="-ebamavenpluginproject.html">EBA Maven Plugin </a></h4></li>
+<li><h4><a href="spi-fly.html">SPI Fly</a></h4></li>
+</ul>
+</li>
+<li><h3> <a href="sponsorship.html">Sponsorship</a></h3></li>
+</ul>
+                    <!-- NavigationBar -->
+                  </div>
+                </div>
+              </div>
+            </div>
+          </td>
+          <td height="100%" width="100%">
+            <!-- Content -->
+            <div class="wiki-content"><p><a name="Blueprint-Blueprint"></a></p>
+<h1 id="blueprint">Blueprint</h1>
+<p><a name="Blueprint-Introduction"></a></p>
+<h2 id="introduction">Introduction</h2>
+<p>Blueprint provides a dependency injection framework for OSGi and was
+standardized by the OSGi Alliance in OSGi Compendium R4.2. It is designed
+to deal with the dynamic nature of OSGi, where services can become
+available and unavailable at any time. The specification is also designed
+to work with plain old Java objects (POJOs) enabling simple components to
+be written and unit tested in a JSE environment without needing to be aware
+of how they are assembled. The Blueprint XML files that define and describe
+the assembly of various components are key to the Blueprint programming
+model. The specification describes how the components get instantiated and
+wired together to form a running module. </p>
+<p>The following documentation covers the 80:20 usage of Blueprint.  For
+further details, please refer to the OSGi Compendium R4.2 specification.</p>
+<p><a name="Blueprint-BlueprintBundles"></a></p>
+<h2 id="blueprint_bundles">Blueprint Bundles</h2>
+<p>The Blueprint Container specification uses an extender pattern, whereby an
+extender bundle monitors the state of bundles in the framework and performs
+actions on behalf of those bundles based on their state. The Blueprint
+extender bundle waits for the bundles to be activated and checks whether
+they are Blueprint bundles. A bundle is considered to be a Blueprint bundle
+when it contains one or more Blueprint XML files. These XML files are at a
+fixed location under the OSGI-INF/blueprint/ directory or are specified
+explicitly in the Bundle-Blueprint manifest header.</p>
+<p>Once the extender determines that a bundle is a Blueprint bundle, it
+creates a Blueprint Container on behalf of that bundle. The Blueprint
+Container is responsible for:</p>
+<div class="codehilite"><pre><span class="o">*</span> <span class="n">Parsing</span> <span class="n">the</span> <span class="n">Blueprint</span> <span class="n">XML</span> <span class="n">files</span>
+<span class="o">*</span> <span class="n">Instantiating</span> <span class="n">the</span> <span class="n">components</span>
+<span class="o">*</span> <span class="n">Wiring</span> <span class="n">the</span> <span class="n">components</span> <span class="n">together</span>
+<span class="o">*</span> <span class="n">Registering</span> <span class="n">services</span>
+<span class="o">*</span> <span class="n">Looking</span> <span class="n">up</span> <span class="n">service</span> <span class="n">references</span>
+</pre></div>
+
+
+<p>During initialization, the Blueprint Container ensures that mandatory
+service references are satisfied, registers all the services into the
+service registry, and creates initial component instances. The Blueprint
+extender bundle also destroys the Blueprint Container for a bundle when the
+bundle is stopped. </p>
+<p><a name="Blueprint-BlueprintXML"></a></p>
+<h2 id="blueprint_xml">Blueprint XML</h2>
+<p>The Blueprint XML file is identified by a top-level blueprint element, as
+shown below:</p>
+<div class="codehilite"><pre><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
+<span class="nt">&lt;blueprint</span> <span class="na">xmlns=</span><span class="s">&quot;http://www.osgi.org/xmlns/blueprint/v1.0.0&quot;</span><span class="nt">&gt;</span>
+    ...
+<span class="nt">&lt;/blueprint&gt;</span>
+</pre></div>
+
+
+<p>The XML namespace identifies the document as conforming to the Blueprint
+version 1.0.0.  The top-level blueprint element identifies the document as
+a blueprint module definition.</p>
+<p><em>TODO:</em> ensure id, activation and dependsOn get documented somewhere.</p>
+<p><a name="Blueprint-Beans"></a></p>
+<h2 id="beans">Beans</h2>
+<p>Beans are declared using the bean element.  The following defines a single
+bean called <em>accountOne</em> implemented by the POJO
+<em>org.apache.aries.simple.Account</em>.</p>
+<div class="codehilite"><pre><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
+<span class="nt">&lt;blueprint</span> <span class="na">xmlns=</span><span class="s">&quot;http://www.osgi.org/xmlns/blueprint/v1.0.0&quot;</span><span class="nt">&gt;</span>
+   <span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;accountOne&quot;</span> <span class="na">class=</span><span class="s">&quot;org.apache.aries.simple.Account&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/blueprint&gt;</span>
+</pre></div>
+
+
+<p><a name="Blueprint-BeanConstruction"></a></p>
+<h3 id="bean_construction">Bean Construction</h3>
+<p>During object construction, the Blueprint Container must first find the
+right constructor or a factory method with a compatible set of parameters
+that matches the arguments specified in the XML. By default, the Blueprint
+Container uses the number and order of the argument elements in XML to find
+the right constructor or method. If the argument  elements cannot be mapped
+to the parameters in the order they are in, the Blueprint Container will
+attempt to reorder the argument elements and find the best-fitting
+arrangement.</p>
+<p>To help the Blueprint Container pick the right constructor, method, or
+parameter arrangement, additional attributes, such as index or type, can be
+specified on the argument element. For example, the type attribute
+specifies a class name used to match the argument element to a parameter by
+the exact type. </p>
+<p>A bean can be constructed using a class constructor. In the following
+example, the <em>class</em> attribute specifies the name of the Java class to
+instantiate. The Blueprint Container will create the <em>Account</em> object by
+passing <em>1</em> as the argument to the constructor. </p>
+<p>public class Account {    <br />
+       public Account(long number) {
+      ...
+       }
+       ...
+   }</p>
+<div class="codehilite"><pre>   <span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;accountOne&quot;</span> <span class="na">class=</span><span class="s">&quot;org.apache.aries.simple.Account&quot;</span><span class="nt">&gt;</span>
+       <span class="nt">&lt;argument</span> <span class="na">value=</span><span class="s">&quot;1&quot;</span><span class="nt">/&gt;</span>
+   <span class="nt">&lt;/bean&gt;</span>
+</pre></div>
+
+
+<p>A bean can be constructed using a static factory method.  In this example,
+the <em>class</em> attribute specifies the name of the class that contains a
+static factory method. The name of the static factory method is specified
+by the <em>factory-method</em>  attribute. The Blueprint Container will call the
+<em>createAccount()</em> static method on the <em>StaticAccountFactory</em> class and
+pass 2 as the argument to create the Account object. </p>
+<div class="codehilite"><pre>   public class StaticAccountFactory {      
+       public static Account createAccount(long number) {
+      return new Account(number);
+       }
+   }
+
+   <span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;accountTwo&quot;</span>
+    <span class="na">class=</span><span class="s">&quot;org.apache.aries.simple.StaticAccountFactory&quot;</span> 
+     <span class="na">factory-method=</span><span class="s">&quot;createAccount&quot;</span><span class="nt">&gt;</span>   
+       <span class="nt">&lt;argument</span> <span class="na">value=</span><span class="s">&quot;2&quot;</span><span class="nt">/&gt;</span>
+   <span class="nt">&lt;/bean&gt;</span>
+</pre></div>
+
+
+<p>A bean can be constructed using an instance factory method.  In the
+example, the <em>accountFactory</em> bean is the factory. The Blueprint
+Container will first create the <em>AccountFactory</em> instance with its own
+arguments and properties. In this case, only a single argument is
+specified: the factory name. The Blueprint Container will then call the
+<em>createAccount()</em> method on the <em>AccountFactory</em> instance and pass 3 as
+the argument to create the Account object.</p>
+<p>public class AccountFactory {    <br />
+       public AccountFactory(String factoryName) {
+      ...
+       }
+       public Account createAccount(long number) {
+      return new Account(number);
+       }
+   }</p>
+<div class="codehilite"><pre>   <span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;accountFactory&quot;</span>
+    <span class="na">class=</span><span class="s">&quot;org.apache.aries.simple.AccountFactory&quot;</span><span class="nt">&gt;</span>  
+       <span class="nt">&lt;argument</span> <span class="na">value=</span><span class="s">&quot;account factory&quot;</span><span class="nt">/&gt;</span>  
+   <span class="nt">&lt;/bean&gt;</span>
+
+   <span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;accountThree&quot;</span>
+     <span class="na">factory-ref=</span><span class="s">&quot;accountFactory&quot;</span> 
+     <span class="na">factory-method=</span><span class="s">&quot;createAccount&quot;</span><span class="nt">&gt;</span>   
+       <span class="nt">&lt;argument</span> <span class="na">value=</span><span class="s">&quot;3&quot;</span><span class="nt">/&gt;</span>
+   <span class="nt">&lt;/bean&gt;</span>
+</pre></div>
+
+
+<p><a name="Blueprint-BeanProperties"></a></p>
+<h3 id="bean_properties">Bean Properties</h3>
+<p>Beans can have property values injected.  Injection is performed
+immediately after the bean is constructed.  The following example creates
+the Account bean and then sets the description property using the Java
+Beans naming convention.</p>
+<p>public class Account {    <br />
+       public Account(long number) {
+      ...
+       }
+       public String getDescription() {
+      ...
+       }
+   }</p>
+<div class="codehilite"><pre>   <span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;accountOne&quot;</span> <span class="na">class=</span><span class="s">&quot;org.apache.aries.simple.Account&quot;</span><span class="nt">&gt;</span>
+       <span class="nt">&lt;argument</span> <span class="na">value=</span><span class="s">&quot;1&quot;</span><span class="nt">/&gt;</span>
+       <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;description&quot;</span> <span class="na">value=</span><span class="s">&quot;#1 account&quot;</span><span class="nt">/&gt;</span>
+   <span class="nt">&lt;/bean&gt;</span>
+</pre></div>
+
+
+<p><a name="Blueprint-BeanWiring"></a></p>
+<h4 id="bean_wiring">Bean Wiring</h4>
+<p>Property injection is used for wiring beans together.  In the following
+example <em>accountOne</em> is injected with a <em>Currency</em> bean.</p>
+<div class="codehilite"><pre>   public class Account {      
+       public Account() {
+      ...
+       }
+       public void setCurrency(Currency currency) {
+      ...
+       }
+   }
+
+   public class Currency {  
+       public Currency() {
+      ...
+       }
+   }
+
+   <span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;accountOne&quot;</span> <span class="na">class=</span><span class="s">&quot;org.apache.aries.simple.Account&quot;</span><span class="nt">&gt;</span>
+       <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;currency&quot;</span> <span class="na">ref=</span><span class="s">&quot;currency&quot;</span> <span class="nt">/&gt;</span>
+   <span class="nt">&lt;/bean&gt;</span>
+
+   <span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;currency&quot;</span> <span class="na">class=</span><span class="s">&quot;org.apache.aries.simple.Currency&quot;</span> <span class="nt">/&gt;</span>
+</pre></div>
+
+
+<p><a name="Blueprint-Services"></a></p>
+<h2 id="services">Services</h2>
+<p>In Blueprint XML, a service element defines the registration of a service
+in the OSGi service registry. </p>
+<p>The bean that provides the service object can be referenced using the
+<em>ref</em> attribute.  The interfaces under which the service is registered
+can be specified using the <em>interface</em> attribute:</p>
+<div class="codehilite"><pre>   <span class="n">public</span> <span class="n">class</span> <span class="n">AccountImpl</span> <span class="n">implements</span> <span class="n">Account</span> <span class="p">{</span>      
+       <span class="n">public</span> <span class="n">Account</span><span class="p">()</span> <span class="p">{</span>
+      <span class="o">...</span>
+       <span class="p">}</span>
+       <span class="n">public</span> <span class="n">void</span> <span class="n">setCurrency</span><span class="p">(</span><span class="n">Currency</span> <span class="n">currency</span><span class="p">)</span> <span class="p">{</span>
+      <span class="o">...</span>
+       <span class="p">}</span>
+   <span class="p">}</span>
+
+   <span class="o">&lt;</span><span class="n">service</span> <span class="n">id</span><span class="o">=</span><span class="s">&quot;serviceOne&quot;</span> <span class="nb">ref</span><span class="o">=</span><span class="s">&quot;account&quot;</span>
+    <span class="n">interface</span><span class="o">=</span><span class="s">&quot;org.apache.aries.simple.Account&quot;</span> <span class="o">/&gt;</span>
+
+   <span class="o">&lt;</span><span class="n">bean</span> <span class="n">id</span><span class="o">=</span><span class="s">&quot;account&quot;</span> <span class="n">class</span><span class="o">=</span><span class="s">&quot;org.apache.aries.simple.AccountImpl&quot;</span> <span class="o">/&gt;</span>
+</pre></div>
+
+
+<p>The bean that provides the service object can be inlined in the service
+element as follows:</p>
+<div class="codehilite"><pre>   <span class="nt">&lt;service</span> <span class="na">id=</span><span class="s">&quot;serviceTwo&quot;</span>  <span class="na">interface=</span><span class="s">&quot;org.apache.aries.simple.Account&quot;</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;bean</span> <span class="na">class=</span><span class="s">&quot;org.apache.aries.simple.AccountImpl&quot;</span> <span class="nt">/&gt;</span>
+   <span class="nt">&lt;/service&gt;</span>
+</pre></div>
+
+
+<p>The interfaces under which a service is registered can be determined by
+Blueprint using <em>auto-export</em>.  The following registers the service under
+all the bean's interfaces:</p>
+<div class="codehilite"><pre>   <span class="o">&lt;</span><span class="n">service</span> <span class="n">id</span><span class="o">=</span><span class="s">&quot;serviceOne&quot;</span> <span class="nb">ref</span><span class="o">=</span><span class="s">&quot;account&quot;</span> <span class="n">auto</span><span class="o">-</span><span class="n">export</span><span class="o">=</span><span class="s">&quot;interfaces&quot;</span> <span class="o">/&gt;</span>
+
+   <span class="o">&lt;</span><span class="n">bean</span> <span class="n">id</span><span class="o">=</span><span class="s">&quot;account&quot;</span> <span class="n">class</span><span class="o">=</span><span class="s">&quot;org.apache.aries.simple.AccountImpl&quot;</span> <span class="o">/&gt;</span>
+</pre></div>
+
+
+<p>Other values for <em>auto-export</em> are <em>disabled</em> (the default)
+<em>class-hierarchy</em> and <em>all-classes</em>.</p>
+<p><a name="Blueprint-ServiceProperties"></a></p>
+<h3 id="service_properties">Service Properties</h3>
+<p>A service can also be registered with a set of properties that can be
+specified using the <em>service-properties</em>  sub-element. The
+<em>service-properties</em> element contains multiple <em>entry</em> sub-elements
+that represent the individual properties. The property key is specified
+using a <em>key</em> attribute, but the property value can be specified as a
+<em>value</em> attribute or inlined within the element. The service property
+values can be of different types, but only OSGi service property types are
+permitted: primitives, primitive wrapper classes, collections, or arrays of
+primitive types. </p>
+<p>The following is an example of a service registration with two service
+properties. The <em>active</em> service property has type of
+<em>java.lang.Boolean</em>. The <em>mode</em> property is of the default type,
+<em>String</em>. </p>
+<div class="codehilite"><pre>   <span class="nt">&lt;service</span> <span class="na">id=</span><span class="s">&quot;serviceFour&quot;</span> <span class="na">ref=</span><span class="s">&quot;account&quot;</span> <span class="na">autoExport=</span><span class="s">&quot;all-classes&quot;</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;service-properties&gt;</span>
+      <span class="nt">&lt;entry</span> <span class="na">key=</span><span class="s">&quot;active&quot;</span><span class="nt">&gt;</span>
+          <span class="nt">&lt;value</span> <span class="na">type=</span><span class="s">&quot;java.lang.Boolean&quot;</span><span class="nt">&gt;</span>true<span class="nt">&lt;/value&gt;</span>
+      <span class="nt">&lt;/entry&gt;</span>
+      <span class="nt">&lt;entry</span> <span class="na">key=</span><span class="s">&quot;mode&quot;</span> <span class="na">value=</span><span class="s">&quot;shared&quot;</span><span class="nt">/&gt;</span>
+      <span class="nt">&lt;/service-properties&gt;</span>
+   <span class="nt">&lt;/service&gt;</span>
+</pre></div>
+
+
+<p><a name="Blueprint-ServiceRanking"></a></p>
+<h3 id="service_ranking">Service Ranking</h3>
+<p>Service ranking can be used to affect the choice of service when there are
+multiple matches.  When choosing between two services, the higher ranked
+service will be returned ahead of the lower.  The default ranking value is
+0. Service ranking is specified using the <em>ranking</em> attributes as
+follows:</p>
+<div class="codehilite"><pre>   <span class="o">&lt;</span><span class="n">service</span> <span class="n">id</span><span class="o">=</span><span class="s">&quot;serviceFive&quot;</span> <span class="nb">ref</span><span class="o">=</span><span class="s">&quot;account&quot;</span> <span class="n">auto</span><span class="o">-</span><span class="n">export</span><span class="o">=</span><span class="s">&quot;all-classes&quot;</span>
+    <span class="n">ranking</span><span class="o">=</span><span class="s">&quot;3&quot;</span> <span class="o">/&gt;</span>
+</pre></div>
+
+
+<p><a name="Blueprint-References"></a></p>
+<h2 id="references">References</h2>
+<p>Services are found in the service registry using the reference element. The
+following shows a reference named <em>accountRef</em> to an <em>Account</em> service.
+ If a service matching this reference is found in the service registry then
+it is set on the <em>accountClient</em> bean through the <em>account</em> property.</p>
+<div class="codehilite"><pre>   <span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;accountClient&quot;</span> <span class="na">class=</span><span class="s">&quot;...&quot;</span><span class="nt">&gt;</span>
+       <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;account&quot;</span> <span class="na">ref=</span><span class="s">&quot;accountRef&quot;</span> <span class="nt">/&gt;</span>
+   <span class="nt">&lt;/bean&gt;</span>
+
+   <span class="nt">&lt;reference</span> <span class="na">id=</span><span class="s">&quot;accountRef&quot;</span> <span class="na">interface=</span><span class="s">&quot;org.apache.aries.simple.Account&quot;</span>
+<span class="nt">/&gt;</span>
+</pre></div>
+
+
+<p><a name="Blueprint-ReferenceDynamism"></a></p>
+<h3 id="reference_dynamism">Reference Dynamism</h3>
+<p>The object that is injected for a reference is actually a proxy to the
+service registered in the service registry. A proxy enables the injected
+object to remain the same while the backing service can come and go or be
+replaced with another service. Calls on a proxy that does not have a
+backing service will block until a service becomes available or a timeout
+occurs at which point a ServiceUnavailableException will be thrown.</p>
+<div class="codehilite"><pre>   <span class="n">try</span> <span class="p">{</span>
+      <span class="n">balance</span> <span class="o">=</span> <span class="n">account</span><span class="o">.</span><span class="n">getBalance</span><span class="p">();</span>
+   <span class="p">}</span> <span class="n">catch</span> <span class="p">(</span><span class="n">ServiceUnavailableException</span> <span class="n">e</span><span class="p">)</span> <span class="p">{</span>
+      <span class="o">...</span>
+   <span class="p">}</span>
+</pre></div>
+
+
+<p>The default timeout Blueprint will wait for is 300000 milliseconds (5
+minutes).  This value can be changed on a per bundle basis using directives
+on the Bundle-SymbolicName.  The following switches the timeout off
+completely (the default is true):</p>
+<div class="codehilite"><pre>   <span class="n">Bundle</span><span class="o">-</span><span class="n">SymbolicName:</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">aries</span><span class="o">.</span><span class="n">simple</span><span class="o">.</span><span class="n">account</span><span class="p">;</span>
+    <span class="n">blueprint</span><span class="o">.</span><span class="n">graceperiod:</span><span class="o">=</span><span class="n">false</span>
+</pre></div>
+
+
+<p>The following sets the timeout to 10000 milliseconds (10 seconds):</p>
+<div class="codehilite"><pre>   <span class="n">Bundle</span><span class="o">-</span><span class="n">SymbolicName:</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">aries</span><span class="o">.</span><span class="n">simple</span><span class="o">.</span><span class="n">account</span><span class="p">;</span>
+    <span class="n">blueprint</span><span class="o">.</span><span class="n">graceperiod:</span><span class="o">=</span><span class="n">false</span><span class="p">;</span> <span class="n">blueprint</span><span class="o">.</span><span class="n">timeout</span><span class="o">=</span><span class="mi">10000</span><span class="p">;</span>
+</pre></div>
+
+
+<p>The timeout can also be set on an individual reference using the
+<em>timeout</em> attribute.    The following sets the timeout for the account
+reference to 20000 milliseconds (20 seconds).</p>
+<div class="codehilite"><pre>   <span class="o">&lt;</span><span class="n">reference</span> <span class="n">id</span><span class="o">=</span><span class="s">&quot;accountRef&quot;</span> <span class="n">timeout</span><span class="o">=</span><span class="s">&quot;20000&quot;</span>
+    <span class="n">interface</span><span class="o">=</span><span class="s">&quot;org.apache.aries.simple.Account&quot;</span> <span class="o">/&gt;</span>
+</pre></div>
+
+
+<p>In all cases, a value of 0 means wait indefinitely for the reference to
+become satisfied.</p>
+<p><a name="Blueprint-ReferenceLists"></a></p>
+<h3 id="reference_lists">Reference Lists</h3>
+<p>Multiple matching services can be found using the <em>reference-list</em>
+element.  The <em>reference-list</em> provides a <em>List</em> object that contains
+the service proxy objects or <em>ServiceReference</em> objects, depending on the
+<em>member-type</em> setting. The provided <em>List</em> object is dynamic, as it can
+grow and shrink as matching services are added or removed from the service
+registry. The <em>List</em> object is read-only and only supports a subset of
+the <em>List</em> API.</p>
+<p>The proxies in a <em>reference-list</em> are different from the proxies for a
+reference. The <em>reference-list</em> proxies target a specific service, do not
+have a <em>timeout</em>, and throw <em>ServiceUnavailableException</em> immediately
+if their service becomes unavailable.</p>
+<p>The following example shows a reference-list that returns a list of service
+objects (proxies).  This is the default value for the <em>member-type</em>
+attribute</p>
+<div class="codehilite"><pre>   <span class="o">&lt;</span><span class="n">reference</span><span class="o">-</span><span class="n">list</span> <span class="n">id</span><span class="o">=</span><span class="s">&quot;accountRefs&quot;</span> <span class="n">member</span><span class="o">-</span><span class="n">type</span><span class="o">=</span><span class="s">&quot;service-object&quot;</span>
+    <span class="n">interface</span><span class="o">=</span><span class="s">&quot;org.apache.aries.simple.Account&quot;</span> <span class="o">/&gt;</span>
+</pre></div>
+
+
+<p>The following shows an example of a reference-list that returns a list of
+ServiceReferences:</p>
+<div class="codehilite"><pre>   <span class="o">&lt;</span><span class="n">reference</span><span class="o">-</span><span class="n">list</span> <span class="n">id</span><span class="o">=</span><span class="s">&quot;accountRefs&quot;</span> <span class="n">member</span><span class="o">-</span><span class="n">type</span><span class="o">=</span><span class="s">&quot;service-reference&quot;</span>
+    <span class="n">interface</span><span class="o">=</span><span class="s">&quot;org.apache.aries.simple.Account&quot;</span> <span class="o">/&gt;</span>
+</pre></div>
+
+
+<p>Example showing mandatory or optional references (availability)</p>
+<p>Example showing use of filter</p>
+<p><a name="Blueprint-BeanProperties"></a></p>
+<h2 id="bean_properties_1">Bean Properties</h2>
+<p>Example showing use of bean properties</p>
+<p><a name="Blueprint-Scopes"></a></p>
+<h2 id="scopes">Scopes</h2>
+<p>Example showing singleton scope</p>
+<p>Example showing prototype scope for beans</p>
+<p>Example showing prototype scope for services</p>
+<p><a name="Blueprint-ObjectValues"></a></p>
+<h2 id="object_values">Object Values</h2>
+<p>Intro to Object Values</p>
+<p>Examples showing the use of the various different object value types - ref,
+map, props collection (list, array, set).</p>
+<p><a name="Blueprint-Lifecycle"></a></p>
+<h2 id="lifecycle">Lifecycle</h2>
+<p>Example showing use of init/destroy-method</p>
+<p><a name="Blueprint-LazyandEagerActiviation"></a></p>
+<h2 id="lazy_and_eager_activiation">Lazy and Eager Activiation</h2>
+<p>Example showing lazy activiation.</p>
+<p>Example showing eager activation.</p>
+<p><a name="Blueprint-Dynamism"></a></p>
+<h2 id="dynamism">Dynamism</h2>
+<p>Example showing service-listener</p>
+<p>Example showing reference-listener</p>
+<p><a name="Blueprint-TypeConverters"></a></p>
+<h2 id="type_converters">Type Converters</h2></div>
+            <!-- Content -->
+          </td>
+        </tr>
+      </table>
+   </td>
+   <td id="cell-2-2" colspan="2">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+   <td id="cell-3-0">&nbsp;</td>
+   <td id="cell-3-1">&nbsp;</td>
+   <td id="cell-3-2">
+     <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+         <a href="http://incubator.apache.org/aries/privacy-policy.html";>Privacy
+Policy</a> 
+       </div>
+       <!-- Footer -->
+     </div>
+   </td>
+   <td id="cell-3-3">&nbsp;</td>
+   <td id="cell-3-4">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+    <td id="cell-4-0" colspan="2">&nbsp;</td>
+    <td id="cell-4-1">&nbsp;</td>
+    <td id="cell-4-2" colspan="2">&nbsp;</td>
+  </tr>
+</table>
+</body>
+</html> 

Added: websites/staging/aries/trunk/content/modules/blueprintannotation.html
==============================================================================
--- websites/staging/aries/trunk/content/modules/blueprintannotation.html (added)
+++ websites/staging/aries/trunk/content/modules/blueprintannotation.html Mon Dec 27 18:31:45 2010
@@ -0,0 +1,404 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License. You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="resources/site.css"></link>
+    <script src="resources/space.js" type="text/javascript"></script>
+    </script><script src="resources/getMenu.js" language="javascript" type="text/javascript"></script>
+	<meta name="keywords" content="..."/>
+	<meta name="description" content="..." />
+    <title>
+		Apache Aries - BlueprintAnnotation
+    </title>
+  </head>
+<body onload="init()">
+
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr width="100%">
+    <td id="cell-0-0" colspan="2">&nbsp;</td>
+    <td id="cell-0-1">&nbsp;</td>
+    <td id="cell-0-2" colspan="2">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+    <td id="cell-1-0">&nbsp;</td>
+    <td id="cell-1-1">&nbsp;</td>
+    <td id="cell-1-2">
+      <div style="padding: 5px;">
+        <div id="banner">
+          <!-- Banner -->
+			<table border="0" cellpadding="0" cellspacing="0" width="100%">
+				<tr>
+					<td align="left" class="topbardiv" nowrap="">
+						<a href="http://incubator.apache.org/aries/" title="Apache Aries"> <img border="0" src="images/Arieslogo_Horizontal.gif"> </a>
+					</td>
+					<td align="right" nowrap="">
+						<a href="http://www.apache.org/" title="The Apache Software Foundation"> <img border="0" src="images/apache_feather.png"> </a>
+      				</td>
+				</tr>
+			</table>
+          <!-- Banner -->
+        </div>
+      </div>
+      <div id="top-menu">
+        <table border="0" cellpadding="1" cellspacing="0" width="100%">
+          <tr>
+            <td>
+              <div align="left">
+                <!-- Breadcrumbs -->
+                <!-- Breadcrumbs -->
+              </div>
+            </td>
+            <td>
+              <div align="right">
+                <!-- Quicklinks -->
+					<DIV style="padding: 5px 5px 0px 25px;">
+						<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+						<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A> <A href="sitemap.html" title="SiteMap">Site Map</A> 
+						<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+						<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+						<INPUT maxlength="255" name="q" size="15" type="text" value></INPUT>
+						<INPUT name="btnG" type="submit" value="Search"></INPUT>
+						<INPUT name="domains" type="hidden" value="incubator.apache.org/aries"></INPUT>
+						<INPUT name="sitesearch" type="hidden" value="incubator.apache.org/aries"></INPUT>
+						</FORM>
+					</DIV>
+                <!-- Quicklinks -->
+              </div>
+            </td>
+          </tr>
+        </table>
+      </div>
+    </td>
+    <td id="cell-1-3">&nbsp;</td>
+    <td id="cell-1-4">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+    <td id="cell-2-0" colspan="2">&nbsp;</td>
+    <td id="cell-2-1">
+      <table>
+        <tr height="100%" valign="top">
+          <td height="100%">
+            <div id="wrapper-menu-page-right">
+              <div id="wrapper-menu-page-top">
+                <div id="wrapper-menu-page-bottom">
+                  <div id="menu-page">
+                    <!-- NavigationBar -->
+					<ul>
+<li><h3><a href="overview.html">Overview</a></h3><ul>
+<li><h4><a href="boardreports.html">Board Reports</a></h4></li>
+<li><h4><a href="sitemap.html">Site Map</a></h4></li>
+</ul>
+</li>
+<li><h3><a href="documentation.html">Documentation</a></h3><ul>
+<li><h4><a href="ariesprogrammingmodel.html">Programming Model</a></h4></li>
+<li><h4><a href="pointerstoosgispecifications.html">Pointers to OSGi specs</a></h4></li>
+<li><h4><a href="integrators-guide.html">Integrators Guide</a></h4></li>
+<li><h4><a href="articles.html">Articles</a></h4></li>
+<li><h4><a href="https://svn.apache.org/repos/asf/incubator/aries/slides/">Slides</a></h4></li>
+<li><h4><a href="tutorials.html">Tutorials</a></h4></li>
+</ul>
+</li>
+<li><h3><a href="downloads.html">Downloads</a></h3></li>
+<li><h3><a href="community.html">Community</a></h3><ul>
+<li><h4><a href="gettinginvolved.html">Getting Involved</a></h4></li>
+<li><h4><a href="people.html">Who we are</a></h4></li>
+<li><h4><a href="mailinglists.html">Mailing lists</a></h4></li>
+<li><h4><a href="http://blogs.apache.org/aries/">Aries Group Blog</a></h4></li>
+</ul>
+</li>
+<li><h3><a href="development.html">Development</a></h3><ul>
+<li><h4><a href="https://svn.apache.org/repos/asf/incubator/aries/">Source Control </a></h4></li>
+<li><h4><a href="https://issues.apache.org/jira/browse/ARIES">Bug Tracking</a></h4></li>
+<li><h4><a href="buildingaries.html">Building Aries </a></h4></li>
+<li><h4><a href="releasingaries.html">Releasing Aries </a></h4></li>
+<li><h4><a href="compliancetesting.html">OSGi Compliance Tests </a></h4></li>
+<li><h4><a href="http://hudson.zones.apache.org/hudson/">Build System</a></h4></li>
+<li><h4><a href="maintainingthewebpages.html">Web Site Maintenance </a></h4></li>
+</ul>
+</li>
+<li><h3><a href="modules.html">Modules</a></h3><ul>
+<li><h4><a href="samples.html">Samples</a></h4></li>
+<li><h4><a href="blueprint.html">Blueprint</a></h4></li>
+<li><h4><a href="jndiproject.html">JNDI</a></h4></li>
+<li><h4><a href="jpaproject.html">JPA</a></h4></li>
+<li><h4><a href="applications.html">Applications</a></h4></li>
+<li><h4><a href="transactionsproject.html">Transactions</a></h4></li>
+<li><h4><a href="-ebamavenpluginproject.html">EBA Maven Plugin </a></h4></li>
+<li><h4><a href="spi-fly.html">SPI Fly</a></h4></li>
+</ul>
+</li>
+<li><h3> <a href="sponsorship.html">Sponsorship</a></h3></li>
+</ul>
+                    <!-- NavigationBar -->
+                  </div>
+                </div>
+              </div>
+            </div>
+          </td>
+          <td height="100%" width="100%">
+            <!-- Content -->
+            <div class="wiki-content"><p><a name="BlueprintAnnotation-Introduction"></a></p>
+<h1 id="introduction">Introduction</h1>
+<p>Blueprint annotation is being prototyped in Apache Aries in
+trunk/blueprint.   The blueprint annotation service is an optional service
+to the blueprint core and should not affect the blueprint core if
+annotation supported is not required.   If the blueprint annotation service
+is available, the bundle contains no blueprint definition XML and the
+bundle contains the manifest header <em>Bundle-Blueprint-Annotation</em> with
+the value set to true, the blueprint annotation service will attempt to
+scan the bundle for blueprint annotations, such as @Blueprint, @Bean,
+@Service, @Reference, @ReferenceList, etc.  The blueprint annotation api is
+available in trunk/blueprint/blueprint-annotation-api module, while the
+blueprint implementation is available in
+trunk/blueprint/blueprint-annotatiom-impl module.  A blueprint annotated
+sample is also provided in trunk/blueprint/blueprint-sample-annotation.</p>
+<p><a name="BlueprintAnnotation-OverviewofAvailableblueprintAnnotations"></a></p>
+<h2 id="overview_of_available_blueprint_annotations">Overview of Available blueprint Annotations</h2>
+<p><a name="BlueprintAnnotation-@InjectAnnotation"></a></p>
+<h3 id="inject_annotation">@Inject Annotation</h3>
+<p>@Inject annotation can be used to inject fields or methods.</p>
+<div class="codehilite"><pre><span class="nv">@Bean</span><span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;bar&quot;</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">Bar</span> <span class="p">{</span>
+
+    <span class="nv">@Inject</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="s">&quot;Hello FooBar&quot;</span><span class="p">)</span>
+    <span class="n">private</span> <span class="n">String</span> <span class="n">value</span><span class="p">;</span>
+
+    <span class="nv">@Inject</span><span class="p">(</span><span class="nb">ref</span><span class="o">=</span><span class="s">&quot;blueprintBundleContext&quot;</span><span class="p">)</span>
+    <span class="n">private</span> <span class="n">BundleContext</span> <span class="n">context</span><span class="p">;</span>
+    <span class="o">...</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p><a name="BlueprintAnnotation-@BeanAnnotation"></a></p>
+<h3 id="bean_annotation">@Bean Annotation</h3>
+<p>You can annotate a bean using @Bean annotation.  The bean id is currently
+required, even tho it is possible we may want to the annotation service to
+auto generate one in the future.  Optionally, you can also specify
+activation, dependsOn, description, scope, factoryRef, factoryMethod and
+args of the bean.</p>
+<p>* Example of using args property for the @Bean annotation.</p>
+<div class="codehilite"><pre><span class="nv">@Bean</span><span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;accountOne&quot;</span><span class="p">,</span> <span class="n">args</span><span class="o">=</span><span class="nv">@Arg</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="s">&quot;1&quot;</span><span class="p">))</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">Account</span> <span class="p">{</span>
+
+    <span class="n">private</span> <span class="n">long</span> <span class="n">accountNumber</span><span class="p">;</span>
+
+    <span class="n">public</span> <span class="n">Account</span><span class="p">(</span><span class="n">long</span> <span class="n">number</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">this</span><span class="o">.</span><span class="n">accountNumber</span> <span class="o">=</span> <span class="n">number</span><span class="p">;</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>* Example of using factoryMethod and args properties for the @Bean
+annotation</p>
+<div class="codehilite"><pre><span class="nv">@Bean</span><span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;accountTwo&quot;</span><span class="p">,</span>
+      <span class="n">factoryMethod</span><span class="o">=</span><span class="s">&quot;createAccount&quot;</span><span class="p">,</span>
+      <span class="n">args</span> <span class="o">=</span> <span class="nv">@Arg</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="s">&quot;2&quot;</span><span class="p">))</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">StaticAccountFactory</span> <span class="p">{</span>
+
+    <span class="n">public</span> <span class="n">static</span> <span class="n">Account</span> <span class="n">createAccount</span><span class="p">(</span><span class="n">long</span> <span class="n">number</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">Account</span><span class="p">(</span><span class="n">number</span><span class="p">);</span>
+     <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>* Example of using factoryRef, factoryMethod, and args properties for the
+@Bean annotation</p>
+<div class="codehilite"><pre><span class="nv">@Bean</span><span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;accountThree&quot;</span><span class="p">,</span>
+      <span class="n">factoryRef</span><span class="o">=</span><span class="s">&quot;accountFactory&quot;</span><span class="p">,</span>
+      <span class="n">factoryMethod</span><span class="o">=</span><span class="s">&quot;createAccount&quot;</span><span class="p">,</span>
+      <span class="n">args</span><span class="o">=</span><span class="nv">@Arg</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="s">&quot;3&quot;</span><span class="p">))</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">NewAccount</span> <span class="p">{</span>
+
+    <span class="n">private</span> <span class="n">long</span> <span class="n">accountNumber</span><span class="p">;</span>
+
+    <span class="n">public</span> <span class="n">NewAccount</span><span class="p">(</span><span class="n">long</span> <span class="n">number</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">this</span><span class="o">.</span><span class="n">accountNumber</span> <span class="o">=</span> <span class="n">number</span><span class="p">;</span>
+    <span class="p">}</span>
+    <span class="o">...</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p><a name="BlueprintAnnotation-@Service,@RegistrationListener,@Register,@UnregisterAnnotations"></a></p>
+<h3 id="service_registrationlistener_register_unregister_annotations">@Service, @RegistrationListener, @Register, @Unregister Annotations</h3>
+<p>If you want to register a bean as a service, you can use @Service
+annotation to do so.  You can specify ranking, autoExport, interfaces,
+serviceProperties and registrationListeners for the service.</p>
+<div class="codehilite"><pre><span class="nv">@Bean</span><span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;foo&quot;</span><span class="p">)</span>
+<span class="nv">@Service</span><span class="p">(</span><span class="n">autoExport</span><span class="o">=</span><span class="s">&quot;all-classes&quot;</span><span class="p">,</span>
+    <span class="n">serviceProperties</span> <span class="o">=</span>
+<span class="nv">@ServiceProperty</span><span class="p">(</span><span class="n">key</span><span class="o">=</span><span class="s">&quot;blueprint.annotation.sample&quot;</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="p">),</span>
+    <span class="n">registerationListeners</span> <span class="o">=</span>
+<span class="nv">@RegistrationListener</span><span class="p">(</span><span class="nb">ref</span><span class="o">=</span><span class="s">&quot;fooRegistrationListener&quot;</span><span class="p">),</span> 
+    <span class="n">ranking</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">Foo</span> <span class="n">implements</span> <span class="n">Serializable</span> <span class="p">{</span>
+   <span class="o">...</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>To annotation a class as registration listener, you can use the
+@RegistrationListener annotation.  @Register can be used to annotate the
+register-method for the registration listener and @Unregister annotation
+can be used on the unregister-method for the registration listener.</p>
+<div class="codehilite"><pre><span class="nv">@Bean</span><span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;fooRegistrationListener&quot;</span><span class="p">)</span>
+<span class="nv">@RegistrationListener</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">FooRegistrationListener</span> <span class="p">{</span>
+
+    <span class="nv">@Register</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">serviceRegistered</span><span class="p">(</span><span class="n">Serializable</span> <span class="n">foo</span><span class="p">,</span> <span class="n">Map</span> <span class="n">props</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Service registration notification: &quot;</span> <span class="o">+</span> <span class="n">foo</span> <span class="o">+</span> <span class="s">&quot;</span>
+<span class="s">    &quot;</span> <span class="o">+</span> <span class="n">props</span><span class="p">);</span>
+    <span class="p">}</span>
+
+    <span class="nv">@Unregister</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">serviceUnregistered</span><span class="p">(</span><span class="n">Foo</span> <span class="n">foo</span><span class="p">,</span> <span class="n">Map</span> <span class="n">props</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Service unregistration notification: &quot;</span> <span class="o">+</span> <span class="n">foo</span> <span class="o">+</span>
+    <span class="s">&quot; &quot;</span> <span class="o">+</span> <span class="n">props</span><span class="p">);</span>
+    <span class="p">}</span>
+
+<span class="p">}</span>
+</pre></div>
+
+
+<p><a name="BlueprintAnnotation-@Reference,@ReferenceList,@ReferenceListenerAnnotations"></a></p>
+<h3 id="reference_referencelist_referencelistener_annotations">@Reference, @ReferenceList, @ReferenceListener Annotations</h3>
+<p>For a bean that you want to act as a ReferenceListener, you can use
+@ReferenceListener to annotate the bean class. <br />
+</p>
+<p>For the service that you want to inject the reference, you can use the
+@Inject and @Reference annotation, with the id, serviceInterface, timeout
+and referenceListeners properties specified for the reference. <br />
+</p>
+<div class="codehilite"><pre><span class="nv">@Bean</span><span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;bindingListener&quot;</span><span class="p">)</span>
+<span class="nv">@ReferenceListener</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">BindingListener</span> <span class="p">{</span>
+
+    <span class="nv">@Inject</span> <span class="nv">@Reference</span> <span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;ref2&quot;</span><span class="p">,</span> 
+        <span class="n">serviceInterface</span> <span class="o">=</span> <span class="n">InterfaceA</span><span class="o">.</span><span class="n">class</span><span class="p">,</span>
+        <span class="n">timeout</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span>
+<span class="n">referenceListeners</span><span class="o">=</span><span class="nv">@ReferenceListener</span><span class="p">(</span><span class="nb">ref</span><span class="o">=</span><span class="s">&quot;bindingListener&quot;</span><span class="p">))</span>
+    <span class="n">private</span> <span class="n">InterfaceA</span> <span class="n">a</span><span class="p">;</span>
+    <span class="o">...</span>
+    <span class="nv">@Init</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">init</span><span class="p">()</span> <span class="p">{</span>
+    <span class="p">}</span>
+
+    <span class="nv">@Bind</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="nb">bind</span><span class="p">(</span><span class="n">InterfaceA</span> <span class="n">a</span><span class="p">,</span> <span class="n">Map</span> <span class="n">props</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">this</span><span class="o">.</span><span class="n">a</span> <span class="o">=</span> <span class="n">a</span><span class="p">;</span>
+    <span class="n">this</span><span class="o">.</span><span class="n">props</span> <span class="o">=</span> <span class="n">props</span><span class="p">;</span>
+    <span class="p">}</span>
+
+    <span class="nv">@Unbind</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">unbind</span><span class="p">(</span><span class="n">InterfaceA</span> <span class="n">a</span><span class="p">,</span> <span class="n">Map</span> <span class="n">props</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">this</span><span class="o">.</span><span class="n">a</span> <span class="o">=</span> <span class="n">null</span><span class="p">;</span>
+    <span class="n">this</span><span class="o">.</span><span class="n">props</span> <span class="o">=</span> <span class="n">null</span><span class="p">;</span>
+    <span class="p">}</span>
+
+<span class="p">}</span>
+</pre></div>
+
+
+<p>@ReferenceList is very similar as @Reference, except that the timeout
+property is not supported in @ReferenceList, while the memberType property
+is supported in @ReferenceList.  This is same as the blueprint XML schema.</p>
+<div class="codehilite"><pre><span class="nv">@Bean</span><span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;listBindingListener&quot;</span><span class="p">)</span>
+<span class="nv">@ReferenceListener</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">ListBindingListener</span> <span class="p">{</span>
+
+    <span class="nv">@Inject</span> <span class="nv">@ReferenceList</span> <span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;ref-list&quot;</span><span class="p">,</span> 
+        <span class="n">serviceInterface</span> <span class="o">=</span> <span class="n">InterfaceA</span><span class="o">.</span><span class="n">class</span><span class="p">,</span>
+
+<span class="n">referenceListeners</span><span class="o">=</span><span class="nv">@ReferenceListener</span><span class="p">(</span><span class="nb">ref</span><span class="o">=</span><span class="s">&quot;listBindingListener&quot;</span><span class="p">))</span>
+    <span class="n">private</span> <span class="n">InterfaceA</span> <span class="n">a</span><span class="p">;</span>
+    <span class="o">...</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p><a name="BlueprintAnnotation-@Blueprintannotation"></a></p>
+<h3 id="blueprint_annotation">@Blueprint annotation</h3>
+<p>@Blueprint annotation can be used on any class to annotate the global
+property of the blueprint bundle, such as defaultActivation,
+defaultTimeout, defaultAvailability.</p>
+<div class="codehilite"><pre><span class="nv">@Blueprint</span><span class="p">(</span><span class="n">defaultActivation</span><span class="o">=</span><span class="s">&quot;eager&quot;</span><span class="p">,</span> <span class="n">defaultTimeout</span><span class="o">=</span><span class="mi">300</span><span class="p">,</span>
+<span class="n">defaultAvailability</span><span class="o">=</span><span class="s">&quot;optional&quot;</span><span class="p">)</span>
+<span class="nv">@Bean</span><span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;bar&quot;</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">Bar</span> <span class="p">{</span>
+    <span class="o">...</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p><a name="BlueprintAnnotation-Typeconverters"></a></p>
+<h3 id="type_converters">Type converters</h3>
+<p>If type converters are desired, you can use the @Bean annotation for it. 
+The blueprint annotation service will recognize it as a type converter if
+it implements the <em>org.osgi.service.blueprint.container.Converter</em>
+interface</p>
+<div class="codehilite"><pre><span class="nv">@Bean</span><span class="p">(</span><span class="n">id</span><span class="o">=</span><span class="s">&quot;converter1&quot;</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">DateTypeConverter</span> <span class="n">implements</span> <span class="n">Converter</span> <span class="p">{</span>
+
+    <span class="nv">@Inject</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&quot;format&quot;</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;yyyy.MM.dd&quot;</span><span class="p">)</span>
+    <span class="n">DateFormat</span> <span class="n">dateFormat</span><span class="p">;</span>
+    <span class="o">...</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p><a name="BlueprintAnnotation-Limitation"></a></p>
+<h3 id="limitation">Limitation</h3>
+<p>Blueprint Annotation is still prototype work and currently only runtime
+annotation scanning is supported.  While it provides some basic useful
+functions, there are still many things that you cannot do using annotation,
+such as inject a list with values, inject inline beans, etc.</p></div>
+            <!-- Content -->
+          </td>
+        </tr>
+      </table>
+   </td>
+   <td id="cell-2-2" colspan="2">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+   <td id="cell-3-0">&nbsp;</td>
+   <td id="cell-3-1">&nbsp;</td>
+   <td id="cell-3-2">
+     <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+         <a href="http://incubator.apache.org/aries/privacy-policy.html";>Privacy
+Policy</a> 
+       </div>
+       <!-- Footer -->
+     </div>
+   </td>
+   <td id="cell-3-3">&nbsp;</td>
+   <td id="cell-3-4">&nbsp;</td>
+  </tr>
+  <tr width="100%">
+    <td id="cell-4-0" colspan="2">&nbsp;</td>
+    <td id="cell-4-1">&nbsp;</td>
+    <td id="cell-4-2" colspan="2">&nbsp;</td>
+  </tr>
+</table>
+</body>
+</html>