How to read the extended-cache-config.xml file. in C++ API

I want to create my own XML config file and define the config values in that, so that C++ Client (using Coherence C++ API) application can access the config files.
Also how to get the instance of configuration values which Coherence client has read,
i.e.
TangosolCoherenceOverride=$PATH/examples/config/tangosol-coherence-override.xml
TangosolCoherenceCacheconfig=$PATH/examples/config/extend-cache-config.xml
How to get the instance of this XMLDocument ? and read values from it.
Thanks,
Naveen

Hi,
You can get the cache-config that was read by getting it from the ConfigurableCacheFatory (which you can get from the CacheFactory) via getConfig(). See:
http://download.oracle.com/otn_hosted_doc/coherence/352CPP/classcoherence_1_1net_1_1_cache_factory.html
http://download.oracle.com/otn_hosted_doc/coherence/352CPP/classcoherence_1_1net_1_1_configurable_cache_factory.html
There is no way to get the actual XmlDocument object from the cluster that is read for the cluster-config (though you could open the same path yourself).
thanks,
-Rob

Similar Messages

  • Help on how to read the content of an XML file from the payload

    I have a receiver channel / mail adapter, that sends e-mails with a XML attachment.
    I’m trying to write a Bean, that should make it possible to rename the attached XML file dynamically.
    In the Bean I want to read the content of the attached XML file, it could be the “order number”.
    The filename should then be “Order number”.XML.
    <u><i>Can anyone help me with how to read the content of the XML file from the payload.</i></u>
    <i><b>Frank</b></i>

    hi,
    check this: http://jakarta.apache.org/poi/

  • How to read configuration data from an xml file (not web.xml)?

    Hi,
    I want to separate the application specific configuration parameters in a separate xml file and read them as and when they are needed? I know that I can use the wb.xml but I want to separate them in a different xml file because I don't want the web.xml file to be played around later after deployment. If any change is needed then it should be done in the application-config.xml.
    How can I read the parameters from this xml file in my jsp code and also what should be the location of this file if I have
    ../webapps/Root/application
    directoty structure ?
    Any help is greatly appreciated.

    can you give an example of a property file and also
    it is loaded in the jsp ?Hmm... loading properties in a JSP is not a very good idea. You should do it in a separate class, rather than mixing the logic with the display logic.
    Properties properties = new Properties();
    properties.load(UtilClass.class.getResourceAsStream("config.properties"));
    // Add a try - catch block around the load
    // for IOException...

  • [svn] 3867: Add new user-agent info to the sample services-config.xml file.

    Revision: 3867
    Author: [email protected]
    Date: 2008-10-24 07:13:10 -0700 (Fri, 24 Oct 2008)
    Log Message:
    Add new user-agent info to the sample services-config.xml file.
    Modified Paths:
    blazeds/trunk/resources/config/services-config.xml

    Resolved! The problem was in the php code the wizard had generated as an example and that I had edited in Dreamweaver. I had tried to start a session and set session objects in the php code. I developed if() { statements} to check the session variable before executing the function in some of my data services. Apparently the wizard does not like this. I removed all references to session. I reconfigured the input types and the return types for each service. With the code now clean the wizard created the example code and placed the proper package in the scr.services package. I still have custom php code and it executes.
    Things I learned:
    If the php code stops when a session variable is not available in the if statement and the data service is refreshed, the wizard will not "look" beyond the if statement.
    Functions downstream of a session variable misshap will show in the data services window but the functions will have a circle icon to the left of the function name and each variable to be passed to the php code will be declared as type = Object in Flashbuilder. The input types and return types will have to be reconfigured for each non-functioning function. Simply commenting out a portion of the php code and attempting a refresh will not make it work again.
    When the wizard is unable to refresh properly because of a stop in the php code it stops working completely so additional refreshes or creation of code is not carried out.
    I decided to create a My SQL table for user and other identifiers rather than attempting the session object again.
    Sorry, I did not make screen shots as I solved this problem. I hope the solution is not hard to visualize.
    Thanks for looking and considering how to help me. I hope my solution works for you.

  • How to write the nodevalue back to xml file?

    Hi, Everybody:
    These are two packages I used. javax.xml.parsers.*,org.w3c.dom.*
    Now I use "setNodeValue("abc") to set the node value to "abc". But it is not really saved back into XML file. It only change the node value in memory.
    How to write the changes back to XML file? Thank you very much for your help.
    Michelle

    * Version : 1.00
    * File Purpose : Given the xml file loads into dom and recreate the file with the updated values.
    * Developer : Kashif Qasim : 25/july/04
    * Modify detail :
    import java.lang.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    import org.w3c.dom.*;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xerces.*;
    public class XMLWriter
    private String displayStrings[] = new String[5000];
    private int numberDisplayLines = 0;
    private Document document;
    //private final Node c;
    public synchronized void displayDocument(String uri,Vector UpdatedValues,String getTaskID)
    try {
    DOMParser parser = new DOMParser();
    parser.parse(uri);
    document = parser.getDocument();
    display(document, "",UpdatedValues);
    } catch (Exception e) {
    e.printStackTrace(System.err);
    ReadXmlConfig objReadXmlConfig = null;
    FileWriter filewriter = null;
    try {
    filewriter = new FileWriter(uri);
    for(int loopIndex = 0; loopIndex < numberDisplayLines; loopIndex++){
    filewriter.write(displayStrings[loopIndex].toCharArray());
    //System.out.println("displayStrings[loopIndex].toCharArray() "+displayStrings[loopIndex].toString());
    //filewriter.write("\n");
    filewriter.close();
    System.gc();
    objReadXmlConfig = new ReadXmlConfig();
    objReadXmlConfig.ITSLog("File updated for "+getTaskID+" succesfully, file is closed now ");
    } catch (IOException e) {
    System.err.println("Caught IOException: " + e.getMessage());
    objReadXmlConfig = new ReadXmlConfig();
    objReadXmlConfig.ITSErrorLog("File updated FAILED for "+getTaskID+". Reason for file error "+e.toString());
    }finally {
    if (filewriter != null) {
    System.out.println("Closing File");
    objReadXmlConfig =null;
    try{
    filewriter.close();
    }catch(IOException e){
    System.err.println("Caught IOException: " + e.getMessage());
    } else {
    System.out.println("File not open");
    private void display(Node node, String indent, Vector UpdtRecs)
    if (node == null) {
    return;
    int type = node.getNodeType();
    NodeList nodeList = document.getElementsByTagName("QueryParm");
    int TotalRecs = UpdtRecs.size();
    switch (type) {
    case Node.DOCUMENT_NODE: {
    displayStrings[numberDisplayLines] = indent;
    displayStrings[numberDisplayLines] +=
    "<?xml version=\"1.0\" encoding=\""+
    "UTF-8" + "\"?>";
    numberDisplayLines++;
    displayStrings[numberDisplayLines] += "\n";
    display(((Document)node).getDocumentElement(), "",UpdtRecs);
    break;
    case Node.ELEMENT_NODE: {
    if(node.getNodeName().equals("QueryParm")) {
    for(int i =0 ; i< nodeList.getLength() ; i++)
    Node nodeQry = nodeList.item(i);
    NamedNodeMap nnp = nodeQry.getAttributes();
    for(int j= 0 ; j < nnp.getLength() ; j++)
    Attr atr = (Attr) nnp.item(j);
    if(atr.getName().equalsIgnoreCase("value_"+(i+1)))
    //System.out.println(atr.getName() +" : " + atr.getNodeValue() );
    atr.setNodeValue(UpdtRecs.get(i).toString());
    displayStrings[numberDisplayLines] = indent;
    displayStrings[numberDisplayLines] += "<";
    displayStrings[numberDisplayLines] += node.getNodeName();
    int length = (node.getAttributes() != null) ?
    node.getAttributes().getLength() : 0;
    Attr attributes[] = new Attr[length];
    for (int loopIndex = 0; loopIndex < length; loopIndex++) {
    attributes[loopIndex] = (Attr)node.getAttributes().item(loopIndex);
    for (int loopIndex = 0; loopIndex < attributes.length; loopIndex++) {
    Attr attribute = attributes[loopIndex];
    displayStrings[numberDisplayLines] += " ";
    displayStrings[numberDisplayLines] += attribute.getNodeName();
    displayStrings[numberDisplayLines] += "=\"";
    displayStrings[numberDisplayLines] += attribute.getNodeValue();
    displayStrings[numberDisplayLines] += "\"";
    displayStrings[numberDisplayLines]+=">";
    numberDisplayLines++;
    NodeList childNodes = node.getChildNodes();
    if (childNodes != null) {
    length = childNodes.getLength();
    indent += " ";
    for (int loopIndex = 0; loopIndex < length; loopIndex++ ) {
    display(childNodes.item(loopIndex), indent,UpdtRecs);
    break;
    case Node.CDATA_SECTION_NODE: {
    displayStrings[numberDisplayLines] = "";
    displayStrings[numberDisplayLines] += "<![CDATA[";
    displayStrings[numberDisplayLines] += node.getNodeValue();
    displayStrings[numberDisplayLines] += "]]>";
    numberDisplayLines++;
    break;
    case Node.TEXT_NODE: {
    displayStrings[numberDisplayLines] = "";
    String newText = node.getNodeValue().trim();
    if(newText.indexOf("\n") < 0 && newText.length() > 0) {
    displayStrings[numberDisplayLines] += newText;
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    break;
    case Node.PROCESSING_INSTRUCTION_NODE: {
    displayStrings[numberDisplayLines] = "";
    displayStrings[numberDisplayLines] += "<?";
    displayStrings[numberDisplayLines] += node.getNodeName();
    String text = node.getNodeValue();
    if (text != null && text.length() > 0) {
    displayStrings[numberDisplayLines] += text;
    displayStrings[numberDisplayLines] += "?>";
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    break;
    if (type == Node.ELEMENT_NODE) {
    displayStrings[numberDisplayLines] = indent.substring(0,
    indent.length() - 4);
    displayStrings[numberDisplayLines] += "</";
    displayStrings[numberDisplayLines] += node.getNodeName();
    displayStrings[numberDisplayLines] += ">";
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    indent += " ";
    public static void main(String args[])
    Vector xmlValue = new Vector();
    xmlValue.add(0,"Kashif");
    xmlValue.add(1,"Qasim");
    //displayDocument("NewMediation.xml",xmlValue);
    <?xml version="1.0" encoding="UTF-8"?>
    <Mediation>
    <Task1>
    <Source>
    <SourceDriver>com.microsoft.jdbc.sqlserver.SQLServerDriver</SourceDriver>
    <SourceConnection>jdbc:microsoft:sqlserver://10.2.1.58:1433;DatabaseName=MTCVB_HDS;</SourceConnection>
    <SourceUser>sa</SourceUser>
    <SourcePassword>sa</SourcePassword>
    <Table>
    <SourceTable>t_Agent</SourceTable>
    <SourceQuery><![CDATA[SELECT SkillTargetID,PersonID,PeripheralID,EnterpriseName,PeripheralNumber,Deleted,TemporaryAgent,AgentStateTrace,ChangeStamp FROM t_Agent where SkillTargetID > {value_1} order by SkillTargetID]]>
    </SourceQuery>
    <SourceParm BusinessRule="" ColumnName="SKILLTARGETID" ColumnNumber="1" DataType="Numeric" DefaultValue="0" Format="mm/dd/yyyy xx:xx:xx XX">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERSONID" ColumnNumber="2" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERIPHERALID" ColumnNumber="3" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="ENTERPRISENAME" ColumnNumber="4" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERIPHERALNUMBER" ColumnNumber="5" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="DELETED" ColumnNumber="6" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="TEMPORARYAGENT" ColumnNumber="7" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="AGENTSTATETRACE" ColumnNumber="8" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="CHANGESTAMP" ColumnNumber="9" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <QueryParm FldName_1="SkillTargetID" FldType_1="Number" value_1="0">
    </QueryParm>
    </Table>
    </Source>
    </Task1>
    </Mediation>
    The QueryParm values are updated thru this code :)
    Hope it helps u ...

  • How to read the content of a text file (by character)?

    Guys,
    Good day!
    I'm back just need again your help. Is there anyone knows how to read the content of a text file not by line but by character.
    Please help me. Thank you so much in advance.
    Jojo

    http://java.sun.com/javase/6/docs/api/index.html
    package java.io
    InputStream.read(): int
    Reads the next byte of data from the input stream.
    Implementation:
    InputStreamReader
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.

  • How to read the content of ms-word file use pure java???

    how to read the content of ms-word file use pure java???

    hi,
    check this: http://jakarta.apache.org/poi/

  • How to place the images in Indesign xml file by Javascript?

    How to place the images in Indesign xml file by Javascript?
    We got the Indesign xml file, how to give the image placement link by Indesign javascript? Please help me its urgent.

    Hi,
    You can pass the image url as a href attribute=> file:///Users/me/Documents/my_pic.jpg directly within your xml. It just needs that you pass a local, static and valid url.
    If you want to add image later once the xml is flowed and so target specific nodes and inject images, it's a bit more complex. If the node is not part of the layout, you may try to reach the XMLElement objet and such an attribute, then layout the element.
    var x = some XMLElement
    x.xmlAttributes.add("href","file:///Users/m/Documents/my_pic.jpg" );
    If already placed, then you have to get the associated pageItem, then place your file into it.
    pagItm.place ( File ( "/Users/m/Documents/my_pic.jpg" ) );
    Hope that helps,
    Loic
    http://www.loicaigon.com

  • Not overriding the coherence-cache-config.xml but showing the error...

    Hi,
    I have created a file called tangosol-coherence-override.xml file in the specified path which is " C:\Program Files\Oracle\Coherence for .NET"
    and the coherence.jar file is located in path which is "C:\Program Files\Oracle\Coherence for .NET\lib"
    but it is not overriding the xml file.. with the default file...
    C:\Program Files\Oracle\Coherence for .NET\examples\ContactCache.Java>"C:\Progra
    m Files\Java\jdk1.6.0_11\bin\java" -server -showversion -Xms128m -Xmx128m -Dtang
    osol.coherence.ttl=0 -Dtangosol.coherence.cacheconfig=contact-cache-config.xml -
    cp "config;lib\custom-types.jar;C:\Program Files\Oracle\Coherence for .NET\lib\c
    oherence.jar" com.tangosol.net.DefaultCacheServer
    java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)
    2011-06-20 15:06:57.607/2.366 Oracle Coherence 3.7.0.0 <Info> (thread=main, memb
    er=n/a): Loaded operational configuration from "jar:file:/C:/Program%20Files/Ora
    cle/Coherence%20for%20.NET/lib/coherence.jar!/tangosol-coherence.xml"
    2011-06-20 15:06:57.989/2.748 Oracle Coherence 3.7.0.0 <Info> (thread=main, memb
    er=n/a): Loaded operational overrides from "jar:file:/C:/Program%20Files/Oracle/
    Coherence%20for%20.NET/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
    2011-06-20 15:06:58.049/2.808 Oracle Coherence 3.7.0.0 <D5> (thread=main, member
    =n/a): Optional configuration override "/tangosol-coherence-override.xml" is not
    specified
    2011-06-20 15:06:58.062/2.821 Oracle Coherence 3.7.0.0 <D5> (thread=main, member
    =n/a): Optional configuration override "/custom-mbeans.xml" is not specified
    Oracle Coherence Version 3.7.0.0 Build 23397
    Grid Edition: Development mode
    Thanks in Advance

    The CLASSPATH is not the same as the PATH. It is similar but a classpath is a set of directories or jar files that Java uses to look for executable code and resources.
    Assuming you are using the example start-cache-server.cmd file that comes with the .Net examples to start your server you can put the tangosol-coherence-override.xml file into the C:\Program Files\Oracle\Coherence for .NET\examples\ContactCache.Java\config directory as this is on the classpath when using that script.
    JK

  • Aggregating cache-config.xml files

    I'd like to add to, rather than override, my cache config files. How do I go about that? Do I have to deal with XmlElements of the DefaultConfigurableCacheFactory directly, or is there some simpler way to do this?
    Thanks ---

    Hi Cindy,
    There is nothing in the core product but if you use the Coherence Incubator Commons then you can do it. http://coherence.oracle.com/display/INC10/coherence-common
    You need to include the coherence-commons jar in your class path then you can do this...
    <cache-config
         xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config coherence-cache-config.xsd"
            xmlns:element="class://com.oracle.coherence.environment.extensible.namespaces.XmlElementProcessingNamespaceContentHandler"
            element:introduce-cache-config="coherence-common-cache-config.xml">
        <caching-scheme-mapping>
        </caching-scheme-mapping>
        <caching-schemes>
        </caching-schemes>
    </cache-config>The above config uses the element namespace from the incubator that allows you to add the element:introduce-cache-config attribute to the cache-config tag which imports the specified cache config file. http://coherence.oracle.com/display/INC10/element-namespace
    JK

  • Where can I find the schema for config.xml file of jax-rpc

    For the xrpcc tool I need to create a config.xml file, does any body know where can I find the schema for it?

    http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXRPCxrpcc.html and all your questions will be answered... except maybe why aren't these pages linked from the main index anymore? (they were when 1.0 of the tutorial was released, but then there were no docs for wscompile or wsdeploy. The JAX-RPC release notes fixed the latter, but around 1.0_01 they broke the former.)

  • Reading the Korean Character from xml file.

    Hai all,
    I am reading the xml file where I have stored the different strings
    in Korean to be displayed when I want to change the Screen
    Setting to Korean Language.But my code is not reading the
    Korean.xml file itself.What is the Procedure to read the Korean xml file.
    How to read the Unicode in java.
    Regards
    Suresh.P

    Here is a sample program that reads and writes a Japanese-language file. You should be able to model your code from it.
    import java.io.*;
    import java.net.*;
    public class GetJapanese{
      public static void main(String[] args) throws Exception{
        String line;
        BufferedReader br;
        PrintWriter pw;
        FileOutputStream fos = new FileOutputStream("zztest.html");
        pw = new PrintWriter(new OutputStreamWriter(fos, "SJIS"));
        URL url = new URL
    ("http://s1.amazon.co.jp/exec/varzea/subst/your-account/downloadable-reports.html");
        InputStream is = url.openStream();
        br = new BufferedReader(new InputStreamReader(is, "SJIS"));
        while ((line = br.readLine()) != null){
          pw.println(line);
        pw.close();
    }

  • How to read the content of this excel file in LV

    Hi could you please let me know how can I read the content of this excel file using the Read From Speardsheet function. It contains text and numbers
    Thanks
    The excel file is attached
    Attachments:
    Datalogging.zip ‏307 KB

    Check attached VI.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    ReadFromExcel.vi ‏27 KB

  • How to get the encoding of a XML file ...

    Hi,
    How do you get the encoding of a XML file?
    For example,
    <?xml version="1.0" encoding="SJIS"?>
    I am trying to retrieve the above encoding="SJIS", but I can't seem to locate the API for doing so.
    Thanks in advance for any help,
    Eric

    Hi ddossot,
    Thanks for your suggestion.
    However, the xerces.jar file that comes with my old tomcat server is an old version and thus, the getEncoding method is not even present in the DocumentImpl class. The option to update to a newer version of tomcat and xerces is not available. What a pity... :-(
    Well, I just have to try to find a way around. Worst case scenario, parse the first line in the xml file myself.
    Regards,
    Eric

  • How to modify the priority of UWL XML File??

    Hello,
    How do you modify the priority of a UWL generated XML file? Ths xml file was generated when I registered the SRM system in UWL.
    I tried using the tab, Universal Worklist Configuration -> Upload new Configuration but it gives an exception "Operation not allowed".
    The reason for doing this,
    Conflicting ItemTypes are defined in the SRM XML file and one of the pre-defined SAP XML file (uwl_erp2005_buyer), and the SRM XML file has a priority of "Low" compared to medium priority for the erp xml. I need to change the SRM XML priority to "HIGH".
    Any help is appreciated.
    Thank you, John

    Erwin,
    Thanks for your reply.
    I downloaded the xml file, modifed some content. While uploading with the same name, making it a high priority and selecting the required system from the dropdown, "Adapt to System", it gives the following error
    Wed Apr 08 15:50:47 CDT 2009 : Operation not allowed on UWL generated Configuration:uwl.webflow.SAP_SRM_IAC
    Any reason the system does not allow doing this?
    John Miller

Maybe you are looking for

  • Adding a specific org unit with a user id.

    Hi SAP Master, How can I add a specific organization Unit with a particular User Id, i.e when ever that user id logs in into system and create a transaction the org. unit assigned with him determined automatically. And one more query, how can we send

  • Problem enabling SSL on a MQSeries Adapter

    I'm trying to enable SSL and so far these are the steps I've done: - I've been using the DemoIdentity.jks and DemoTrust.jks files located under <MIDDLEWARE_HOME>\wlserver_10.3\server\lib for all my certificate operations. - I created a PrivateKey and

  • HD DVD's Play on Windows PC?

    Hello all, I created a HD DVD in DVD Studio Pro but would like to play it on a Windows PC. Can this be done? When I put the disk in it does not even recognize it and will not open at all. Thanks!

  • Is there any String variable or something what have input and output data?

    Is there any String variable or something what have input and output data? Solved! Go to Solution.

  • Reading checked state of checkbox

    Hi there:- 'Sorry to post such a simple question but I can find the answer in the Dreamweaver online reference, and I have wasted a lot of time trying to find the answer. I want to read the checked state of a given checkbox and then if value of true