<?xml version="1.0" encoding="UTF-8"?>
<!--
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - JOnAS: Java(TM) Open Application Server
  - Copyright (C) 2007 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.ejb2.internal.JOnASEJBService" 
             immediate="false">
    <provides specifications="org.ow2.jonas.ejb2.EJBService" />

    <!-- Required dependencies -->
    <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="setRegistry" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setSecurityService" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setTransactionService" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setDeployerManager" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setNaming" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setWorkManagerService" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setJmxService" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setComponentContextFactory" />
    </requires>
    <requires optional="false">
      <callback type="bind" method="setEventService" />
    </requires>

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

    <!-- Optional dependencies -->
    <requires optional="true">
      <callback type="bind" method="setWebServicesService" />
    </requires>
    <requires optional="true">
      <callback type="bind" method="setCmiService" />
    </requires>
    <requires optional="true">
      <callback type="bind" method="setHaService" />
    </requires>
    <requires optional="true">
      <callback type="bind" method="setResourceService" />
    </requires>
    <requires optional="true">
      <callback type="bind" method="setWorkCleanerService" />
    </requires>
    <requires optional="true">
      <callback type="bind" method="setVersioningService" />
      <callback type="unbind" method="unsetVersioningService" />
    </requires>

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

    <properties propagation="true">
      <property name="parsingwithvalidation"
                method="setParsingwithvalidation" />
        <property name="monitoringEnabled"
                method="setMonitoringEnabled" />
         <property name="warningThreshold"
                method="setWarningThreshold" />
         <property name="auto-genic"
                method="setAutoGenic" />
      <property name="auto-genic.args"
                method="setAutoGenicArgs" />
    </properties>
  </component>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- JComponentContextFactoryDelegate for EJB Handle       -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <component classname="org.ow2.jonas.ejb2.internal.delegate.HandleDelegateCCFDelegate"
             name="HandleDelegateCCFDelegate"
             public="false"
             immediate="true">
    <provides specifications="org.ow2.jonas.naming.JComponentContextFactoryDelegate" />
  </component>

  <!-- The delegate instance -->
  <instance component="HandleDelegateCCFDelegate" />

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- JComponentContextFactoryDelegate for Timer Handle     -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <component classname="org.ow2.jonas.ejb2.internal.delegate.JTimerHandleDelegate"
             name="JTimerHandleDelegate"
             public="false"
             immediate="true">
    <provides specifications="org.ow2.jonas.naming.JComponentContextFactoryDelegate" />

    <!-- Required dependencies -->
    <requires optional="false">
      <callback type="bind" method="setEJBService" />
    </requires>
  </component>

  <!-- The delegate instance -->
  <instance component="JTimerHandleDelegate" />
</ipojo>
