cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Explorer - External database

mvincent
Champ in-the-making
Champ in-the-making
Hi,

  I'd like to connect an activiti explorer instance to an external Activiti database (used by an Activiti engine embedded into another application).

Is there any manner to override the db.properties of Activiti Explorer without modifying the file directly into the war archive ?

Thanks in advance
Mat
3 REPLIES 3

marksinke
Champ in-the-making
Champ in-the-making
Hi Matt,

I haven't found the way yet; currently I deploy the WAR file in tomcat, wait for it to be expanded and then overwrite the db.properties (and activiti-context.xml) files and restart. However, that is not a very nice and stable way to do it.

I'd be happy to hear any other thoughts…

Mark.

martin_grofcik
Confirmed Champ
Confirmed Champ
Sorry, I did not try any of proposed ideas.

1. Another way could be to create pull request with the following change:
file: /WEB-INF/activiti-standalone-context.xml
<code>
  <bean id="dbProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="location" value="classpath:db.properties" />
    <!–
/**
  * Check system properties first, before trying the specified properties.
  * This allows system properties to override any other property source.
  */
    –>
    <property name="systemPropertiesMode" value="2" />

    <!– Allow other PropertyPlaceholderConfigurer to run as well –>
    <property name="ignoreUnresolvablePlaceholders" value="true" />
  </bean>
</code>
2. hack: place your modified db.properties file in  the classpath in front of the default db.properties from activiti explorer.

martin_grofcik
Confirmed Champ
Confirmed Champ
another way is described here:
https://github.com/Activiti/Activiti/pull/148