Setting a server wide variable at startup

Anyone have a way to set a server wide variable (likely in
the server scope) that gets set on server startup rather than in a
specific page request via a cfset.
What I would like to be able to do is set a variable external
to any application that describes the servers role (ie.
development, integration, staging, production) rather than
hardcoding into the applications a test for server ip, name, etc.
Thanks
-Mike

That's a new one. I can't think of anything internal to CF
that would
accomplish this.
My first idea, assuming a windows world, you could do
something in the
services start that would call some resource that would set
this for
you. I have no idea how or know for sure this is possible.
My second idea is what might be done in the Java
underpinnings. Could
something be done there.
There are several xml files that are parsed at start up, but
I have no
idea how, if at all, extensible they are.

Similar Messages

  • Code to set and destroy session variables in Java Server Pages(JSP)

    code to set and destroy session variables in Java Server Pages(JSP)
    we have use following statement to set session variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session variable
    session.setAttribute("userClient","");
    and
    the session.invalidate() is not working
    Plz. solve this probem

    code to set and destroy session variables in Java
    Server Pages(JSP)
    we have use following statement to set session
    variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session
    variable
    session.setAttribute("userClient","");Perhaps if you tried using
    session.setAttribute("userClient", null);
    or
    session.removeAttribute("userClient");
    and
    the session.invalidate() is not workingNot working how?
    >
    Plz. solve this probem

  • Is there any way to create a system-wide variable?

    Hello IDM gurus.
    Is there any way to create rarely changing system wide variables that can be loaded at system startup that will be available to all users? For example, at IDM system startup, the variables would be read from configuration or generic objects and live in memory for ALL users as opposed to each workflow/user having to read the same variables when the workflow is run.
    Any help would be appreciated.

    That may very well be the answer I'm looking for. Is there a way for that to be available within the entire application instead of having to read it in each workflow?

  • Why is my data set marking server not included in my executable​?

    I have a program that writes data sets to a citadel database with a data set marking I/O server.  Everything works fine in the labview environment, but when I create an executable of the program, the data set I/O server does not appear to be included.  The executable can create a database and write individual traces to it, but they are not grouped into data sets.  I have looked everywhere in the project window and in the build specifications window for the executable for a setting that would affect this, but have found nothing.  Here is a picture of the build specification window for the executable. You can see in the Project Files window the lvlib file and the included Shared Variables folder, but the data set marking server is not shown as it is in the project window above it.
    The lvlib file created with the executable appears to remain in tact, because I can open it in the LV environment and see the data set I/O server included with it:
    Finally, here is a picture of the databases that MAX sees.  The VI in the LV environment produced the top database called C__Program_Files_National_Instruments_Labview_8_2_​data with the DataSets folder, and the executable version produced the bottom database called mVROC_Database with no DataSets folder:
    I'm using LV 8.2.1 and DSC module 8.2.
    Thanks,
    Craig

    Hi, Drew,
    Thanks for the reply.  As I was looking into your questions above, I found that the I/O server was indeed geting included in the executable, but it was configured in the original project to look at the wrong database.  After a fair amount of playing around, I at least got it to create data sets.  However, there are some other weird things going on now.  The logged values of the variables are mismatched, or the value from say variable A shows up recorded in variable B. This stuff is all way too touchy.  Overall, I've been very dissapointed with using the DSC and database stuff. The promotional literature talks about how easy it is to use, but that is just not the case, and I've been programing in labview for about 10 years now.  Unfortunately I need to set this project asside for now so I can't investigate further, but I'll eventually get back to it. 
    Regards,
    Craig

  • Non-admin user cannot access Essbase server level variables

    Version 11.1.1.3
    Essbase Substitution variables are created at server level. Users are getting error in FR report that uses the Subsitution Variable -- Essbase Error(1051085): You do not have sufficient access to get this substitution variable. Also, users cannot access Substitution variable in SmartView. However, users can access variables created at database level. Users are provisioned as "Server Access" to Essbase and filter access to ASO application "MGTRPTG", where MGTRPTG is an ASO essbase application for reporting. We tried the same provisioning in two other environments and it seems to be working fine.
    User is type "Essbase and Planning" provisioned with essbase "server access", application mgtrptg "filter", Reporting and Analysis "analyst", "dynamic viewer" and "Explorer". In addition, it is given a filter "REP_DME_GALB" which restricts 2 dimensions (Division and Geography).
    Steps taken to resolve:
    1. Existing users were deprovisioned and reprovisioned with no effect.
    2. Created brand new identically provisioned users in Prod and QA. QA user can access the server level var and Prod user cannot
    3. Created a brand new server level variable in Prod and this cannot be accessed.
    4. All services have already been restarted several times.
    5. SR has been opened.
    Temporary workaround:
    By creating a duplicate of the same set of variables at the database level, the reports work. This can only be a temporary workaround as the client cannot be expected to maintain two sets of substitution variables since there are 3 applications using these server level variables.
    Thank you for any ideas!
    Jennifer

    You have stumbled on a defect which is resolved in the Hyperion Planning 9.3.1 patch 6 and above. If you have your planning preferences set to indent members it will cause forms which have page selections to show as invalid in SmartView.
    You can either patch Planning or turn off the preference. The patches are available from http://metalink3.oracle.com and require account which has been associated with your client ID.
    P.S. Usually it's not a good practice to use the admin id.
    Regards,
    -John
    Edited by: Jbooth on Nov 3, 2008 2:12 PM

  • Spry XML data set and dynamic post variables

    Hi,
    I am trying to create an XML data set that has dynamic post
    variables.
    Everytime something is pressed on the page a variable changes
    and I then want to reload the XML data set using the new variable.
    I know I can just pull in an XML with all possible variables
    and filter client side but this would make it way too large.
    Does anyone know what I may need to do.
    I tried this:
    var myVar = 0;
    var dss = new Spry.Data.XMLDataSet (
    '../../cgi-bin/server_details.pl' , 'top' , { method: 'POST' ,
    postData: sid=ajaja21&ip=127.0.0.1&cid=' . myVar ,
    subPaths: [ "auth" , "plugins" , "plugins/plugin" ] , keepSorted:
    "true", sortOnLoad: "plugins/plugin/order", sortOrderOnLoad:
    "descending", useCache: false, loadInterval: 10000 } );
    onclick="myVar=1";
    But the script doesn't understand the post variables sent (it
    does when I remove the . myVar part and put in a static value). I
    think it isn't sending that dynamic variable with the post
    variables.
    Any ideas anyone?
    Thanks

    Well I had it working when I stripped back everything and
    just had the dss data set and a single onclick function, but now
    that I put it back together it hash foobared again.
    Here are the relevant bits of code that I've changed.
    The function to change server id:
    //function to run when changing the server id
    function changeServer ( sid ) {
    //set the url to use the current server id
    dss.setURL = ( '../../cgi-bin/server_details.pl' , { method:
    'POST' , postData:
    'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1&cid='+sid
    //force a reload of the server data
    dss.loadData();
    The inital load of the data set
    var dss = new Spry.Data.XMLDataSet (
    '../../cgi-bin/server_details.pl' , 'yams' , { method: 'POST' ,
    postData:
    'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1&cid=0' ,
    subPaths: [ "auth" , "plugins" , "plugins/plugin" ] , keepSorted:
    "true", sortOnLoad: "plugins/plugin/order", sortOrderOnLoad:
    "descending", useCache: false, loadInterval: 10000 } );
    And the part that changes the server id
    <td align="left" style="cursor:default; width:174px;"
    onclick="changeServer({dsv::servers/server/@id})">{dsv::servers/server/name}</td>
    I checked that the function is receiving the correct server
    id and I even tried hard coding the cid variable to 2 in the change
    function but it still wasn't changing on the server side.
    Any ideas?
    Thanks

  • Creating class wide variable that gets re-initialized every time

    I declared a class-wide variable in my jsp document using the <%! %> tags:
    <%! boolean HasMoreRows = true %>
    I set this variable to false in one of the private jsp methods (also declared within <%! %> tags) when the program is supposed to terminate (there are no more rows left in my database result set).
    When I run the jsp document the first time after modifying it, it works fine. But if I hit the browser "back" button and then hit the "submit" button on the jsp page again to recreate the database result set, the HasMoreRows variable has the same value it had after the report ran the first time (that is, it is set to false).
    I think this has something to do with the way a servlet is created and re-used by the servlet container. I have to set the variable in a method so I cannot use a local variable (i.e. a variable declared inside <% %> tags). Does anyone know how to declare a variable that can be used anywhere inside the jsp document (including all methods) but gets reset to its initialization value every time the jsp document is run? Thanks.

    I think I figured out the solution. It is to declare the variable in the <%! %> tags but initialize it in the <% %> tags.
    <%! boolean HasMoreRows; %>
    <% HasMoreRows = true; %>

  • Hide repeated key values - server wide

    Hello all,
    does anybody know if there's a setting which sets the "hide repeated key values" query properties server wide, so I don't have to make that setting for each query?
    Thanks,
    Tudor

    Hi
    Check in SPRO customization report relevant settings for availability of options like this.
    But i think such option is not available in report settings with server level
    REgards
    M.A

  • Failed to start up. Please set proper ESSBASEPATH environment variable.

    Hi,
    Recently we have upgraded the 7x to 11x version, Installation looks fine and were able to migrate the zero level data as well. But when i trying to run the Load scripts i am getting the below error
    **Failed to start up. Please set proper ESSBASEPATH environment variable.**
    Below is my environment details
    Setting Server specific environment Variables
    PATH=/usr/local/bin:/bin:/usr/bin:/apps/hyperion/products/Essbase/EssbaseServer/bin:/apps/hyperion/products/Essbase/EssbaseServer:.:/apps/hyperion/products/Essbase/EssbaseServer/bin:/apps/hyperion/products/Essbase/EssbaseServer:.
    ARBORPATH=/apps/hyperion/products/Essbase/EssbaseServer
    LD_LIBRARY_PATH=:/apps/hyperion/products/Essbase/EssbaseServer/bin:/apps/hyperion/products/Essbase/EssbaseServer/dlls:/apps/hyperion/products/Essbase/EssbaseServer/odbc/merant41/lib:/apps/hyperion/products/Essbase/EssbaseServer/bin:/apps/hyperion/products/Essbase/EssbaseServer/dlls:/apps/hyperion/products/Essbase/EssbaseServer/odbc/merant41/lib
    Can you please help me resolving this.

    You will also need an environment variable called ESSBASEPATH
    The value will be the same as ARBORPATH
    Though if you start essbase by using startEssbase.sh then it should pick up the env variables from /hyperion/products/Essbase/EssbaseServer/hyperionenv.doc
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Declare, Set, and Use a variable in a SQL Developer Query

    I come from the SQL Server world and am trying to do something very simple: Declare, set, and use a variable in a query. For example:
    Declare @lastPeriod date;
    Set @lastPeriod = (select max(payperiod) from table 1 where payperiod < current_date);
    Select field 1,
    Field2
    From table2
    Where payperiod = @lastPeriod
    The variable is going to be used in more areas in the query which is why I am simply not using a Sub-query in the where clause. I appreciate any assistance.

    This forum is for issues with the SQL Developer tool. You'd get more response in the SQL And PL/SQL forum.
    That said, read up on bind variables and substitution variables.
    Whenever you can you should use Bind variables (e.g. *:lastPeriod* ), as they increase performance. In sqldev, there's no need to declare as you will be prompted to enter them on execution (F9), but you do if you execute as script (F5) (e.g. VARIABLE lastPeriod VARCHAR2(30);).
    Alternatively, Substitution variables (e.g. *&lastPeriod* ) will literally be substituted in your statement before the database parses it. In sqldev, there's no need to declare as you will be prompted to enter them on execution (either F9 or F5), but you can (DEF lastPeriod='TEST'; ).
    Have fun,
    K.

  • Application wide Variable

    What is the best way to implement an Application wide Variable.
    Here is what I want to accomplish. We have several users enter different data into Database. I want to filter the data the users see based on a column will call it Group that is in every table.
    My thinking was to put a dropdown on the login page or some page and they would choose which Group's data they want to see.
    Then on every page the queries for that page would have a where clause that would say where Group = :MY__APP_Variable.
    I am not sure if one this is the best way to accomplish this,
    and two if it is the best way I am not totally sure how to fully implent the app parameter.
    I am thinking I would create some type of variable under shared components
    then when they select the value from the drop down on the login I would make the variable equel to that.
    I am just not sure exactly how to do this.
    Thoughts??
    Thanks

    qtjr, I asked you about the number of reports, so that if you have less number of reports then you can have the option for changing the group on the report screen instead of going to the first page for changing it. You have 50 or more reports, so this probably will not be a good option. Allow the user to select a group after they login and set the value to an application level item.
    You can use a page level item but I think an application level item will be a better option.
    Thanks,
    Machaan

  • TS3276 ppl i fed up with my mac air while using my exchange email account, it takes ages to refresh and it doesn't send or receive instantly , no clue although that the same setting and server names has been set up on my iPhone and it is working fine

    ppl i fed up with my mac air while using my exchange email account, it takes ages to refresh and it doesn't send or receive instantly , no clue although that the same setting and server names has been set up on my iPhone and it is working totally fine

    Install ClamXav and run a scan with that. It should pick up any trojans.   
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • How can I set BPEL server enviorment and create BPEL domain?

    Without use the http console, how can I set BPEL server enviorment and create BPEL domain?
    When I try to use API like below
    import com.oracle.bpel.client.Server;
    Server s = new Server(ServerAuthFactory.authenticate("oracle","localhost"));
    But I always got four exceptions and one warning like below:
    java.io.FileNotFoundException: C:\Workspace\WOSEDISystem\BPEL_Domain_Creation\config\security.properties (The system cannot find the path specified)
    java.io.FileNotFoundException: C:\Workspace\WOSEDISystem\BPEL_Domain_Creation\config\ejb.properties (The system cannot find the path specified)
    Warning: unable to read transaction.interoperability config property
    java.io.FileNotFoundException: C:\Workspace\WOSEDISystem\BPEL_Domain_Creation\config\security.properties (The system cannot find the path specified)
    java.lang.Exception: Failed to create "ejb/collaxa/system/ServerBean" bean; exception reported is: "javax.naming.CommunicationException: Can't find SerialContextProvider
    Is it right to use com.oracle.bpel.client.Server like this, please help me.
    Best regards,
    Vita

    Anyone can help me? Because I need deploy BPEL process on production server, so I need the Java funtion to create domain. Thank you very much if you can tell me the correct method of using com.oracle.bpel.client.Server API.

  • How can I use Server level variables in a business model based report

    hi gems..
    I have declared one server level variable in the BI Analytics repository.
    Now I have made one business model based report.
    In one column I want to use that server level varible.
    I go to the formula tab of that column and then clicked on variable--> session --> put the name of the variable and click ok.
    But when i viewed the report, it is not showing the dates, rather it is showing the date format I chosed i.e DD-MMM-YYYY.
    please help..

    actually the previous problem got resolved...
    Now when I am trying to apply a filter on a particular column using that server variable, then it is showing that the varible has no value definition.
    I have clicked on the filter tab of that column-->add-->variables-->session variables-->then I put the name of the variable-->click OK.
    the following error is comming-
    Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 23005] The repository variable, Variable_name, has no value definition. (HY000)
    I have made that server variable from manage-->variables-->(right click) create new initialisation block-->gave the name and wrote the query and aslo gave the connection pool name and test that and it worked fine..

  • Find text from a file and set it as a variable in applescript?

    I am trying to build a script that sends me updates and notifications from cex.io. Please keep on reading below, so I may guide you until the point I have trouble with.
    The first simple script in this operation goes to cex.io's trading page for BTC/GHS. It records ands saves the text to a file every 4 seconds. It works great. It doesn't need to have safari refresh because the site pushes info to the browser live.
      repeat
              set the webpage_content to ""
              tell application "Safari" to set the webpage_content to the text of document 1
              set theText to webpage_content
              set a to "Macintosh HD:Users:PRIVATE:Desktop:CEX:"
              set theFile to (open for access file ((a) & "CEXRaw") with write permission)
              write theText to theFile
              close access theFile
              delay 4
      end repeat
    And it returns this from the site to this main file every 4 seconds: (note I cut off a chunk from the bottom and the top of the file, because they are unimportant)
        GHS:
        0.05233439
        BTC:
        0.00000223
        NMC:
        0.00002939
        LTC:
        0.00000000
        GHS/BTC
        0.02362958 LTC/BTC
        0.02438131 NMC/BTC
        0.00597565 GHS/NMC
        3.96951800 BF1/BTC
        1.67000000 Fund Account
        GHS/BTC
        Last price:
        0.02362958
        Daily change:
        -0.00018042
        Today's open:
        0.02381000
        24h volume:
        73812.35539255
    I now need an applescript to read that file, and return wanted values. But I'm lost on how to write it.
    It needs to find the number under BTC, and set it as a variable.
    It needs to find the number under GHS, and set it as a variable.
    It needs to find the number under Last Price, and set it as a variable.
    If anyone could script that really quick for me, or tell me how to do it, that would be amazing. Thank you so much!

    Couldn't tell if you had any whitespace in the lines (i.e. is there a space before or after GHS:), so I used contains, not is.  Also, if you have a line such as GHS/BTC with a colon GHS/BTC:  then it will also fail (as contains "BTC:" would be true for BTC: and GHS/BTC:)
    However, this will give you some guidance:
    set a to "Macintosh HD:Users:PRIVATE:Desktop:CEX:CEXRaw"
    set x to 0
    set Names to paragraphs of (read file a)
    repeat with nextLine in Names
              set x to x + 1
              if nextLine contains "BTC:" then
                        set BTC to item (x + 1) of Names
              else if nextLine contains "GHS:" then
                        set GHS to item (x + 1) of Names
              else if nextLine contains "Last Price:" then
                        set lastPrice to item (x + 1) of Names
              end if
    end repeat

Maybe you are looking for

  • Can I remove Iwork 06 without problems?

    Never fired it up. Never used it and it's eating 1.2 G + on my machine. I could use the space for something else. It it just a delete thing? Or do I need to dance around some object muttering prayers?

  • Int not increased when incremented in method call

    Hi, Could someone please explain why my int value is not increased in value when the increment is performed within a method call? private void printString(int i) if( i > 5)       System.out.println("Greater than 5!"); else       printString(i++); }Th

  • How to pass Valid from and Valid to Dates in CS_BOM_EXPLOSION

    Hii Experts, My requirement is to explode BOM using CMC LDB and generating files for all the remaining months by varying Valid from and Valid to dates. For this I am using CS_BOM_EXPLOSION but it has provision for a single date field. Can you please

  • [SOLVED]Xfce4 slowed down after backup

    I have Xfce4 and something went wrong with it after making backup on the external drive. It is very slow now, it takes 15 seconds to open something i clicked, the mouse pointer is OK, also the clock. How to fix this? If i damaged system files, how to

  • Does Apple provide DDNS?

    Hello! I'm running a XServe with Mac OS X 10.6.5 and OD and DNS running on it. I want to ask if Apple is supporting DDNS like Windows Server does? At the moment I need to add all entries by my own. I'm asking myself if there is thing like DDNS for Ap