80 lines
3.1 KiB
Plaintext
80 lines
3.1 KiB
Plaintext
[#ftl attributes={"generated.type":"blueprint"} /]
|
|
[#--
|
|
|
|
~~~~~~licensing~~~~~~
|
|
h2-adapter
|
|
==========
|
|
Copyright (C) 2020 - 2023 EmDev LLC
|
|
==========
|
|
You may not use this file except in accordance with the License Terms of
|
|
the Copyright
|
|
Holder located at: https://entaxy.ru/eula . All copyrights, all
|
|
intellectual property
|
|
rights to the Software and any copies are the property of the Copyright
|
|
Holder. Unless
|
|
it is explicitly allowed the Copyright Holder, the User is prohibited
|
|
from using the
|
|
Software for commercial purposes to provide services to third parties.
|
|
|
|
The Copyright Holder hereby declares that the Software is provided on an
|
|
"AS IS".
|
|
Under no circumstances does the Copyright Holder guarantee or promise
|
|
that the
|
|
Software provided by him will be suitable or not suitable for the
|
|
specific purposes
|
|
of the User, that the Software will meet all commercial and personal
|
|
subjective
|
|
expectations of the User, that the Software will work properly, without
|
|
technical
|
|
errors, quickly and uninterruptedly.
|
|
|
|
Under no circumstances shall the Copyright Holder or its Affiliates is
|
|
not liable
|
|
to the User for any direct or indirect losses of the User, his expenses
|
|
or actual
|
|
damage, including, downtime; loss of bussines; lost profit; lost
|
|
earnings; loss
|
|
or damage to data, property, etc.
|
|
~~~~~~/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>
|