Best Practive (Regarding Configuration Files)

I know that where you put configuration files is mostly an opinion, and we all could have different opinions.
However I came to a point where I have a preference. I prefer puting all my configuration files inside the conf folder (including the web.xml, struts.xml, etc) and then only using the Ant Script (build.xml) would I move this files where I want. For example the web.xml would be moved to the WEB-INF folder.
The advantege of this would be that I would have all of the configurations for my application localized in one placed, and not scatered everywhere.
The drawback is that my build.xml file will contain some deployment information, and more lines naturally. However the firsy one should not be a problem since at the end of the day the build.xml is there to develop a build (deployable version) of your application.
However this could be one of my most stupid post, just wanted some opinion on this.
thanks and regards,
sim085

I think that solutions go great for people that know
exactly what they are doing. For example, an expert
can easily decide to move something from one place to
another since he knows what advantege would that give
him, and what repercussions.
IMO, a good book should also describe options (and hence opportunities and pitfalls) for a source and/or deployment structure. Most probably just glance over the topic, but visiting vendor sites (say, Struts or Tapestry or Weblogic) will also give you additional ideas and constraints.
But for myself (which still consider myself as
experimenting) this is a little harder, since I still
did not master the basics. At the begining I adopted
a folder structure directly from a book I read. Only
now I am starting to think of what could I change,
and as you can see still have to ask some questions
here :$ :)
We've all been there. In fact, I'm struggling just to keep current with the technology stack I'm familiar with! :^)
IMO standards help juniors understand better, altough
you are right. I would not want something like
VS.net where the editing tool take care where to put
(nearly) everything.
Totally agreed. But as I think you yourself have hinted at, it's a tough balance to strike.
regards,
sim085- Saish

Similar Messages

  • Best place for configuration files

    I am creating an application that gets installed into the the [ProgramFiles] directory. The application writes to a config file every time it closes and the user also has the ability to write a config file at any point in time. After the application is installed no configuration files can be written. I am getting the following error:  "LabVIEW:  File permission error. You do not have the correct permissions for the file."
    1. What do I need to do to be able to write config files to the directory where the application is installed?
    2. If I wanted to save the files in some users folder, how can I keep track of this path from the development environment, to the exe and then across different OS's?
    3. Is there a general convention/location for config files that the application needs to write to?
    I know during the build installer phase we can put data in all these different Microsoft folders. But is there a way to get the paths to these folders in my application? (see image below)
    I am running Windows 7 and LabVIEW 8.5.
    Thanks for your help
    -Anthony M.

    Win32 consists of several DLLs. It is not .Net but the original interface in Windows to access operation system functions. It is available on every Windows PC because it implements Windows. The LV VI "File Dialog" is just a wrapper for the Win32 function FileOpenEx Which every program uses to select a file.
    Storing user settings in the registry is outdatet. Modern Visual Studio programs store setting in files with .config extention.
    Settings may be stored in various places depending of their need.
    Settings which apply only to this special PC are stored where the application is installed. These settings are set during setup and won't change afterwards whithout any changes to the PC.
    Settings which are common to different Windows users are stored in the All users\Appdata folder. The path to this folder is in the registry under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common AppData. Typical data stored there are test setups or serial numbers of external devices.
    Data files which are common to different Windows users are stored in the All users\Data folder. The path to this folder is in the registry under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common Documents. Typical data may be test result protocolls.
    Settings which are unique to different Windows users are stored in the<username> \Appdata folder. The path to this folder is in the registry under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\AppData. Typical data may be personal number, department number.
    Data files which are unique to different Windows users are stored in the <username>\Data folder. The path to this folder is in the registry under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Personal.
    It is normal that the user has full acces to the last for paths and read access to the first path.
    Use the Example Finder to find the registry VI examples.
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Best practices to configure files to display and play in order?

    I'm looking for best practices to get saved recordings (songs and business trainings) on my PC correctly configured so they will show up correctly (artist, song title, track number) and play incorrect order.
    I have lots of MP3 files (and other formats) on my PC but when i transfer them to iTunes and sync to iPod they don't play in correct order or show up as unknown artist (and other issues).
    I typically have them in a folder by artist name then folder with name of course or album then each song begins with a number.
    EXAMPLE: Eagles (folder) - Hotel California (folder) - 1.HotelCalifornia.mp3, 2.NewKidInTown.mp3, etc etc.
    I've also right-clicked and went into properties and add the track number,  artist name, album name, contributing artist etc but it still comes up with these issues
    --it's also very time-consuming to do this.
    EXAMPLE: instead of it being track 1,2,3 etc it will be 1,10,11,2,21,3...
    I've tried dragging them or copying them into the "automatically add" folder and also adding to library in iTunes.
    Any help is much appreciated.

    Hi Narendra,
    Oracle User and the FTP user are 2 different users.
    I'm assuming you'll be reading the file from R12 through File Adapter and writing it to Bank using FTP Adapter.
    Oracle User is able to login into R12, do some operations, submit some concurrent programs/requests based on responsibilities and generate the file to be transferred (like in my case it did by running a Concurrent Request). The file so generated should be placed at a location from where File Adapter can read it within the BPEL process. Now to read the file, the user that is used is a SOA server user (again different from R12 user). This is the same user that you use to login into your SOA server physical box. Hence to be able to read the file, your file should have appropriate privileges (we set that as 777) so that it can be read by the SOA process (using SOA user).
    FTP user, on the other hand, is the user that allows connection to Bank FTP server. This has absolutely no connection with R12. Bank who hosts the FTP server must give you the FTP user details that you'll use inside your FTP JNDI Configuration on Weblogic. When you deploy and run your process (you don't deploy adapter), it picks up the connection details from FTP JNDI properties that you defined in weblogic.
    Hence both the jusers can be different and I don't think any best practices are required or do exist for this.
    Regards,
    Neeraj Sehgal

  • Best practice with respect to wcf configuration files for SSIS

    So after reading a lot of posts and blogs on how to configure SSIS to read from configuration files , I am still not clear and would like any expert to provide a definitive stance. In my case the WCF service consumption is wrapped into a separate assembly.
    I am referencing the assembly in an embedded C# script within my SSIS package.
    When I make the helper class call to the webservice , I get the endpoint not found WCF exception.
    Keep in mind I am running this from VS 2012 IDE and did the following to make sure the WCF call works:
    1. Googled and found that you need to have config entries in DtsDebugHost.exe.config file. But it still did not work
    2. Had the same entries in the associated app.config file for C# script but it still did not work.
    It seems like SSIS is very fragile w.r.t consuming WCF entires in a config file. Is the best practice to just have the end point created in code and externalize the end point as a SSIS variable / xml file or is there really a way to get these config files working.
    Attached is the wcf snippet of my config file.
    <system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name="ITransactionProcessor">
    <security mode="TransportWithMessageCredential" />
    </binding>
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint address="https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor" binding="basicHttpBinding" bindingConfiguration="ITransactionProcessor" contract="CyberSource.ITransactionProcessor" name="portXML" />
    </client>
    </system.serviceModel>
    SM

    I have the code working without use of config files. I am just disappointed that it is not working using the configuration files. That was one of the primary intents of my code re-factoring. 
     Katherine
    Xiong , If you are proposing this as an answer then does this imply that Microsoft's stance is not to use configuration files with SSIS?? Please answer.
    SM

  • How to create bulk configuration files from a template for staging?

    Hello,
    We have created a sample configuration for ISRG2 2901 Router.  The sample configuration is long, and with copy/paste it is possible to skip some lines, and it is difficult to ensure the configuration of every device is standardized due to this error possibility. What we are trying to achieve is first create a template from this sample configuration file, and then create configuration files for each device seperately and automatically. After creating this configuration instances, we want to be able to distribute the configuration files (and possibly the ios) to the devices during the staging phase. Since there are about 1000 2901 routers, creating configuration files is important?
    From searching we have found the following tools:
    1) CCE (Cisco Configuration Engine): This tool seems to be very efficient for distributing the created configuration files. We may use the serial number of the device, and it provides almost zero touch provisioning of the configuration files to the devices. Creating the configuration file from the template seems to be manual, i.e enter the ip addresses of the interfaces, the routing tables one by one for each device. How can we use velocity template for device configs?
    2) Ciscoworks LMS Prime: It is possible to create a baseline template for the devices, and after getting the backup configuration of the routers, it is possible to compare the actual configuration of the device with the baseline template, and understand if there is any difference with each other. This is indeed very useful in order to keep the configuration standardized, we again could not find a way to create bulk configuration files from the baseline template.
    3)  Solarwinds Config Generator: This tool is useful for creating a configuration file from a template, but again not for automatically creating configuration files, and needs manual intervention.
    4) Excel Macro: It seems that some people have achived to automatically create configuration files with using an excel macro, but we could not find a procedure or tip of how to achieving this.
    5) Pearl or TCL/TK Script: Again since we are not software developers but from networking field, it is difficult to achieve a working form of this scripts or codes due to to lack of documentation and development experience.
    So our problem comes down to creating a template from a sample configuration, and creating bulk configuration files from the template. Is there a specific tool or procedure to achive this purpose?
    Thanks in Advance,
    Best Regards,

    Hi,
    Try this one http://www.gen-it.net
    Regards,
    Stuart

  • Best Practice for configuring ZS3 storage

    Hi Team
    Can someone help me with the best way to configure data profile for a ZS3-2 storage which is mainly going to be used for oracle database and EBU application.
    If we are planning to install ldoms os on storage lun then what data profile should be the best one.
    Regards
    AB

    Without knowing more I would do the following, being very conservative;
    Create too pools, with pool0 on controller0 and pool1 on controller1. This is to take advantage of both controllers DRAM, for better performance. Regardless of RAIDZ or RAID 1+0, I would do this.
    I am assuming both trays are the same HHDs ( 900G?)
    Make the first pool RAID 1+0, with 2 write SSDs and one READ SSD. I would use this pool for redo logs, and database files. Mounting via OISP or dNFS.
    Make the second pool RAIDZ, with 2 write SSDs and one READ SSD, I would place my RMAN mount here, and any binary mounts and archive logs. Maybe DB files, if using partitioning. HCC is a great technology to use if you application will benefit from it.
    Now for the relaity check!
    9 times out of 10 method...
    Realistic... just use RAIDZ on both pools. In reality RAID 1+0 generates more IOPS in the array and leads to more DB I/O wait time! It's true!
    If you are headed to ECO I'll sit down and explain. short version, RAIDZ does less writes, which means better database performance.
    Erik

  • INCLUDE CONFIGURATION FILE

    in case of SAPGUI for java when we go to SAPGUI Preferences what is to be given in "Include Configuration File."
    plese reply me ASAP at [email protected]

    Hi Kamlesh,
    please check the section 6.1 "Setting Configuration Files" in the SAP GUI for Java help.
    Best regards,
    Christian

  • Configuration files and variables

    All,
    Sorry if this is a repost - I thought I posted it earlier today but I can't find it by searching for my username :(
    I've got an application that I would like to enable so that it works with a configuration file. In perl I would use one of the CPAN Config modules and I then just create a file in the form of
    NAME=VALUE
    I want to be able to set various things based on values in the configuration file, but I have no idea what is considered best practice in Java for doing this. The application is a slideshow app, so I want to set things like window size and slide delay.
    At a point in the future, I will probably want to make the application able to modify / create this configuration file using the application interface.
    In light of these questions, what is the best way of achieving this ?
    Thanks in advance,

    java.util.Properties can be used to store the name,value pairs specified in the file. New name,value pairs need can also be added to the file back.
    The following code may help you out..
    I have a file named props.txt having the values
    Name1=Value1
    Name2=Value2
    The following code will read the values, modify the value for a kay and add a new key,value and updates teh file with these changes.
    public class ReadProperties {
        public static void main(String[] args)
            try
                String strFileName = "props.txt";
                Properties prop = new Properties();        
                InputStream inp = null;        
                ClassLoader classLoader = null;
             classLoader = ReadProperties.class.getClassLoader();
                if (null != classLoader)
                     inp = classLoader.getResourceAsStream(strFileName);
               else
                    inp = ClassLoader.getSystemResourceAsStream(strFileName);     
                prop.load(inp);
                //This block is used to list all the properties in the file
                Set s =  prop.entrySet();
                for(Iterator it = s.iterator();it.hasNext();)
                    Map.Entry map = (Map.Entry)it.next();                              
                    System.out.println("map.getKey().toString() : values :  " + map.getKey().toString() + " : "+ prop.getProperty(map.getKey().toString()));               
                // To get only a particular key's value, use
                System.out.println("value for Name1 : " +prop.getProperty("Name1"));         
                //This is to set the proeprties dynamically into the object.
                prop.setProperty("Name3","Value3");
                prop.setProperty("Name1","Value1");
                //If the dynamically aded proeprties neded to be stored in the file.. use the following
                prop.store(new FileOutputStream("props.txt"),null);          
            catch (FileNotFoundException e)
                e.printStackTrace();
            catch (IOException e)
                e.printStackTrace();
    }Regards,
    Raviprakash.D

  • Writing configuration file

    Hi,
    I am getting "File permission error", when trying to save configuration file into he Compact Flash (devise d:/CONFIG/Init.dat) on compact Field Point cFP-2020.

    Hi Armen!
    Do you use Labview for this procedure? Do you actually have permission to write to the device? Can you please tell something more about this issue?
    Best Regards,
    Hendrik

  • How to enforce a different configuration file while invoking SAPShcut.exe

    I'm using sapshcut.exe to logon to SAP. Following is syntax of  command that Iu2019m using for that prupose:
    sapshcut.exe /sysname=IDES /client=800 /user=xxxx /pwd=yyyy
    By default, the configuration file (saplogon.ini) that is being used during this process by sapshcut.exe is located in user directory (SAP GUI 7.2). However, Iu2019d like to use a different configuration file that is located at other location (e.g., h:/test/saplogon.ini). SAP has mentioned to use additional parameter "INI_FILE" for that purposes so Iu2019m using following command:
    sapshcut.exe /sysname=IDES /client=800 /user=xxxx /pwd=yyyy /INI_FILE=h:/test/saplogon.ini
    No matter what value I defined for the u2018INI_FILEu2019 parameter, SAP ignores it and always uses default configuration file located in the user directory and if given SAP system does not exist in that configuration file then I report an error. Interestingly, I found that if use 'saplogon.exe' instead of 'sapshcut.exe' and provide same parameter value for 'INI_FILE' parameter then SAP overwrite the default configuration file and uses saplogon.ini defined there. But i cannot use saplogon.exe as I must have to use sapchcut.exe to directly log into SAP system for automation testing.
    I've also found out that the only way sapshcut.exe can overwrite the default ini file is through the use of environment variable "SAPLOGON_INI_FILE". But rather than using environment variable I'd like to define configuration file during the command line.
    Any help would be really appreciated.

    We stumbled upon the same problem. Thank you for mentioning that using the environment variable works.
    This leads to the following single command line as a workaround.
    First set the needed saplogon.ini and then execute in a nested command shell the call to sapshcut.exe
    cmd /c set SAPLOGON_INI_FILE=C:\config\saplogon.ini & cmd /c "%ProgramFiles%\SAP\FrontEnd\SAPgui\sapshcut.exe"  -user= -pw= -language=E -system=XXX -client=100
    This works, but only if there is not already an instance of saplogon.exe running with a different saplogon.ini.
    Best regards,
    Axel.

  • Can I configure file sender to take only 1 file per time?

    Hello,
    Can I configure file sender to take only 1 file per time?
    I have scenario from file to ECC.
    The poll interval is 300 seconds.
    I want that the sender channel will take only 1 file per time.
    Thank you
    Elad

    Hi,
    Definely there will be some specific reason for doing this. If your purpose of doing this is to read the files one after another then there are other alternatives for that like using QoS as EOIO and then putting a delay of 30 sec in your message mapping so that each message will be process after 30 sec.
    If you describe more than probably someone can give his/her best opinion.
    Regards,
    Sarvesh

  • Imac is no longer able to open the Configuration file

    Hi ,
    I have an imac ( ilamp) 20' connected to ADSL, via Netopia Router which is connected to the Airport extreme connected to imac, for the PB Aluminum Tiger 10.4.5. we both can connect. PB can print via imac/printer.
    The imac is no longer able to open the Configuration file, when i enter the pswd which is correct, i get the message "The Airport Admin. Utility was unable to read the configuration of the selected base station an error occurred while reading the configuration "
    My Beau updated Airport to V5.7, this is the first time since the update I've tried to access the conf. file for the imac which i have done numerous times prior.
    I have a new base station Ip address 254.128.0 in Airport Utility Admin, on the imac which does not reflect my network settings anywhere, and is not what it use to be, i think, it was one value different than the PB.Base station IP. I do not know how it changed neither one of us changed it.
    I tried using the Airport Setup assistant (imac), I received this message:
    "Appropriate Airport hardware was bot found on this computer,if you recently
    Installed, an Airport card,please shut down your computer$ make sure the card is properly istalled."
    The imac does not have a card, nor do i think it needs one.
    I would like to be able to at least open the configuration file.
    Thank you for reading my post.
    Eme
    Power PC G4 (3.3) iMac♥ Flat Panel 10.3.9 & 15 Alum.PowerBook Tiger   Mac OS X (10.4.4)  

    Hi Kes, a star for the company !
    I made an error on my first post I have a Netopia modem, Airport router.
    And so it remains, i guess that there must be an easy answer somewhere
    that I am missing that I/we should read, some direction to that would be helpful, and I would be very appreciative.
    As I said the password had been set, and it is not an issue of that being forgotten, i wondered if it was changed back to "public" tried, not it.
    particular because everytime the imac wakes one of the folders on ( no one else in office just me and boyfriend and it is his work folder he has a copy on the PB.( the folder on desk top has been clicked on, the one with sensitve info, i have backed the folder up and secure trashed it, just in case some security issue hacking has taken place, thats closing the barn door after the fact.
    Good luck,w/ this Q.
    regards Eme
    Power PC G4 (3.3) iMac ♥ Flat Panel 10.3.9 & 15 Alum.PowerBook Tiger   Mac OS X (10.4.5)  

  • JUNIT test failure-Configuration file bc4j.xcfg not found in the classpath

    Hi All,
    As part of an ESS project,Im having a model project containing a VO(parameters VO).This VO is configured to have Read-only access through SQL query and have only one transient attribute each.For the model projects containing the VO for pre merge checker compliance I had to create JUNIT Test projects containing new AMs for testing the parametersVO. While running the JUNIT tests I got an exception like
    “oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.ConfigException, msg=JBO-33001: Configuration file /oracle/apps/hcm/goals/core/dataMigration/publicEssModel/test/applicationModule/common/bc4j.xcfg is not found in the classpath.”.—even though this file is contained in both the src/classes folder of the project.
    When i try to run the TestAM I'm getting an exception like 'configuration tester.xcfg not found in the calsspath.
    While debugging this error, we found that we are able to successfully run the JUNIT tests if we make some changes in the adf-config.xml file of the Application. The change required is to comment out the mdsC:adf-mds-config tag in the xml file.
    After doing this change Im also able to run my AM without any exception.
    Is this a known issue?.
    Since modifying the adf-config.xml is not a recommended practice is there any workaround that we can get rid of this exception.
    Regards,
    Ajin.

    Just checked but could only find this thread Unable to run ADFBC JUNIT Test Classes with JDEV11G 11.1.1.6
    As it's also dealing with junit and 11.1.1.6.0 you might want to read it.
    Timo

  • Can I replace an older Airport Extreme with a newer one by importing configuration file

    Can I import the configuration file from an older Airport base station into a newer replacement Airport base station?  It would seem this would save me a lot of extra work.  First, it would hopefully save time by automatically configuring the new base station without me having to fiddle with the settings.  Second, it might hopefully save some more time if I would not have to re-enter the network parameters for all the devices currrently connected to my Airport (wi-fi) network.
    Read on for more details.
    My old Apple Airport Extreme Base Station (AEBS) is not a gigabit one.  Moreover, it's been experiencing some hardware failures recently.  So, I recently purchased a new Apple Airport Extreme (base station) that is a gigabit one (Model# ME918LL/A with 802.11ac Wi-FI).  Now, I'd like to replace the older base station with this newer one with the MINIMAL amount of disruption and manual work possible.
    Regards,
    Tony

    I relaced an older AEBS with the new one, recently, and did not need to import anything, but if you can save the configuration file from your old one, then you can import it to the new one. I've never tried that when I switched, and it didn't seem to matter which suggests the configuration file may be on disk somewhere.

  • Error while updating the configuration files (MOB20003)

    hi,
    After installing the BI 4.0 server, i am trying to configure mobile using mobile server configuration tool. When i enter all the information for non Blackberry option as i would like to access through ipad, its giving me the error message" Error while updating the configuration files (MOB20003)" Please advise.

    Hi Somesh,
    If i am not wrong, only a war file deployment is needed to make ipad work.
    This happens with URL hitting directly on the Server.
    If you want to configure VAS and VMS servers, let us know what configuration settings have been done.
    Regards,
    Atul

Maybe you are looking for