<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.3.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.3.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.3.0.xsd">
<!-- Configuration section -->
<cm:property-placeholder persistent-id="CSD2DDF-Config">
<cm:property name="csdParameters" value="default" />
</cm:default-properties>
</cm:property-placeholder>
<reference id="CatalogFramework" interface="ddf.catalog.CatalogFramework" />
<reference id="SecurityManager" interface="ddf.security.service.SecurityManager" />
<bean id="Mapper" class="csd.ddf.mapper.Mapper" scope="singleton" init-method="start" destroy-method="stop">
<argument ref="CatalogFramework" />
<argument ref="ConnectionManager" />
<argument>
<map>
<entry key="some.key"
value="some value"/>
... a few other entries ...
</map>
</argument>
<argument ref="CsdInputTransformer" />
<argument>
<list></list>
</argument>
<argument ref="SecurityManager" />
</bean>
<bean id="ConnectionManager" class="csd.connection.ConnectionManager"
scope="singleton">
<property name="csdParameters" value="${csdParameters}" />
<property name="csdConnections" ref="ConnectionsMap"/>
<property name="csdSavedConnectionFilePath" value="default"/>
</bean>
<map id="ConnectionsMap" map-class="java.util.LinkedHashMap"/>
<bean id="CsdInputTransformer" class="ddf.csd.input.transformer.CsdInputTransformer" />
<bean id="CsdInterfaceManager" class="ca.dnd.lsec.isra.api.CsdInterfaceManager"
scope="singleton">
<argument name="clientApplicationName" value="CSD DDF Client" />
</bean>
<bean id="CSDstandingQueryListener" class="csd.queries.standing.CSDstandingQueryListener">
<property name="mapper" ref="Mapper" />
</bean>
<bean id="CsdConnection" class="csd.connection.CsdConnection">
<property name="csdParameters" ref="CsdParameters"/>
<property name="config" ref="Config"/>
</bean>
<bean id="CsdParameters" class="csd.connection.CsdConnectionParameters">
<property name="csdUser" value="default"/>
<property name="csdPassword" value="default"/>
<property name="iorLocationUrl" value="default"/>
</bean>
<bean id="Config" class="ca.dnd.lsec.isra.api.ClientConfig"/>
</blueprint>
public CsdInterfaceManager(String xxx) {
...
}
So, I figured that my map element should not be a child of the blueprint element. I fixed it by moving it as a child of the argument element.Now, I have a problem with the following part:
<bean id="CsdInterfaceManager" class="ca.dnd.lsec.isra.api.CsdInterfaceManager"
scope="singleton">
<argument name="clientApplicationName" value="CSD DDF Client" />
</bean>
In my latest version, I removed the name attribute, but I get an error message stipulating that aries is unable to convert value to type class java.lang.String. Any suggestion on how to fix this?
<cm:property name=csdParameters">
<array value-type="java.lang.String">
<value>Default</value>
</array>
</cm:property>
public void setCsdParameters(List<String> xxx) {
...
}
public void setCsdParameters(Set<String> xxx) {
...
}
public void setCsdParameters(String[] xxx) {
...
}
<property name=csdParameters">
<array value-type="java.lang.String">
<value>Default</value>
</array>
</property>
<cm:property-placeholder persistent-id="CSD2DDFConfig">
<cm:default-properties>
<cm:property name="csdParameters">
<array>
<value type="java.lang.String">default</value>
</array>
</cm:property>
</cm:default-properties>
</cm:property-placeholder>