cancel
Showing results for 
Search instead for 
Did you mean: 

activiti.cfg.xml (.jar) and integration

ageen
Champ in-the-making
Champ in-the-making
I'm using a customized activiti.cfg.xml as below, but seems the ActivitiTestCase cannot load it because it cannot get the real value of ${jdbc.driverClassName}. Is there anyway I can work around this? At least, the uesrname and password part, I could like to externalize it.

Also, in order to use Activiti REST service, do I have to use activiti.cfg.jar? Can I just use a regular Spring applicatonContext.xml under classpath?

Thanks!

    <contextSmiley Tongueroperty-placeholder location="classpath*:META-INF/jdbc.properties" />
   
   <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
      destroy-method="close">
      <property name="driverClassName" value="${jdbc.driverClassName}" />
      <property name="url" value="${jdbc.url}" />
      <property name="username" value="${jdbc.username}" />
      <property name="password" value="${jdbc.password}" />
      <property name="defaultAutoCommit" value="true" />
   </bean>
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
In order to *use* the REST API, you dont need any config file, just an HTTP client. Of course to tweak, the functioning of the REST api, you need a config file.

Externalizing the properties shoiudl just work, as we are simply leveraging Spring there. Are you sure the properties file are accessible?

ageen
Champ in-the-making
Champ in-the-making
Just found out that Activiti is using BeanFactory instead of ApplicationContext to instanciate beans in Spring. See the source code BeansConfigurationHelper.java. But BeanFactory misses some necessary features for working with
the place-holder feature.

Can we switch to use ApplicationContext instead? Or any suggest work around?

Thanks.

jbarrez
Star Contributor
Star Contributor
I remember there was a specific reason why we have chosen BeanFactory, but I can't seem to remember…

Could uou also create a jira issue, so I this can be looked at if it is important for you?