<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">

    <bean id="a" class="org.apache.aries.blueprint.pojos.PojoCircular">
        <property name="circular" ref="b"/>
    </bean>

    <bean id="b" class="org.apache.aries.blueprint.pojos.PojoCircular">
        <property name="circular" ref="a"/>
    </bean>
    
    <bean id="c" class="org.apache.aries.blueprint.pojos.PojoCircular" init-method = "init">
        <property name="circular" ref="d"/>
    </bean>

    <bean id="d" class="org.apache.aries.blueprint.pojos.PojoCircular">
        <property name="circular" ref="c"/>
    </bean>
    
    
    
    <bean id="serviceBean" class="org.apache.aries.blueprint.pojos.PojoB">
        <property name="uri" value="urn:myuri" />
    </bean>
    
    <bean id="listener" class="org.apache.aries.blueprint.pojos.PojoListener">
        <property name="service" ref="service" />
    </bean>
    
    <service id="service" ref="serviceBean" interface="org.apache.aries.blueprint.pojos.PojoB">
        <service-properties>
            <entry key="key1" value="value1"/>
            <entry key="key2" value="value2"/>
        </service-properties>
        <registration-listener ref="listener"
           registration-method="register"
           unregistration-method="unregister"/>
    </service>
    
    <!-- for prototype cycle tests -->
    
    <bean id="circularPrototype" class="org.apache.aries.blueprint.pojos.PojoCircular" scope = "prototype">
        <property name="circular" ref="circularPrototype"/>
    </bean>
    
    <bean id="circularPrototypeDriver" class="org.apache.aries.blueprint.pojos.PojoCircular" scope = "prototype">
        <property name="circular" ref="circularPrototypeDriver"/>
    </bean>
            
     <!-- for dynamic cycle tests (blueprintContainer.getComponentInstance()) -->
     
    <bean id="recursiveConstructor" class="org.apache.aries.blueprint.pojos.PojoRecursive">
        <argument ref="blueprintContainer"/>
        <argument value="recursiveConstructor"/>
        <argument value="1"/>
    </bean>
    
    <bean id="recursiveSetter" class="org.apache.aries.blueprint.pojos.PojoRecursive">
        <argument ref="blueprintContainer"/>
        <argument value="recursiveSetter"/>
        <property name="foo" value="1"/>
    </bean>
    
    <bean id="recursiveInitMethod" class="org.apache.aries.blueprint.pojos.PojoRecursive" init-method = "init">
        <argument ref="blueprintContainer"/>
        <argument value="recursiveInitMethod"/>
    </bean>

    <!-- for breaking dependency cycle tests  -->

    <bean id="c1" class="org.apache.aries.blueprint.pojos.PojoCircular">
        <argument ref="c2"/>
    </bean>
    
    <bean id="c2" class="org.apache.aries.blueprint.pojos.PojoCircular">
        <argument ref="c3"/>
    </bean>
    
    <bean id="c3" class="org.apache.aries.blueprint.pojos.PojoCircular">
        <property name="circular" ref="c1"/>
    </bean>
    
</blueprint>