<?xml version="1.0" encoding="UTF-8"?>
<!--
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - JOnAS: Java(TM) Open Application Server
  - Copyright (C) 2007-2008 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.ejb.easybeans.EasyBeansService"
             immediate="false">

    <provides specifications="org.ow2.jonas.ejb3.IEasyBeansService" />

    <!-- Required dependencies -->
    <requires optional="false">
      <callback type="bind" method="setDeployerManager" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setJmxService" />
    </requires>
    <requires optional="false">
      <!-- This declared dependency is only here because we need to be
        started after the J2EEServer.
        DO NOT REMOVED IT unless you know what you're doing ! -->
      <callback type="bind" method="setJ2EEServer" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setNamingManager" />
    </requires>
    <requires optional="false"
              specification="org.ow2.jonas.properties.ServerProperties">
      <!-- @specification is required here because only the abstract JOnAS
           service reference that class, and iPOJO cannot introspect
           bytecode of that class that is not inside this bundle -->
      <callback type="bind" method="setServerProperties" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setEventService" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setCommonsModelerExtService" />
    </requires>

    <requires optional="false"
              specification="org.ow2.jonas.jndi.checker.api.IResourceCheckerManager">
      <callback type="bind" method="setResourceCheckerManager" />
      <callback type="unbind" method="unsetResourceCheckerManager" />
    </requires>

    <requires optional="false"
              specification="org.ow2.jonas.workmanager.WorkManagerService">
      <callback type="bind" method="setWorkManagerService" />
    </requires>

    <!-- Optional dependencies -->
    <requires optional="true">
      <callback type="bind" method="setResourceService" />
    </requires>
    <requires optional="true">
      <callback type="bind" method="setCmiService" />
    </requires>
    <requires optional="true" specification="org.ow2.easybeans.api.EZBContainer" aggregate="true">
      <callback type="bind" method="addContainer" />
      <callback type="unbind" method="removeContainer" />
    </requires>
    <requires optional="true"
              specification="org.ow2.jonas.versioning.VersioningService">
      <callback type="bind" method="setVersioningService" />
      <callback type="unbind" method="unsetVersioningService" />
    </requires>
    <requires optional="true"
              specification="org.ow2.easybeans.api.EZBConfigurationExtension"
              aggregate="true">
      <callback type="bind" method="addConfigurationExtension" />
      <callback type="unbind" method="removeConfigurationExtension" />
    </requires>
    <requires optional="true">
      <callback type="bind" method="setWorkCleanerService" />
    </requires>

    <requires optional="true">
      <callback type="bind" method="addPersistenceProvider" />
      <callback type="unbind" method="removePersistenceProvider" />
    </requires>

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

    <!-- Component properties are propagated as service properties -->
    <properties propagation="true" />
  </component>
</ipojo>
