[
https://issues.apache.org/jira/browse/KARAF-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14106534#comment-14106534
]
Vinuraj M commented on KARAF-3174:
----------------------------------
Steps to reproduce the issue:
1. Start Karaf instance with adatasource configuration file in
KARAF_HOME/deploy folder. Sample using postgresql database below.
<!--datasource1.xml-->
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
<bean id="ds1" class="org.postgresql.ds.PGSimpleDataSource" >
<property name="serverName" value="localhost:5432/db1"/>
<property name="user" value="userid"/>
<property name="password" value="password"/>
</bean>
<service interface="javax.sql.DataSource" ref="ds1">
<service-properties>
<entry key="osgi.jndi.service.name" value="jdbc/ds1"/>
</service-properties>
</service>
</blueprint>
2. Shutdown Karaf instance
3. Modify datasource1.xml to point to a different database.
4. Start Karaf. Karaf instance will be started with original configuration
rather than the updated one.
> Data source xml change not taking effect in first karaf start post
> modification
> -------------------------------------------------------------------------------
>
> Key: KARAF-3174
> URL: https://issues.apache.org/jira/browse/KARAF-3174
> Project: Karaf
> Issue Type: Bug
> Components: karaf-config
> Affects Versions: 3.0.1
> Environment: RHEL 5.5 x86_64
> Reporter: Vinuraj M
> Priority: Minor
> Labels: datasource, deploy, propertyplaceholder,
>
> Modification of datasource XML placed in KARAF_HOME/deploy folder done while
> the Karaf instance is down is not detected on the first start of Karaf
> instance post modification. Karaf instance is taking the old database
> properties rather than the updated one. This is when the database properties
> are hard coded into the XML file. Behaviour defers when the database
> properties are configured using property place holders which is sourced from
> a properties file placed in KARAF_HOME/etc. While using properties place
> holders, Karaf is able to pick up the updated configuration.
--
This message was sent by Atlassian JIRA
(v6.2#6252)