<?xml version="1.0" encoding="UTF-8"?>
<!--
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - JOnAS: Java(TM) Open Application Server
  - Copyright (C) 2007-2009 Bull S.A.S.
  - Contact: jonas-team@ow2.org
  -
  - This library is free software; you can redistribute it and/or
  - modify it under the terms of the GNU Lesser General Public
  - License as published by the Free Software Foundation; either
  - version 2.1 of the License, or any later version.
  -
  - This library is distributed in the hope that it will be useful,
  - but WITHOUT ANY WARRANTY; without even the implied warranty of
  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  - Lesser General Public License for more details.
  -
  - You should have received a copy of the GNU Lesser General Public
  - License along with this library; if not, write to the Free Software
  - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  - USA
  -
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - $Id$
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<ipojo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="org.apache.felix.ipojo"
       xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/1.6.0/core.xsd" >

  <component classname="org.ow2.jonas.services.bootstrap.JOnASConfiguration"
             name="JOnASConfiguration"
             public="false" 
             immediate="true">

    <!-- iPOJO will expose this service under all the specifications
      implemented by the component class -->
    <provides specifications="{org.ow2.jonas.configuration.ConfigurationManager, org.osgi.service.cm.ConfigurationPlugin}" />

    <requires optional="false">
      <callback type="bind" method="setConfigurationAdmin" />
    </requires>

    <callback transition="validate" method="configure" />
  </component>

  <component classname="org.ow2.jonas.services.bootstrap.PlatformMBeanServerDelegate"
             name="PlatformMBeanServerDelegate"
             public="false" 
             immediate="true">
    <provides />
    <callback transition="validate" method="start" />
  </component>

  <component classname="org.ow2.jonas.services.bootstrap.JOnASDeploymentPlanDeployer"
             name="JOnASDeploymentPlanDeployer"
             public="false" 
             immediate="true">

    <provides specifications="org.ow2.jonas.configuration.DeploymentPlanDeployer" />

    <requires optional="false">
      <callback type="bind" method="setConfigurationManager" />
    </requires>

    <requires optional="false">
      <callback type="bind" method="setDeploymentPlanDeployer" />
    </requires>
  </component>

  <component classname="org.ow2.jonas.services.bootstrap.repository.JOnASRepositories"
             name="JOnASRepositories"
             public="false" 
             immediate="true">

    <requires optional="false">
      <callback type="bind" method="setConfigurationAdmin" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setServerProperties" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setRepositoryManager" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setRepositoryDeployer" />
    </requires>
    <requires optional="false"
      specification="javax.management.MBeanServer">
      <callback type="bind" method="setMBeanServer" />
    </requires>
    <requires optional="false" filter="(validating=true)">
      <callback type="bind" method="setRepositoryReader" />
    </requires>

    <!-- LifeCycle callbacks -->
    <callback transition="validate" method="start" />
    <callback transition="invalidate" method="stop" />
  </component>

  <component classname="org.ow2.jonas.services.bootstrap.deploymentplan.JOnASDeploymentPlan"
             name="JOnASDeploymentPlan"
             public="false" 
             immediate="true">

    <requires optional="false">
      <callback type="bind" method="setServerProperties" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setMBeanServer" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setDeploymentPlanDeployer" />
    </requires>

    <!-- LifeCycle callbacks -->
    <callback transition="validate" method="start" />
    <callback transition="invalidate" method="stop" />
  </component>

  <instance component="JOnASConfiguration" />
  <instance component="PlatformMBeanServerDelegate" />
  <instance component="JOnASRepositories" />
  <instance component="JOnASDeploymentPlanDeployer" />
  <instance component="JOnASDeploymentPlan" />
</ipojo>
