| <html><head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
| <title>6. OSGi Profiles and Bundlor</title><link rel="stylesheet" href="css/stylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Bundlor User Guide"><link rel="up" href="index.html" title="Bundlor User Guide"><link rel="prev" href="ch05s05.html" title="5.5 Example Bundlor Manifest Template"><link rel="next" href="ch06s02.html" title="6.2 Using OSGi profiles with Bundlor"><!--Begin Google Analytics code--><script type="text/javascript"> | |
| var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | |
| document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |
| </script><script type="text/javascript"> | |
| var pageTracker = _gat._getTracker("UA-2728886-3"); | |
| pageTracker._setDomainName("none"); | |
| pageTracker._setAllowLinker(true); | |
| pageTracker._trackPageview(); | |
| </script><!--End Google Analytics code--></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6. OSGi Profiles and Bundlor</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch05s05.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch06s02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="OSGi.profile"></a>6. OSGi Profiles and Bundlor</h2></div></div></div><p> | |
| When managing and transforming bundles it | |
| can become difficult to remember which packages are boot delegated, which are exported from the system bundle, | |
| and which are from other bundles in your system. This information is important because you typically do not want | |
| to import packages into your own application that are boot delegated, you want to import system bundle packages | |
| at version <code class="literal">0</code>, and you want to define custom imports for all the rest of the bundles. Trying | |
| to keep track of which packages are in each of these categories can be error prone; similarly, defining template | |
| entries for them in your manifest template can be time-consuming and tedious. | |
| </p><p> | |
| To solve this problem, you can specify that Bundlor take an | |
| <a class="link" href="ch06.html#OSGi-profiles.about" title="6.1 Overview of OSGi profiles">OSGi profile</a> as input and automatically add template entries for boot | |
| delegated packages and system bundles. These import entries would ignore boot-delegated packages and set the | |
| version of system bundles to <code class="literal">version="0"</code>. This feature is available for all Bundlor front | |
| ends: command-line, ANT and Maven. | |
| </p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="OSGi-profiles.about"></a>6.1 Overview of OSGi profiles</h2></div></div></div><p> | |
| An OSGi profile defines the packages that a particular OSGi runtime (such as Virgo) exports from the | |
| system bundle and the packages that it delegates to the boot class loader. An OSGi profile isn't an actual | |
| file; rather, it is two properties that are well known to an OSGi runtime. However, when you pass these | |
| properties to Bundlor, you pass them as a file, as described in the next section. The properties that make | |
| up an OSGi profile are as follows. | |
| </p><div class="itemizedlist"><ul type="disc"><li> | |
| The <code class="literal">org.OSGi.framework.system.packages</code> property defines the packages exported from | |
| the system bundle. | |
| </li><li> | |
| The <code class="literal">org.OSGi.framework.bootdelegation</code> property defines the packages that are boot | |
| delegated. | |
| </li></ul></div><p> | |
| If you are using Virgo as your OSGi runtime, see the file | |
| <code class="literal">$VIRGO_HOME/configuration/java6-server.profile</code> for its OSGi profile, where | |
| <code class="literal">$VIRGO_HOME</code> refers to the main installation directory of Virgo. If you are using | |
| another OSGi runtime, such as Equinox, then see their documentation for their OSGi profile. | |
| </p><p> | |
| For additional information about the syntax of the values of these properties, see | |
| the <a class="ulink" href="http://www.OSGi.org/Specifications/HomePage" target="_top">OSGi Core specification</a>. | |
| </p></div></div><!--Begin LoopFuse code--><script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript"></script><script type="text/javascript"> | |
| _lf_cid = "LF_48be82fa"; | |
| _lf_remora(); | |
| </script><!--End LoopFuse code--><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch05s05.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch06s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">5.5 Example Bundlor Manifest Template </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 6.2 Using OSGi profiles with Bundlor</td></tr></table></div></body></html> |