# \[ANSWER\] Change process .properties without rebuilding process

**URL:** <https://community.ofelia.com/t/answer-change-process-properties-without-rebuilding-process/6045>\
**Category:** Q&A\
**Created:** [15 June 2015 08:35 UTC](https://community.ofelia.com/t/answer-change-process-properties-without-rebuilding-process/6045 "2015-06-15T08:35:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrei.kravets](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@andrei.kravets](https://community.ofelia.com/u/andrei.kravets)\
**Post date:** [15 June 2015 08:35 UTC](https://community.ofelia.com/t/answer-change-process-properties-without-rebuilding-process/6045/1 "2015-06-15T08:35:35Z")

</div>

Hello,

I have 2 environments (i.e. DEV and QA) and have created process, which works with DataBase. I would like to have DB connection parameters in properties file. After reading through forum I have found, that it is possible to store some parameters in properties file.

I’ve created 2 files with 3 lines in it (one for each environment)  
jdbc.url=…  
jdbc.user=…  
jdbc.password=…  
zipped this file and renamed zip to jar. Then I added my jar to Bonita  
 ![Manage jars](http://i.imgur.com/h7ui0il.jpg)

Then I’ve added this jar to my process  
![Process config][Process config]  
[Process config]: [http://i.imgur.com/RgVcTpt.jpg](http://i.imgur.com/RgVcTpt.jpg)

After publishing my process I can see my jar on server under %BONITA\_HOME%\workspace\tomcat\bonita\server\tenants\1\work\processes\6370516458436187330\classpath\ where “6370516458436187330” is unique ID for process as I understand.

I have published my process to both DEV and QA with .properties file set for DEV DataBase.

Now I want to change connection on QA environment to QA DataBase. I have changed .properties, recreated my jar and copied it to %BONITA\_HOME%\workspace\tomcat\bonita\server\tenants\1\work\processes\<processID\>\classpath\ (without rebuilding process in Bonita) and restarted tomcat. Nothing changed. I still can see my dev setting then I running process on QA, but .jar file is new with QA setting.

Is there some way to change properties for process “online”? Without rebuilding process. Because for one process it is not a problem to rebuild, but if I have it over9000… Probably Bonita cashing this properties somewhere, but I have no idea where to search…

Thanks in advance,  
AK

P.S.  
Bonita version - 6.5.1  
Java - 7  
Tomcat - 1.8

---

<div class="post-metadata">

**Author:** ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)\
**Post date:** [15 June 2015 18:58 UTC](https://community.ofelia.com/t/answer-change-process-properties-without-rebuilding-process/6045/2 "2015-06-15T18:58:02Z")

</div>

Rather than doing it in a jar, do it in a properties file…

Have a look [here](http://community.ofelia.com/answers/ldap-auth-bonita-bpm-community#node-24997) at my post related to LDAP (have a look for “All I can say is WOW, what a wonderful piece of community spirit.” to find the post).

Here I use a properties file (either encrypted or not) and just read the data…

regards  
Seán

---

<div class="post-metadata">

**Author:** ![andrei.kravets](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@andrei.kravets](https://community.ofelia.com/u/andrei.kravets)\
**Post date:** [16 June 2015 09:38 UTC](https://community.ofelia.com/t/answer-change-process-properties-without-rebuilding-process/6045/3 "2015-06-16T09:38:17Z")

</div>

Hi Sean, thanks for your reply.

On basis of your post I have created small part of code, which works smoothly for me  
  
File catalinaBase = new File(System.getProperty(“catalina.base”)).getAbsoluteFile();  
File propertyFile = new File(catalinaBase, “webapps/bonita/properties/bonita-coinfide.properties”);

InputStream inputStream = new FileInputStream(propertyFile);

Properties properties = new Properties();  
properties.load(inputStream);

return properties;

I guess this can be closed now

---

<div class="post-metadata">

**Author:** ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)\
**Post date:** [16 June 2015 13:34 UTC](https://community.ofelia.com/t/answer-change-process-properties-without-rebuilding-process/6045/4 "2015-06-16T13:34:16Z")

</div>

Closed as above,

I’ve found that in certain circumstances, still under investigation, that _catalina base_ is not populated…

That’s why mines a little more complex. The other nice thing is that I can also wither encrypted or non-encrypted text. So for example the line for password… 🙂

regards
