| <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" |
| xmlns:cm="http://www.osgi.org/xmlns/blueprint-cm/v1.0.0" |
| default-availability="optional"> |
| |
| <type-converters> |
| <bean id="converter1" class="org.apache.geronimo.blueprint.sample.DateTypeConverter"> |
| <property name="format" value="yyyy.MM.dd"/> |
| </bean> |
| <bean id="converter2" class="org.apache.geronimo.blueprint.sample.CurrencyTypeConverter"/> |
| |
| <cm:property-placeholder id="property-placeholder" persistent-id="blueprint-sample"> |
| <cm:default-properties> |
| <cm:property name="key.b" value="-1"/> |
| </cm:default-properties> |
| </cm:property-placeholder> |
| </type-converters> |
| |
| <bean id="foo" class="org.apache.geronimo.blueprint.sample.Foo" init-method="init" destroy-method="destroy"> |
| <property name="a" value="5" /> |
| <property name="b" value="${key.b}" /> |
| <property name="bar" ref="bar" /> |
| <property name="currency"> |
| <value>PLN</value> |
| </property> |
| <property name="date"> |
| <value>2009.04.17</value> |
| </property> |
| </bean> |
| |
| <bean id="bar" class="org.apache.geronimo.blueprint.sample.Bar"> |
| <property name="value"><value>Hello FooBar</value></property> |
| <property name="context" ref="bundleContext"/> |
| <property name="list"> |
| <list> |
| <value>a list element</value> |
| <value type = "java.lang.Integer">5</value> |
| </list> |
| </property> |
| </bean> |
| |
| <service ref="foo" auto-export="all-classes"> |
| <service-properties> |
| <entry key="key" value="value"/> |
| </service-properties> |
| <registration-listener ref="fooRegistrationListener" |
| registration-method="serviceRegistered" |
| unregistration-method="serviceUnregistered"/> |
| </service> |
| |
| <bean id="fooRegistrationListener" class="org.apache.geronimo.blueprint.sample.FooRegistrationListener"/> |
| |
| <reference id="ref" interface="org.apache.geronimo.blueprint.sample.Foo"> |
| </reference> |
| |
| <reference id="ref2" interface="org.apache.geronimo.blueprint.sample.InterfaceA" timeout="100"> |
| <reference-listener bind-method="bind" unbind-method="unbind" ref="bindingListener" /> |
| </reference> |
| |
| <bean id="bindingListener" class="org.apache.geronimo.blueprint.sample.BindingListener"/> |
| |
| <ref-list id="ref-list" interface="org.apache.geronimo.blueprint.sample.InterfaceA"> |
| <reference-listener bind-method="bind" unbind-method="unbind" ref="listBindingListener" /> |
| </ref-list> |
| |
| <bean id="listBindingListener" class="org.apache.geronimo.blueprint.sample.BindingListener"/> |
| |
| </blueprint> |
| |