| <!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 rel="shortcut icon" href="http://aries.apache.org/images/favicon.ico"></link> |
| <link type="text/css" rel="stylesheet" href="http://aries.apache.org/resources/site.css"></link> |
| </script><script src="http://aries.apache.org/resources/menus.js" language="javascript" type="text/javascript"></script> |
| <meta name="keywords" content="..."/> |
| <meta name="description" content="..." /> |
| <title> |
| Apache Aries - Applications |
| </title> |
| </head> |
| <body onload="SetMenu()"> |
| |
| <table width="100%" cellpadding="0" cellspacing="0"> |
| <tr width="100%"> |
| <td id="cell-0-0" colspan="2"> </td> |
| <td id="cell-0-1"> </td> |
| <td id="cell-0-2" colspan="2"> </td> |
| </tr> |
| <tr width="100%"> |
| <td id="cell-1-0"> </td> |
| <td id="cell-1-1"> </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://aries.apache.org/" title="Apache Aries"> <img border="0" src="http://aries.apache.org/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="http://aries.apache.org/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> |
| <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="aries.apache.org"></INPUT> |
| <INPUT name="sitesearch" type="hidden" value="aries.apache.org"></INPUT> |
| </FORM> |
| </DIV> |
| <!-- Quicklinks --> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| </td> |
| <td id="cell-1-3"> </td> |
| <td id="cell-1-4"> </td> |
| </tr> |
| <tr width="100%"> |
| <td id="cell-2-0" colspan="2"> </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 --> |
| <style type="text/css"> |
| /* The following code is added by mdx_elementid.py |
| It was originally lifted from http://subversion.apache.org/style/site.css */ |
| /* |
| * Hide class="elementid-permalink", except when an enclosing heading |
| * has the :hover property. |
| */ |
| .headerlink, .elementid-permalink { |
| visibility: hidden; |
| } |
| h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> |
| <div onclick="SwitchMenu('documentation')" id="documentationTitle" class="menutitle">Documentation</div> |
| |
| <div id="documentation" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="/documentation/integrators-guide.html">Integrators Guide</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/documentation/articles.html">Articles</a> |
| </div> |
| <div class="menuitem"> |
| <a href="https://svn.apache.org/repos/asf/aries/slides/">Slides</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/documentation/tutorials.html">Tutorials</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/documentation/tools.html">Tools</a> |
| </div> |
| </div> |
| |
| <div onclick="SwitchMenu('modules')" id="modulesTitle" class="menutitle">Modules</div> |
| |
| <div id="modules" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="/modules/samples.html">Samples</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/async-svcs.html">Asynchronous Services</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/blueprint.html">Blueprint</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/blueprint-maven-plugin.html">Blueprint-maven-plugin</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/blueprintannotation.html">Blueprint Annotations</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/blueprintnoosgi.html">Blueprint No-OSGi</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/blueprintweb.html">Blueprint Web</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/containers.html">Containers</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/esaanttask.html">ESA Ant Task </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/ebamavenpluginproject.html">EBA Maven Plugin </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/esamavenpluginproject.html">ESA Maven Plugin </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/jmx.html">JMX</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/jndiproject.html">JNDI</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/jpaproject.html">JPA</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/transactioncontrol.html">Transaction Control Service</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/transactionsproject.html">Transactions</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/rsa.html">Remote Service Admin (RSA)</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/spi-fly.html">SPI Fly</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/subsystems.html">Subsystems</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/applications.html">Applications (obsolete)</a> |
| </div> |
| </div> |
| |
| <div onclick="SwitchMenu('downloads')" id="downloadsTitle" class="menutitle">Downloads</div> |
| |
| <div id="downloads" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="/downloads/currentreleases.html">Current Releases</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/downloads/testresults.html">Compliance Tests</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/downloads/archived-releases.html">Archived Releases</a> |
| </div> |
| </div> |
| |
| <div onclick="SwitchMenu('community')" id="communityTitle" class="menutitle">Community</div> |
| |
| <div id="community" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="/community/resources.html">Community Resources</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/community/gettinginvolved.html">Getting Involved</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/community/people.html">Who we are</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/community/boardreports.html">Board Reports</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/community/logos.html">Logos for Users</a> |
| </div> |
| </div> |
| |
| <div onclick="SwitchMenu('development')" id="developmentTitle" class="menutitle">Development</div> |
| |
| <div id="development" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="/development/buildingaries.html">Building Aries </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/development/guidelines.html">Cording Guidelines</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/development/architecture.html">Architecture</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/development/releasingaries.html">Releasing Aries </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/development/compliancetesting.html">OSGi Compliance Tests </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/development/maintainingthewebpages.html">Web Site Maintenance </a> |
| </div> |
| </div> |
| |
| <div onclick="SwitchMenu('sponsorship')" id="sponsorshipTitle" class="menutitle">Sponsorship</div> |
| |
| <div id="sponsorship" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="http://www.apache.org/foundation/thanks.html">Thanks</a> |
| </div> |
| <div class="menuitem"> |
| <a href="http://www.apache.org/foundation/sponsorship.html">Sponsoring Apache</a> |
| </div> |
| </div> |
| |
| <div class="promotion"> |
| <a href="http://www.apache.org/events/current-event.html"> |
| <img src="http://www.apache.org/events/current-event-125x125.png" width="125" height="125"/> |
| </a> |
| </div> |
| <!-- NavigationBar --> |
| </div> |
| </div> |
| </div> |
| </div> |
| </td> |
| <td height="100%" width="100%"> |
| <!-- Content --> |
| <div class="wiki-content"><style type="text/css"> |
| /* The following code is added by mdx_elementid.py |
| It was originally lifted from http://subversion.apache.org/style/site.css */ |
| /* |
| * Hide class="elementid-permalink", except when an enclosing heading |
| * has the :hover property. |
| */ |
| .headerlink, .elementid-permalink { |
| visibility: hidden; |
| } |
| h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> |
| <p><a name="Applications-AriesApplications"></a></p> |
| <h1 id="aries-applications">Aries Applications<a class="headerlink" href="#aries-applications" title="Permanent link">¶</a></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). </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. </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<a class="headerlink" href="#structure-of-an-aries-application" title="Permanent link">¶</a></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<a class="headerlink" href="#aries-application-manifest" title="Permanent link">¶</a></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<a class="headerlink" href="#aries-deployment-manifest" title="Permanent link">¶</a></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"> </td> |
| </tr> |
| <tr width="100%"> |
| <td id="cell-3-0"> </td> |
| <td id="cell-3-1"> </td> |
| <td id="cell-3-2"> |
| <div id="footer"> |
| <!-- Footer --> |
| <div id="site-footer"> |
| <a href="http://aries.apache.org/privacy-policy.html";>Privacy |
| Policy</a> |
| </div> |
| <!-- Footer --> |
| </div> |
| </td> |
| <td id="cell-3-3"> </td> |
| <td id="cell-3-4"> </td> |
| </tr> |
| <tr width="100%"> |
| <td id="cell-4-0" colspan="2"> </td> |
| <td id="cell-4-1"> </td> |
| <td id="cell-4-2" colspan="2"> </td> |
| </tr> |
| </table> |
| </body> |
| </html> |