<?xml version="1.0" encoding="UTF-8"?>
<section version="5.0" xml:id="obr-deployment-data" xml:lang="en"
         xmlns="http://docbook.org/ns/docbook"
         xmlns:xlink="http://www.w3.org/1999/xlink"
         xmlns:xi="http://www.w3.org/2001/XInclude"
         xmlns:svg="http://www.w3.org/2000/svg"
         xmlns:mml="http://www.w3.org/1998/Math/MathML"
         xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns:db="http://docbook.org/ns/docbook">
  <title>OBR deployments</title>

  <section xml:id="obr-data">
    <title>OBR specific data</title>

    <para>Many notions used here are defined or described in the <link
    xlink:href="http://www.osgi.org/download/rfc-0112_BundleRepository.pdf">
    OSGi RFC 112 Bundle Repository </link>. The OBR deployment gives many ways
    to define a resource. You can use as many descriptions as you want, only
    one search will be issued, built as the conjunction of these descriptions.
    The result will be considered valid only if there is <emphasis>one and
    only one</emphasis> matching resource. The OBR specific data can only be
    specified as <emphasis>XML elements</emphasis>.</para>

    <para>Here are the possible descriptions: <itemizedlist>
        <listitem>
          <para><emphasis>obr:bundle-symbolic-name</emphasis> (optional) : the
          OBR symbolic name of the resource.</para>
        </listitem>

        <listitem>
          <para><emphasis>obr:bundle-version</emphasis> (optional) : the OBR
          version of the resource.</para>
        </listitem>

        <listitem>
          <para><emphasis>obr:filter</emphasis> (optional) : a OSGi/LDAP
          filter (see the RFC) that describes the resource.</para>
        </listitem>

        <listitem>
          <para><emphasis>obr:require-service</emphasis> (optional) : the
          resource must provide the required service.</para>
        </listitem>
      </itemizedlist></para>
  </section>

  <section xml:id="obr-example">
    <title>Full OBR deployment example</title>

    <para>The following deployment plan contains two OBR deployments. Both
    require a resource by <varname>symbolic-name</varname> +
    <varname>version</varname>, but the first uses the dedicated XML elements
    while the second uses a <emphasis>filter</emphasis>.</para>

    <para><example xml:id="example-deployment-plan-obr">
        <title>Deployment plan with OBR deployments</title>

        <literallayout language="xml">  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;deployment-plan xmlns="http://jonas.ow2.org/ns/deployment-plan/1.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:obr="http://jonas.ow2.org/ns/deployment-plan/obr/1.0"&gt;
    &lt;deployment xsi:type="obr:obr-deploymentType"  id="dep-obr-1"&gt;
        &lt;obr:bundle-symbolic-name&gt;org.ow2.easybeans.examples.entitybean&lt;/obr:bundle-symbolic-name&gt;
        &lt;obr:bundle-version&gt;=1.1.0-SNAPSHOT&lt;obr:bundle-version&gt;
    &lt;/deployment&gt;

    &lt;deployment xsi:type="obr:obr-deploymentType"  id="dep-obr-2"&gt;
        &lt;obr:filter&gt;(&amp;(symbolicname=org.ow2.easybeans.examples.statefullbean)(version=1.1.0-SNAPSHOT))&lt;/obr:filter&gt;
    &lt;/deployment&gt;
  &lt;/deployment-plan&gt;   </literallayout>
      </example></para>
  </section>
</section>
