Description
I'm trying to deploy a datasource configuration file with a feature
defined in a feature.xml like this:
<feature name="xxx" version="1.0.0-SNAPSHOT">
<details>xxx</details>
<config name="org.ops4j.datasource-myds">
osgi.jdbc.driver.name=oracle-pool-xa
url=jdbc:oracle:thin:@192.168.1.2:1521:orcl
user=test
password=test
dataSourceName=test
</config>
</feature>
When I issue a feature:install in the shell, the feature gets installed
and a config file "etc/org.ops4j.datasource.cfg" is created, note the
missing instance suffix "myds". In effect the DS is not active.
This is the log output when installing the feature:
2016-03-23 16:41:48,274 | INFO | nsole user karaf | FeaturesServiceImpl | 9 - org.apache.karaf.features.core - 4.0.4 | Adding features: xxx/[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]
2016-03-23 16:41:48,366 | INFO | pool-41-thread-1 | FeaturesServiceImpl | 9 - org.apache.karaf.features.core - 4.0.4 | No deployment change.
2016-03-23 16:41:48,372 | INFO | pool-41-thread-1 | FeaturesServiceImpl | 9 - org.apache.karaf.features.core - 4.0.4 | Done.
2016-03-23 16:41:49,430 | INFO | -karaf-4.0.4/etc | fileinstall | 8 - org.apache.felix.fileinstall - 3.5.0 | Creating configuration from org.ops4j.datasource.cfg
The values are in the config file:
mdo:/tmp/apache-karaf-4.0.4$ cat etc/org.ops4j.datasource.cfg
user = test
password = test
url = jdbc:oracle:thin:@192.168.1.2:1521:orcl
dataSourceName = test
osgi.jdbc.driver.name = oracle-pool-xa
see: http://karaf.922171.n3.nabble.com/Deploy-datasource-config-with-feature-xml-td4045941.html