blob: 14322c1628d31947c34ae716b7895b9df9792c2f [file] [log] [blame]
Guillaume Nodet2e6afd12009-04-30 09:10:03 +00001<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
3 xmlns:cm="http://www.osgi.org/xmlns/blueprint-cm/v1.0.0"
4 default-availability="optional">
5
6 <type-converters>
7 <bean id="converter1" class="org.apache.geronimo.blueprint.sample.DateTypeConverter">
8 <property name="format" value="yyyy.MM.dd"/>
9 </bean>
10 <bean id="converter2" class="org.apache.geronimo.blueprint.sample.CurrencyTypeConverter"/>
11
12 <cm:property-placeholder id="property-placeholder" persistent-id="blueprint-sample">
13 <cm:default-properties>
14 <cm:property name="key.b" value="-1"/>
15 </cm:default-properties>
16 </cm:property-placeholder>
17 </type-converters>
18
19 <bean id="foo" class="org.apache.geronimo.blueprint.sample.Foo" init-method="init" destroy-method="destroy">
20 <property name="a" value="5" />
21 <property name="b" value="${key.b}" />
22 <property name="bar" ref="bar" />
23 <property name="currency">
24 <value>PLN</value>
25 </property>
26 <property name="date">
27 <value>2009.04.17</value>
28 </property>
29 </bean>
30
31 <bean id="bar" class="org.apache.geronimo.blueprint.sample.Bar">
32 <property name="value"><value>Hello FooBar</value></property>
33 <property name="context" ref="bundleContext"/>
34 <property name="list">
35 <list>
36 <value>a list element</value>
37 <value type = "java.lang.Integer">5</value>
38 </list>
39 </property>
40 </bean>
41
42 <service ref="foo" auto-export="all-classes">
43 <service-properties>
44 <entry key="key" value="value"/>
45 </service-properties>
46 <registration-listener ref="fooRegistrationListener"
47 registration-method="serviceRegistered"
48 unregistration-method="serviceUnregistered"/>
49 </service>
50
51 <bean id="fooRegistrationListener" class="org.apache.geronimo.blueprint.sample.FooRegistrationListener"/>
52
53 <reference id="ref" interface="org.apache.geronimo.blueprint.sample.Foo">
54 </reference>
55
56 <reference id="ref2" interface="org.apache.geronimo.blueprint.sample.InterfaceA" timeout="100">
Guillaume Nodet9d362472009-06-18 21:11:51 +000057 <reference-listener bind-method="bind" unbind-method="unbind" ref="bindingListener" />
Guillaume Nodet2e6afd12009-04-30 09:10:03 +000058 </reference>
59
60 <bean id="bindingListener" class="org.apache.geronimo.blueprint.sample.BindingListener"/>
61
62 <ref-list id="ref-list" interface="org.apache.geronimo.blueprint.sample.InterfaceA">
Guillaume Nodet9d362472009-06-18 21:11:51 +000063 <reference-listener bind-method="bind" unbind-method="unbind" ref="listBindingListener" />
Guillaume Nodet2e6afd12009-04-30 09:10:03 +000064 </ref-list>
65
66 <bean id="listBindingListener" class="org.apache.geronimo.blueprint.sample.BindingListener"/>
67
68</blueprint>
69