karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinuraj M (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-3174) Data source xml change not taking effect in first karaf start post modification
Date Fri, 22 Aug 2014 06:37:10 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14106545#comment-14106545

Vinuraj M commented on KARAF-3174:

Above mentioned scenario works fine when using a data source configuration as following, which
is using properties file placed in KARAF_HOME/etc directory.

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"

		<ext:property name="url" value="" />
		<ext:property name="user" value="" />
		<ext:property name="password" value="" />

   <bean id="ds1" class="org.postgresql.ds.PGSimpleDataSource" >
      <property name="serverName" value="${url}"/>
      <property name="user" value="${user}"/>
      <property name="password" value="${password}"/>

  <service interface="javax.sql.DataSource" ref="ds1">
            <entry key="osgi.jndi.service.name" value="jdbc/ds1"/>

Properties file in KARAF_HOME/etc as follows

##Database properties

> 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

This message was sent by Atlassian JIRA

View raw message