How to pass parameters to configuration files

Hello,
I have an application which uses several libraries and frameworks like log4j and hibernate.
Each library/framework is configured via its own configuration file, some configuration files are in xml format and others are in properties format.
Each configuration file has lots of specialized parameters that should not be exposed to the user but there are also one or two parameters that must be configured by the end user.
For example:
The log4j configuration file has lots of specialized parameters that the user should not see, but there is one parameter that the user must configure: the path for the application log file.
Another example:
The hibernate configuration file has lots of specialized parameters that the user should not see, but there is one parameter that the user musr configure: the path to the application database.
It would be great if we can have an user-configuration-file that contains only the parameters that should be configured by the user and leave the complicated and specialized parameters in their corresponding files.
I want to pass the properties defined in the user-configuration-file to the specialized configuration files.
Any ideas to achieve this?
Thanx

Thank you very much to all for the replies.
Ok, I can read the specialized-configuration-file into a Properties object, then read the user-configuration-file and merge the appropriate properties to get a complete Properties object.
If the library/framework can't be configured with the Properties object, then I will need to write down the properties into a new file and tell the library/framework to load that file.
I have used Properties objects and files before, but I don't have experience with xml configuration files.
Is the same applicable to xml files?
How can I load a XML files to an object and then update/add a particular property?.
If that's possible, then: how can I write down the XML object to a new file?
thanx
Edited by: JoseLuis on Oct 23, 2008 11:28 AM

Similar Messages

  • How to pass parameters to automation plugin to Javascript

    Hello,
    We can call automation plugin from java script below code.
    var xx = stringIDToTypeID( "459ac2e6-82d1-11d5-9879-00b0d0201111" );     // Has will be the unique ID for this plugin
    executeAction( xx, undefined, DialogModes.NO );
    I am trying to passing parameters for the same plugin.
    I tried to find a way myself following plug-in resource guide but there information is not so clear.
    Can you tell me,
    How to define parameters in terminology file. (my guess it should be define in terminology file)
    How to JS call with parameters
    And how to extract those parameters inside plugin.
    Sample Pipl.r file  (This is from C++ plugin in SDK)
    // Dictionary (scripting) resource
    resource 'aete' (16000, "Getter dictionary", purgeable)
           1, 0, english, roman, /* aete version and language specifiers */
                "Testing", /* vendor suite name */
                "Adobe example plug-ins", /* optional description */
                'get ', /* suite ID */
                1, /* suite code, must be 1 */
                1, /* suite level, must be 1 */
           { /* structure for automation */
           plugInName, /* name */
           "No comment", /* optional description */
           'get ', /* class ID, must be unique or Suite ID */
           'getr', /* event ID, must be unique */
           NO_REPLY, /* never a reply */
                IMAGE_DIRECT_PARAMETER, /* direct parameter, used by Photoshop */   <-- According to the documentation, I guess here should be come parameters.  (para name, keyID, typeID )
                { // filter or selection class here:
      {}, /* non-filter/automation plug-in class here */
      {}, /* comparison ops (not supported) */
      { // Enumerations go here:
      } /* end of any enumerations */
    // end GetterPiPL.r
    Thank you.

    Hello Mack,
    Thanks for your detail explanation.
    Actually, I haven't much play with PS javascripting plugins niter Fit image.
    The key points I have figure out that, the way you attached parameters to descriptor and point of finding some light from listener.
    That made me a conceptual idea, although I did not get all the mention facts.
    My previous guess was correct.
    Parameter should be something like below according to PiPL grammar. (in Sample Pipl.r file)
    'mymod', /* event ID, must be unique */
           NO_REPLY, /* never a reply */
                IMAGE_DIRECT_PARAMETER, /* direct parameter, used by Photoshop */ 
                "action",    /* name for parameter*/
                 keyMyPara,    /*Key parameter you have define in terminology file*/
                 typeChar,       /*parameter type*/
                 "",     /*optional description*/
                 flagsSingleParameter     /*flags */
    The UUID is enough for calling plugin, only challenge was to define parameter wtr grammar at PiPL and read it at C++ end.
    Another important fact is that we have the message pointer which points to above plug-in parameters.
    Automation plugin would give that access.

  • Form Personalization - Custom Function - How to pass parameters?

    Hi,
    My requirement is to call a custom mod pl/sql program (html page) from purchasing when the "approve" button is pressed. I have it working, but don't know how to pass parameters to my function.
    I have my function defined and registered. In the definition under "Web HTML" tab, I have my pl/sql procedure call under "HTML Call". Where do the parameters go?
    On the customization of form POXPOEPO, I am using Builtin - Launch a function. I want to pass the po_header_id, so under "Parameters", I did "Insert Item Value" of :PO_HEADERS.PO_HEADER_ID
    My custom HMTL page is popping up, but the parameter is not being passed. Is there something in the Function Definition where I can define the incoming paramaters?
    Thanks.
    Paul

    Hi paul;
    There are many usefull link avaliable if you googling
    http://www.google.com.tr/#hl=tr&biw=1259&bih=793&&sa=X&ei=4wxQTZmYEISRswaNktWSDQ&ved=0CC4QBSgA&q=How+to+pass+parameters%2Bform+personalization&spell=1&fp=64d53dfd7a69225a
    Regard
    Helios

  • Form personalization - new custom function - how to pass parameters?

    Hi,
    My requirement is to call a custom mod pl/sql program (html page) from purchasing when the "approve" button is pressed. I have it working, but don't know how to pass parameters to my function.
    I have my function defined and registered. In the definition under "Web HTML" tab, I have my pl/sql procedure call under "HTML Call". Where do the parameters go?
    On the customization of form POXPOEPO, I am using Builtin - Launch a function. I want to pass the po_header_id, so under "Parameters", I did "Insert Item Value" of :PO_HEADERS.PO_HEADER_ID
    My custom HMTL page is popping up, but the parameter is not being passed. Is there something in the Function Definition where I can define the incoming paramaters?
    Thanks.
    Paul

    Post your question in below forum:
    General EBS Discussion
    -Anand

  • How to pass parameters between two xterm windows?

    Hi,
    I would like to know how to pass parameters between two xterm windows where there are two independence processes running on them respectively ? Would appreciate if any one out there can advise me . Thanks.

    Global variables can be used, but you can do what the online help
    says ...
    Parameters are passed to called forms by means of a parameter
    list. A parameter list is a named programmatic construct that is
    simply a list of parameter names (called keys) and their values.
    You can pass parameter values to forms invoked by the built-in
    subprograms CALL_FORM, OPEN_FORM, and NEW_FORM. In addition, you
    can pass parameter values to other Oracle tools with the
    RUN_PRODUCT procedure.
    A parameter you include in a parameter list can be either a text
    parameter or a data parameter. The parameter type determines how
    its value is interpreted.
    Text Parameters The value of a text parameter being passed to a
    called product is a CHAR string that can represent the following:
    n a user-defined form parameter defined in a form invoked
    by the CALL_FORM, OPEN_FORM, or NEW_FORM built-in subprograms
    n a command line or user-defined parameter for a product
    invoked with the RUN_PRODUCT built-in subprogram
    Data Parameters The value of a data parameter being passed to a
    called product is always the name of a record group defined in
    the current form. (A record group is a data structure that
    stores records derived from a query or through programmatic
    assignment.) Data parameters are used to pass data to products
    invoked with the RUN_PRODUCT built-in subprogram. You cannot
    pass data parameters to forms.
    The following table shows the structure of a parameter list that
    contains four parameters:
    Key Paramtype Value
    CITY Text_Parameter 'BOGOTA'
    CATEGORY Text_Parameter 'EXPORTS'
    MULTIPLIER Text_Parameter '.0275'
    NEW_DATA Data_Parameter 'RECORD_GROUP8'
    arun reddy (guest) wrote:
    : im trying to do this but i could not find any way for this.
    : can any one help me how can i pass parameters between two forms
    : in forms4.5. any help will be appreciated
    : thanks.
    null

  • How to run and pass parameters to exe file from the .txt file

    hi,
     i am facing problem with passing parameters to the .exe file which is run by labview.firstly i have  .txt script with parameters which i have to pass to .exe file. This .exe file is also a software and that script is written for it.And now i have to create  programm in labview which should fullfill following points.
      1. I have to use one knob named 'Run script'.If i pressed the knob ,it should open the Browser where i can choose .txt script file.
      2. .exe application should open(Path already chossen).
      3. after passing the parameters .exe application should closed.
      4.And labview now should update his parameter
    I can just open .exe file using Exce.vi but i dont getting any idea to do more than this.can somebody please help me?
    Solved!
    Go to Solution.

    This depends on the exe file. Does it retrieve the information as standard input or does it require the information as command line arguments?
    Depending on this, you can read the txt-file in LV (using the file functions) and pass the content to the System Exec.vi.
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to pass parameters to sql agent job run configured ssis package

    Hi all,
    I have a big problem at my small project.
    I build my SSIS package that get its variables values from a configuration file..
    and when i build a SQL agent job to run this package in a schedule i set the values of variables in it .. but in run-time the package still get its parameters from the configuration file !??
    any help please ?

    >SQL agent job to run this package in a schedule i set the values of variables in it
    One way, setup a configuration table for the package. Let the package read the values for the variables from there.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How to pass parameters to individual regions in multitaskflow

    I have a page, where the regions are added dynamically (using multiTaskFlow ). All the regions are of the same type( defined by same taskflow definition) and hence each region takes a different values for the same parameter type.
    How do we pass different parameter values, when creating TaskFlowBindingAttributes?
    Since TaskFlowBindingAttributes takes parametersMap as an EL string, I couldn't figure out , how to define the EL so that each region gets its parameter?
    Following are the code snippets:
    Java code for that is creating a List<TaskFlowBindingAttributes>
             for(MyRegion region: regionList)
                 TaskFlowBindingAttributes tfBindAttr = new TaskFlowBindingAttributes();
                 tfBindAttr.setId(region.getId());
                 tfBindAttr.setTaskFlowId(new TaskFlowId("/WEB-INF/core/custom_app_task-flow.xml", "custom_app_task-flow"));
                 tfBindAttr.setRefreshCondition("ifNeeded");
                 tfBindAttr.setParametersMap(""); //??? How to pass params here since this takes EL String.
                 list.add(tfBindAttr);
    Multitaskflow entry in pageDef file:
    <multiTaskFlow id="multiRegion1"
                        taskFlowList="#{viewScope.core_extensibility_cusapp_model.uiAppTemplate.taskFlowBindings}"
    xmlns="http://xmlns.oracle.com/adf/controller/binding"/>
    Jspx code:
    <af:forEach var="tf"
    items="#{bindings.multiRegion1.taskFlowBindingList}">
    <cust:showDetailFrame shortDesc="#{''}" id="sdf2">
    <af:region value="#{tf.regionModel}" id="r1"/>
    </cust:showDetailFrame>
    </af:forEach>
    thanks
    maher

    Hi,
    what if you create a managed bean property as shown below
    ManagedBean:
    Map<String, ? extends Map<String, Boolean>> parameters = new HashMap<String,HashMap<String,Object>>();
    then you create setter/getter for this map. This way you can address the HashMap for each region as
    #{scope.managedbean.parameters['nested_hashmap_string']}
    Frank

  • How to pass parameters to reports

    Hi,
    I am a new user to dev2000, i am struck at passing parameters to the reports, i have used lexical referrences, to the where clause, in the query that i have written in reports builder. It created a user_parameter of that where_clause. now i am trying to pass this parameter, from the form to generate a report btw'n dates. please sugest me if there is any other way, or correct me if i am on the right path, here is the code that i am calling from the form.
    DECLARE
    pl_id ParamList;
    --repid REPORT_OBJECT;
    --v_rep VARCHAR2(100);
    BEGIN
    pl_id := Get_Parameter_List('tmpdata');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('tmpdata');
    Add_Parameter(pl_id, 'WHERE_CLAUSE', TEXT_PARAMETER, 'WHERE SYS_DATE = ''18-JUL-01''');
    --repid := find_report_object('report34');
    --v_rep := RUN_REPORT_OBJECT(repid);
    Run_Product(REPORTS, 'REPORT34', ASYNCHRONOUS, BATCH,
    FILESYSTEM, pl_id,NULL);
    END ;
    I am gettting an error saying FRM-41211: Integration error:ssl failure running another product.
    this error is comming when i try to access for the first time, and
    Starting report REPORT34 [Tue Jul 24 16:35:14 2001] ...
    REP-0110: Unable to open file 'REPORT34'.
    REP-1070: Error while opening or saving a document.
    REP-0110: Unable to open file 'REPORT34'.
    End report REPORT34 [Tue Jul 24 16:35:20 2001].
    this for the next time, with out closing runtime env.
    If i have to use RUN_REPORT_OBJECT how can i pass parameters to reports.
    Another thing i encountered is when i am using RUN_REPORT_OBJECT which is working it shows me the parameter form of the reports and when i click on run report, it is just creating a file under forms directory and asking each time when i run report wether to replace it or not and from where it is calling the printer object and actually nothing is being printed, and every thing is fine with the printer and it is not showing the report out put and it shows end of report in the log file of the background report product.

    For your 1st problem it seems to be a bug in Forms 6i - you can visit this site:
    http://pipetalk.revealnet.com/~plsql/
    and find there 41211.
    Helena

  • How to pass parameters/atrributes to Servlet from ALBPM

    HI Friends,
    I am invoking servlet from bpm using server configuration, i am able to invoke servlet, but not able to pass parameters dynamically,
    Also I like to receive response parameters/attributes from servlets?
    Can any body help me on this?
    Look forward for response.
    Cheers

    Some helpful Docs on the WebServer component for you:
    The WebServer component is used to send HTTP requests to an HTTP server and capture the responses. It supports HTTP methods GET and POST.
    The body of the HTTP response is available in the WebServer.response attribute (String).
    Note: This component is superseded by the Fuego.NetX.AdvancedWebServer component, which provides better performance and more functionality like support for proxies and for more HTTP methods (like PUT and DELETE).
    Example: Get Oracle's website home page and save it to a file.
    getFrom(WebServer, url : "http://oracle.com", args : null)
    binaryResponse = Binary(text: WebServer.response,
    encoding: "UTF8")
    BinaryFile.writeFromBinaryTo(data : binaryResponse,
    name : "/tmp/oracle_index.html",
    append : false)

  • How to pass arguments to .sql file.......

    Hello,
    I want to pass arguments to .sql file which is being called from within a shell (.sh).
    suppose this is the line in shell -
    ${ORACLE_HOME}/bin/sqlplus -s abcuser/abcuser@abc < ${ABCDB_DIR}/A.sql $val >>${LOG}
    - now I want to pass '123456' to A.sql
    Please suggest how to do that.
    Thanks and regards,

    You can pass parameters to a shell script executing sql commands just like you would any other shell script.
    I have a script called test_os_variables.sh:
    sqlplus -s "/ as sysdba" << EOF
    select '$1' from dual;
    EOF
    Now I execute my script passing SHAWN as a parameter.
    ./test_os_variables.sh SHAWN
    SQL*Plus: Release 10.2.0.2.0 - Production on Tue Jan 9 08:09:46 2007
    Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL>
    'SHAW
    SHAWN

  • How to generate an XML Configuration File for EBS Source Type

    Hi,
    We have installed SES, I want to integrate it to enable for searching repository contracts.
    In the sources I have selected oracle.apps.okc.repository.textsearch.server.RepHeaderSearchExpVO.
    For this source I need to specify the Configuration URL.
    Here I need to provide the path for configuration XML file. But before that I need to generate the XML Configuration file.
    Is there any steps on how we can create this XML file.
    like I would want to know how we can create the XML file and on which folder on the server should I be putting it
    Thanks

    Hi there,
    We are running into same issue and need the exact same information. Can someone help with this question on priority?
    Thanks,
    Darshan

  • How can I "touch" a configuration file?

    I have a program that is used to write a configuration file.  I am using the "Configuration File VIs" that came with LabVIEW 8 to manage the configuration file.  I have the "Create file if necessary" boolean input wired to "True" for the "Open Config Data" VI, but I am still getting an error about the file not being found.
    The VI should do the following:
    Reads the data file in the current VI's directory, "config.cfg."
    If the file doesn't exist, then create the file and pass the default values to the controls on the front panel.
    If the file does exist then read the data file and pass the saved values to the controls on the front panel.
    User adjusts the values on the front panel and clicks on "Ok" or "Cancel"
    If the user clicks on "Ok" then save the values in the controls from the front panel into the configuration file.
    If the user clicks on "Cancel" then do nothing.
    Close the configuration file.
    Why isn't it creating the necessary file when I first run this VI?  Is there anyway I can initialize a configuration file?
    Thanks!
    -Nic
    Attachments:
    AIT - Channel Configuration2.vi ‏55 KB

    Nickerbocker wrote:
    Ok, I get it.  If the program is compiled, then the path to the current vi is within the executable like:
    build_dir\build.exe\my.vi
    where as if it isn't built you'd get:
    dev_dir\my.vi
    I
    found a subVI program in the forum that does a simple check to see if
    the path contains a .exe and then strips if it does passes the path if
    it doesn't that works great.
    Thanks
    -Nic
    I personally always use a different approach. I have usually an application development directory structure similar to this.
    MyApplication
        <myapplication>.ini
        support
              <clean myapplication>.ini
              <myapplication>.ico
        topLevel.llb
              Startup Splashscreen.vi
              Get App Root Directory.vi
              Get App Configuration Path.vi
             <some other VIs needed in the startup and intialization of my program>
         <other function specific subdirectories such as GUI, config, FileIO, DAQ, serial, etc.>
    Basically Get App Root Directory.vi always strips the Current VIs path
    twice and is used by Get App Configuration Path.vi to build the ini
    file path and possibly by others VIs to build specific additional
    support subdirectories that the installer might create. Since Get App
    Root Directory is one level below the root directory in the development
    environment its relative position to the root directory is always the
    same irrespective of LabVIEW development system execution or
    Application execution.
    The <myapplication>.ini is used by the application during
    debugging etc, and the <clean myapplication>.ini file is used by
    the Application Builder/Project Manager to include in the application
    and contains the settings as I want them to appear after first
    installation on the customers system.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to create multiple pof configuration files for c# client

    Is there a way to have multiple pof files for c# coherence client?
    Can I create a file called my-pof-config.xml with the following line...
    <pof-config xmlns="http://schemas.tangosol.com/pof">
    <user-type-list>
    <include>assembly://Coherence/Tangosol.Config/coherence-pof-config.xml</include>
         <include>file://pof-config.xml</include>
    and here is what pof-config.xml file look like
    <?xml version="1.0" encoding="UTF-8"?>
    <pof-config xmlns="http://schemas.tangosol.com/pof">
    <user-type-list>
    In my C# visual studio project, this is where I load my-pof-config.xml in app.config
    <coherence>
    <cache-factory-config>coherence.xml</cache-factory-config>
    <cache-config>coherence-cache-config.xml</cache-config>
    <pof-config>my-pof-config.xml</pof-config>
    </coherence>
    and this is what I saw in the log...
    2012-02-23 14:35:35,529 DEBUG Coherence (null) - 2012-02-23 14:35:35.529 level(thread=System.Threading.Thread): Loaded POF configuration from "FileResource(Uri = file://my-pof-config.xml, AbsolutePath = D:\worktrees\ads\mainline\v2\ads\demos_cs\build\my-pof-config.xml)"
    2012-02-23 14:35:35,545 DEBUG Coherence (null) - 2012-02-23 14:35:35.545 level(thread=System.Threading.Thread): Loaded included POF configuration from "EmbeddedResource(Uri = assembly://Coherence/Tangosol.Config/coherence-pof-config.xml, AbsolutePath = assembly://Coherence/Tangosol.Config/coherence-pof-config.xml)"
    2012-02-23 14:35:35,623 DEBUG Coherence (null) - 2012-02-23 14:35:35.623 level(thread=ExtendTcpCacheServiceCSharp:TcpInitiator): Loaded POF configuration from "FileResource(Uri = file://my-pof-config.xml, AbsolutePath = D:\worktrees\ads\mainline\v2\ads\demos_cs\build\my-pof-config.xml)"
    I don't see pof-config.xml is loaded at "Loaded included POF configuration....". How do I get around it so I can load multiple pof configuration files for c# client?

    Hi,
    Not sure about C# but I would suggest try removing file:// from
    <include>file://pof-config.xml</include>and keep pof-config.xml and my-pof-config.xml in the same directory.
    Hope this helps!
    Cheers,
    NJ

  • How to pass parameters to function module

    Hello,
    Can someone suggest how to pass parameter values to BAPI function module from a .NET client? I am using the BAPI_PO_GETDETAILS module and want to pass required parameters to get the item details. Also, please let me know which table should I refer to when retrieving the result. I am using sap .net connector 3.0.
    Thanks in advance

    Hi unosino,
    at http://www.se80.co.uk/sapfms/b/bapi/bapi_po_getdetail.htm you can see, that you have to pass po_header and po_address to the function.
    You can do that with the nco3 like this:
    IRfcFunction rfcFunction = destination.Repository.CreateFunction("BAPI_PO_GETDETAILS");
    rfcFunction.SetValue("po_header", /* your value */);
    rfcFunction.SetValue("po_address", /* your value */);
    rfcFunction.Invoke(destination);
    kind regards
    christian
    Edited by: chrislind on Nov 11, 2011 2:47 PM

Maybe you are looking for

  • How do I add DxO 9 as a lightroom external editor?

    I posted this in the beginners section but was recommended to move it to more advanced viewers.  I have lightroom 5.3  I want to use DxO 9 from within Lightroom as an external editor, to both convert raw to tiff and make use of the lens corrections. 

  • How to alter a Form to modify multiple tables

    I want to create a form that will insert or update into multiple tables at once. I have provided a picture of what i have in mind: http://imageshack.us/photo/my-images/21/custformexample.jpg In this example I have 3 tables: Customer (Cust_ID, Name,Ad

  • 'Does not contatin function' error in xslt

    Hello everyone, i am trying to call java function(static method) but i get "Namespace 'classname' does not contain any functions" error. my both xml and xslt files are in the java directory. java file has package com.examples i use the namespace as x

  • Regarding rp_provide_from_last

    hi experts, PERNR    INFTY SUBTY OBJPS SPRPS  ENDDA    BEGDA   SEQNR PUNCHTIME  EMPLOYEECARDNO 00000001|9777 |P20  |     |     |20080804|20080804|000  |130000      |12345678  00000001|9777 |P20  |     |     |20080804|20080804|001  |190000      |12345

  • ValueHelp iview not found - Portal Runtime Error

    I get the following portal runtime error when clickingon a input help: "iView not found: pcd:portal_content/com.sap.portal.migrated/ep_5.0/roles/com.sap.pct.crm.crm_default_services/nf/ValueHelp." I've checked the Business Package for com.sap.pct.crm