# Question Regarding Config file

**URL:** <https://techcommunity.softwareag.com/t/question-regarding-config-file/108673>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [March 30, 2005, 7:34pm UTC](https://techcommunity.softwareag.com/t/question-regarding-config-file/108673 "2005-03-30T19:34:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 30, 2005, 7:34pm UTC](https://techcommunity.softwareag.com/t/question-regarding-config-file/108673/1 "2005-03-30T19:34:14Z")

</div>

Experts,  
Can some one please tell me about config files.How to create them and where to place them and how to call them.I am planning to create a config file error handling.If any one has samples please share them.Thanks

Regards,  
Saritha.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [March 30, 2005, 7:44pm UTC](https://techcommunity.softwareag.com/t/question-regarding-config-file/108673/2 "2005-03-30T19:44:15Z")

</div>

Saritha,

Please check this thread link,it helps  
[url=“[wmusers.com](http://www.wmusers.com/wmusers/messages/117/42756.shtml)”][wmusers.com](http://www.wmusers.com/wmusers/messages/117/42756.shtml%5B/url%5D)

HTH,  
RMG.

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 30, 2005, 8:16pm UTC](https://techcommunity.softwareag.com/t/question-regarding-config-file/108673/3 "2005-03-30T20:16:26Z")

</div>

Thanks RMG

---

<div class="post-metadata">

**Author:** ![taurean](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@taurean](https://techcommunity.softwareag.com/u/taurean)\
**Post date:** [March 30, 2005, 8:53pm UTC](https://techcommunity.softwareag.com/t/question-regarding-config-file/108673/4 "2005-03-30T20:53:09Z")

</div>

Saritha,

I read the thread pointed to, by RMG, his suggestion is useful… for the sake of alternatives, you can also use an XML to store your config. I usually prefer this! In order to read this config file, you may create a flow service (eg readConfig) comprising of pub.flow:getFile-\> pub.xml:xmlStringToXMLNode-\> pub.xml:xmlNodeToDocument, to read the contents of the config file into an IS Document (you will need to create an IS Doc corresponding to the config xml).

If the config parameters are read often, it will be a good idea to define readConfig as a startup service and add a step in that service to store the config IS Doc into a Data Store or create a static IData Object. Then create a wrapper java service around this that checks whether the config IS Doc is present in the memory (as a static object or in the Data Store), if yes, return the requested parameter from that memory object or else do a physical read and store the config as a memory object before returning the value of requested parameter.

HTH, Roh

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 31, 2005, 1:51am UTC](https://techcommunity.softwareag.com/t/question-regarding-config-file/108673/5 "2005-03-31T01:51:25Z")

</div>

Thanks Rohit, can you please share a sample errorhandling xml file

---

<div class="post-metadata">

**Author:** ![sonam](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sonam](https://techcommunity.softwareag.com/u/sonam)\
**Post date:** [March 31, 2005, 12:53pm UTC](https://techcommunity.softwareag.com/t/question-regarding-config-file/108673/6 "2005-03-31T12:53:23Z")

</div>

Sarita:

Do read Ray Moser’s excellent article: “Store Integration Properties in Configuration Files”:  
[url=“[wmusers.com](http://www.wmusers.com/ezine/2002nov_rmoser_1.shtml)”][wmusers.com](http://www.wmusers.com/ezine/2002nov_rmoser_1.shtml%5B/url%5D)

It has supporting code as well.

The repository is useful gives a unified view of it’s data to all machines in a cluster. Even if you don’t have a cluster now, this future-proofs your application.

A file-based repo (you can also have a DB-based repo) may have performance issues if data is accessed frequently. However, I store frequently accessed configuration data in a file-based repo with no problems by simply turning on caching in services that read the data.

---

<div class="post-metadata">

**Author:** ![taurean](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@taurean](https://techcommunity.softwareag.com/u/taurean)\
**Post date:** [March 31, 2005, 10:05pm UTC](https://techcommunity.softwareag.com/t/question-regarding-config-file/108673/7 "2005-03-31T22:05:09Z")

</div>

Saritha,

What are your requirements related to errorHandling? The structure and the content of the file will be defined by your requirements. Besides, the contents of the (xml) config file don’t really matter as much as the process to read/load it and to fetch a value corresponding to a requested key.

Roh

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [April 1, 2005, 7:49pm UTC](https://techcommunity.softwareag.com/t/question-regarding-config-file/108673/8 "2005-04-01T19:49:46Z")

</div>

Thanks every body,  
I just need to see a sample error -report so that i create a template .Thanks alot.

Regards,  
saritha

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:05pm UTC](https://techcommunity.softwareag.com/t/question-regarding-config-file/108673/9 "2021-04-02T15:05:19Z")

</div>


