62 lines
2.4 KiB
Plaintext
62 lines
2.4 KiB
Plaintext
[#ftl attributes={"generated.type":"blueprint"} /]
|
|
[#--
|
|
|
|
~~~~~~licensing~~~~~~
|
|
h2-adapter
|
|
==========
|
|
Copyright (C) 2020 - 2021 EmDev LLC
|
|
==========
|
|
Licensed 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.
|
|
~~~~~~/licensing~~~~~~
|
|
|
|
--]
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
|
|
xsi:schemaLocation="
|
|
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"
|
|
>
|
|
|
|
<cm:property-placeholder persistent-id="[=connection.configurationPid]"
|
|
update-strategy="reload">
|
|
[#if connection.properties??]
|
|
<cm:default-properties>
|
|
[#list connection.properties as key, value]
|
|
<cm:property name="[=connection.configurationPid].[=key]" value="[=value]"/>
|
|
[/#list]
|
|
</cm:default-properties>
|
|
[/#if]
|
|
</cm:property-placeholder>
|
|
|
|
<service interface="org.apache.camel.Component" ref="[=connection.name]">
|
|
<service-properties>
|
|
<entry key="connection.name" value="[=connection.name]"/>
|
|
</service-properties>
|
|
</service>
|
|
|
|
<bean id="[=connection.name]" class="org.apache.camel.component.jdbc.JdbcComponent">
|
|
[#-- //TODO change template for property reference usage instead of text value --]
|
|
<property name="dataSource" ref="dataSource"/>
|
|
[#if connection.properties??]
|
|
[#list connection.properties as key, value]
|
|
<property name="[=key]" value="[='$']{[=connection.configurationPid].[=key]}"/>
|
|
[/#list]
|
|
[/#if]
|
|
</bean>
|
|
|
|
<reference id="dataSource" interface="javax.sql.DataSource" filter="(osgi.jndi.service.name=[=connection.pathParameter])"
|
|
availability="mandatory"/>
|
|
|
|
</blueprint>
|