System-property in param-value?

Hi all,
Is it possible to use a system-property override in a param-value element in the cache config? It doesn't seem to work for me. I have this:
<cache-mapping>
<cache-name>foo</cache-name>
<scheme-name>default-near</scheme-name>
<init-params>
<init-param>
<param-name>default-near-expiry-delay</param-name>
<param-value system-property="foo.expiry-delay"/>
</init-param>
</init-params>
</cache-mapping>
Setting -Dfoo.expiry-delay=1m on the command line doesn't take effect. I've also tried putting a default in param-value and it works, but not the override. What I'm trying to do is use the same scheme for different caches, but parameterize the expiry for each.
thanks
john

I just ran in to an inconvenient quirk. I thought I would be nice to add system properties for a number of caches so they will be there when I need them. I had something like this:
In the cache mapping:
<param-name>expiry-delay</param-name>
<param-value system-property="foo.expiry-delay"/>
In the scheme:
<expiry-delay>{expiry-delay 5m}</expiry-delay>
If I don't specify the foo.expiry-delay system property at all, I would like to get the default, but instead I get a NumberFormatException:
java.lang.NumberFormatException: passed String ("") must contain a number
at com.tangosol.util.Base.parseTime(Base.java:2756)
at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateLocalCache(DefaultConfigurableCacheFactory.java:1
384)
at com.tangosol.net.DefaultConfigurableCacheFactory.configureBackingMap(DefaultConfigurableCacheFactory.java:969
at com.tangosol.net.DefaultConfigurableCacheFactory.configureCache(DefaultConfigurableCacheFactory.java:839)
at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:284)
at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:606)
at com.tangosol.coherence.component.application.console.Coherence.doCache(Coherence.CDB:15)
at com.tangosol.coherence.component.application.console.Coherence.processCommand(Coherence.CDB:192)
at com.tangosol.coherence.component.application.console.Coherence.run(Coherence.CDB:39)
at com.tangosol.coherence.component.application.console.Coherence.main(Coherence.CDB:3)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.tangosol.util.ClassHelper.invoke(ClassHelper.java:746)
at com.tangosol.util.ClassHelper.invokeStatic(ClassHelper.java:689)
at com.tangosol.net.CacheFactory.main(CacheFactory.java:1115)
thanks

Similar Messages

  • How to display system property in XML forms

    Hi
    We are using XML forms template for publishing news in KM. In the show form we got author field (a label in the form) which is mapped to system property createdby (PropertyReference = /Properties/default:createdby).But while displaying the form author is not getting populated. When I try to edit the form in XML forms builder in data model tab under properties node no property is visible. Nothing is shown up in properties even after reload option is selected from context menu of properties node.
    I cheked by manually editing PropertyReference to some other property (e.g. modifiedby) but nothing is showing up.
    Can you please suggest how the createdby system property can be shown in the xml form?
    Thanks & Regards
    Sudip

    Hi Sudeep,
    Please try to open the formbuilder in another machine and try to see the properties xml form design view.
    You can even directly can create a lable in show form and add the property name along with the nama space name.
    For default properties namspace is default.Create a lable UI element in show form and select the datasource property and add the property value in that.
    With we can show file related system generated properties in show form.
    Regards,
    Rudradev Devulapelli

  • Howto pass dynamic jsp:param value to applet

    Hi.
    I have a JSP page with 3 to 4 links... and an applet with jsp:plugin .
    So i want to pass the URL behind the link to the applet as a Request Param..
    My JSP code looks like
    <a link href="www.google.com">Google</a>
    <a link href="www.oracle.com">Oracle</a>
    <a link href="www.gmail.com">Gmail</a>
    <jsp:plugin type="applet"
                                code="MyApplet"
                                height="0" codebase="../../jars/" width="0"
                                name="MyApplet"
                                align="bottom">
                            <jsp:params>
                                    <jsp:param name="applicationURL"
                                               value="this should be the "/>
                            </jsp:params>
                            <jsp:fallback>
                                    <p>This feature should run on applet supported
                                       browser.</p>
                            </jsp:fallback>
                    </jsp:plugin>and my applet code looks like
    init()
              String appURL = getParameter("applicationURL");
                    System.out.println(appURL);
              }I have a similar thread in Java forums... Howto pass dynamic jsp:param value to applet
    Thanks,
    Murali.

    My JSP code looks like
    <jsp:plugin type="applet"
                                code="MyApplet"
                                height="0" codebase="../../jars/" width="0"
                                name="MyApplet"
                                align="bottom">
                            <jsp:params>
                                    <jsp:param name="applicationURL"
                                               value="applicationURL"/>
                            </jsp:params>
                            <jsp:fallback>
                                    <p>This feature should run on applet supported
                                       browser.</p>
                            </jsp:fallback>
                    </jsp:plugin>and my applet code looks like
    init()
              String appURL = getParameter("applicationURL");
                    System.out.println(appURL);
              }Now i want to have links on JSP pages clicking on which corresponsing url will be displayed in applet.
    Edited by: 635237 on Jan 24, 2011 10:44 AM
    Edited by: 635237 on Jan 24, 2011 10:45 AM

  • How to set a system property via the config tool?

    Hello,
    how can I set a system property via the config tool? Before I chose WAS from SAP I used java with option -D<name>=<value> to set the system properties.
    Very much thanks in advance.
    Regards
    Carsten

    Hi Carsten,
    WAS config tool is located under
    e.g. usr\sap\J2E\JC00\j2ee\configtool
    start configtool.bat
    there will be opened a configuration tool GUI
    Click on the instance_ID.... leaf of the tree in the left pane and then on the server_ID.... leaf.
    Java settings will appear in the right pane after this steps.
    Best Regards,
    Violeta

  • Multivalued system property in XML

    Hello,
    We currently want to use a multi-valued system property in a XML form. In the Edit form we created checkboxes with the values 1 to 5. In the Show form a control selector with five labels is created in order to display only the selected values. However the display in the show form is incorrect.
    If we created a xml form with only the values 1,3,5 selected the show form only displays value 5. Does anyone know how we can fix this problem? All the conditions in the XML are in line with the system property value.
    Looking forward to your reply.
    Kind regards,
    Joost Christenhusz

    Hi Federico,
    I haven't fixed it yet, but the problem is that the control selector doesn't work yet in XML. You can only display the properties using a normal label. The results will be displayed in the same row. This is not the most optimal layout, but the only one that works.
    Kind regards,
    Joost Christenhusz

  • How does JVM set file.encoding system property?

    The system property file.encoding is changed mysteriously, and we don't have a command line -D option. How does JRockit JVM get the default value for system properties such as file.encoding?
    I am running Jrockit 1.4.2_12.
    Thanks.

    I am running WLS 8.1SP6 on Linux using Jrockit 1.4.2-12. Over the weekend, I bounced WL server, and file.encoding was changed. It used to be ISO-8859-1. Now it is ANSI_X3.4-1968. Neither System Administrator nor WebLogic (farm) Administrator changed anything. Although I can force it with -D, I'd like to figure out what happened.
    Thanks.

  • Accessing param values using RichFaces Drag n Drop

    Hello everyone,
    I'm using RichFaces drag and drop support and I want to pass an additional parameter so that I can access it's value when processing the dragged/dropped object.
    My JSP has:
    <rich:dragSupport dragIndicator=":indicator" dragType="measure" dragValue="#{measure}">
           <a4j:actionparam name="operator" value="#{aggOp}" assignTo="#{SessionBean.tempAggOp}"/>
           <rich:dndParam name="label" value="#{measure.name} (#{aggOp})"/>
    </rich:dragSupport>
    <h:outputText value="#{aggOp}" style="font:11px arial;"/>On my backing bean method that processes the event, I can access the object's properties fine, but the param has a strange behaviour:
    The first time I drag an object, the param value is null on the bean. The second time, it has the value it should have for the first dragged object, and so on.
    Apparently the param value is being updated after the drop event method is called. Any ideas on how to change this please?
    Thanks in advance,
    ~Ruben

    To solve this problem I used <f:param> instead of actionParam:
    On the drag support component:
    <rich:dragSupport dragIndicator=":indicator" dragType="measure" dragValue="#{measure}">
                                                        <f:param name="operator" value="#{aggOp}" />
                                                        <rich:dndParam name="label" value="#{measure.name} (#{aggOp})"/>
    </rich:dragSupport>     On the backing bean:
        //dropped item processors
        public void processDropSupportTable(DropEvent dropEvent) {
            if (dropEvent.getDragType().compareTo("measure") == 0) {
                SOLAPMeasure dragged = (SOLAPMeasure)dropEvent.getDragValue();
                FacesContext context = FacesContext.getCurrentInstance(); 
                Map requestMap = context.getExternalContext().getRequestParameterMap(); 
                String tempAggOp = (String)requestMap.get("operator");
                System.out.println("dropped: " + dragged.getId() + " named: " + dragged.getName() + " whose operator is: " + tempAggOp);
        }

  • How can I set jbo.sql92.LockTrailer system property in BC4J?

    We are using BC4J in 'SQL92' SQLBuilder mode and using MySQL database. row.lock() is not really locking the row. It seems, we need to set jbo.sql92.LockTrailer to correct value so that it will issue correct SQL statement for locking the row. How can I set this system property?

    Apparently this has something to do with the content of the TextObject. I added a new TextObject called "TestText" and put "this is test text" into it. I am able to set the value on that TextObject with no issues. But if the TextObject contains any formulas (Text4 in the sample below) the set throws an error, even if I try to set the Text to "" .
    foreach (ReportObject ro in letter.ReportDefinition.ReportObjects)
                        if (ro.Name == "TestText" || ro.Name == "Text4")
                            TextObject textObj = (ro as TextObject);
                            string oldText = textObj.Text;
                           // string oldText = "";
                            textObj.Text = oldText ;
    These reports are imported from CR9.2, does that have anything to do with it?

  • Cannot set a weblogic system property in batch

    Hello All,
    I'm running an weblogic application on weblogic 8.1 SP1. The application uses
    UTF-8 data from a mssql database. The problem is that weblogic 8.1 SP1 does not
    show UTF-8 data correctly. I've read docs and found that in order to make sure
    that weblogic's output is in UTF-8 I can configure a weblogic system property
    like that:
    add -Dweblogic.webservice.i18n.charset="utf-8" into JAVA_OPTIONS in startweblogic.cmd
    batch file. But during the process of starting it shows me the following:
    <10.10.2003 20:08:50 NOVST> <Warning> <Management> <BEA-141087> <Unrecognized
    pr
    operty: webservice.i18n.charset.>
    I also do not see changes in weblogic's behaviour (IMHO it should add charset=utf-8
    to Content-type header of each response to clients.
    However on weblogic 7.0 SP1 everything works without adding this option, but when
    I add it the server claims again that it's unrecognized and I see no effect in
    the HTTP headers of the server response.
    PLease help me to investigate this issue!
    Thanks for any help
    Dmitry.

    Hello,
    You are setting the charset value (UTF-8) correctly. The <Warning>
    message from the server startup can be safely ignored.
    The server should respond to the charset provided by the client. You
    can also set the charset on the web service using charset attribute of
    the <web-service> element in the web-services.xml file. See:
    http://e-docs.bea.com/wls/docs81/webserv/i18n.html
    Have you tried setting the "-Dweblogic.webservice.i18n.charset=utf-8" on
    the client?
    Use the "-Dweblogic.webservice.verbose=true" flag to help diagnose this
    issue. See: http://e-docs.bea.com/wls/docs81/webserv/trouble.html
    Hope this helps,
    Bruce
    Dmitry wrote:
    >
    Hello All,
    I'm running an weblogic application on weblogic 8.1 SP1. The application uses
    UTF-8 data from a mssql database. The problem is that weblogic 8.1 SP1 does not
    show UTF-8 data correctly. I've read docs and found that in order to make sure
    that weblogic's output is in UTF-8 I can configure a weblogic system property
    like that:
    add <Warning> into JAVA_OPTIONS in startweblogic.cmd
    batch file. But during the process of starting it shows me the following:
    <10.10.2003 20:08:50 NOVST> <Warning> <Management> <BEA-141087> <Unrecognized
    pr
    operty: webservice.i18n.charset.>
    I also do not see changes in weblogic's behaviour (IMHO it should add charset=utf-8
    to Content-type header of each response to clients.
    However on weblogic 7.0 SP1 everything works without adding this option, but when
    I add it the server claims again that it's unrecognized and I see no effect in
    the HTTP headers of the server response.
    PLease help me to investigate this issue!
    Thanks for any help
    Dmitry.

  • Version of Os not reflecting in system property

    i have installed 
    im able to see my os version in system information but not in system property please help me to resolve this
    my os version is windows server 2008 sp2 

    Hi,
    Is there any update installed recently? Have you tried to reboot the computer?
    Meanwhile please check the following key:
    HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion
    Compare with a healthy system to see if any value is incorrect. 
    If you have any feedback on our support, please send to [email protected]

  • Setting Derby system property in Sun Application Server batch file

    Hi all,
    I am trying to set up a home directory for my Derby databases other than the default C:\Sun\AppServer\lib that is used when asadmin.bat runs.
    I have found in the derby documentation you can set the derby.system.home System Property using -Dderby.system.home="C:\databases" and I have tried to do this in the asadmin.bat file next to all the other system properties containing the -D option.
    But still no luck, when I load the server using asadmin and check the server log file I can tell the property is not being set. I can also tell its not being set because I can't ping my database connection in the admin console. Any ideas anyone?
    Much appreciated,
    Alman

    Here is what I tried.
    No jndiname works but when I leave the value empy I get the result (see end)
    Properties props = new Properties();
    props.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
    props.put("java.naming.provider.url", "iiop://localhost:3700");
    InitialContext initialContext = new InitialContext(props);
    //queueConnectionFactory = (QueueConnectionFactory) initialContext.lookup( "jms/qschdinfact");
    //queue = (Queue)initialContext.lookup("jms/qschdin");
    Enumeration en = initialContext.listBindings("");
    while(en.hasMoreElements()) {
    Binding b =(Binding)en.nextElement();
    System.out.println(b);
    ServerObject: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    intakefacade: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    commonfacade: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    J2EE_UNIQUE_VALUE_GEN: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    trackfacade: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    hsface: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    DatabaseInformation: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    Realm_Manager: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    SerialContextProvider: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    usergroups: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    intakereporter: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    Help please

  • Setting a system.property twice in a same JVM

    Hello,
    I have got a problem concerning the setting of a system property.
    When I run a first time my program I test a case by setting a system property, that works fine.
    Now I want to change the same property in the same JVM by doing:
    System.setProperties("key","oldvalue");
    System.getProperties("key", "oldvalue"); //I obtain oldvalue
    System.setProperties("key","newvalue");
    System.getProperties("key", "newvalue"); //I obtain newvalueBut apparently it seems the JVM doesn't take the new value of the property even if the getProperty() give me the new value.
    So my question is can I change several times the value of a same property in the same JVM or it is technically not possible?
    I read the tutorial about System and it says :"The setProperties method changes the set of system properties for the current running application "
    Thank you for any assistance

    And I say that it apparently does not work because I run some tests
    to find why my results were wrong even if in setting a new property.Well, one of those tests might be to just check the changed property right after the change.
    Which you do in your code.
    And which results in a correctly changed property, doesn't it?
    So, what are those other tests you've performed, what was it that you've expected them to do and what did they actually do?
    So it is just because if you have initialized the system property once you
    cannot do it again or you have to record the new value in a file and then restart
    your application by take the value of the system property inside the previously created fileNone of both. You can just change the system properties (just like every other properties) and the changes take place immediately (unless you run multithreaded, in which case you should put the "setproperty" stuff into a synchronized block or method.
    Of course, if you try and change the properties of your operating system, then that's different. But I won't start and guess around about what exactly you try to do and what does not work.
    Again, try to state plainly
    1.) what you programmed, perhaps with some line of code
    2.) what you expected your code to do
    3.) what happened instead
    Provided with that information, forum readers should be able to provide you with some help.
    -T-

  • Operational override for write-delay (system-property)

    Hi all,
    I'm failing to get this xml element to validate within a cache config.
    I'm using Coherence 3.7.1
    <write-delay system-property="myproperty.override.write-delay" >10s</write-delay>.
    the idea is to get the write-delay value atruntime through a system-property (-Dmyproperty.override.write-delay=5s for ex.)
    I'm getting the following failure
    Description
    Location
    Type
    cvc-type.3.1.1: Element 'write-delay' is a simple type, so it cannot have attributes, excepting those whose namespace name is identical to 'http://www.w3.org/2001/XMLSchema-instance' and whose [local name] is one of 'type', 'nil', 'schemaLocation' or 'noNamespaceSchemaLocation'. However, the attribute, 'system-property' was found.
    line 41
    XML Problem
    Do you know if the override is valid at that location? The documentation says YES.
    What am I doing wrongly?
    Thanks,
    Harry

    Hello Leo_TA,
    thanks for the answer.
    Actually I need a default value which can be overriden at runtime as described in the documentation
    http://docs.oracle.com/cd/E18686_01/coh.37/e18677/appendix_cacheconfig.htm#BHCECGCF
    This is very handy to move conifguration items outside the cache-config.
    Do you know why the xml woul dnot validate when system-property is used in the write-delay?
    <?xml version="1.0" encoding="UTF-8"?>
    <cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
                  xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config coherence-cache-config.xsd">
    </cache-config>
    Coherence accepts it (when we force no xml validation (removing the xmlns)).
    But I would like to use the xml validation to avoid miss-configurations.
    Regards
    Harry

  • How to get all property names and values of an bean instance at runtime?

    How can I get all property names and values of an bean instance at runtime?
    (The class of the bean instance is dynamic and I can not know before I write the code .)

    Look at Class. It has a way to get at all public methods and attributes.
    If you need to get to private attributes you can do what the Introspector does and expect the methods to follow the Bean pattern and pull the attributes out based upon that. Privates are all hidden from direct access but through the Bean Pattern they can be figured out.

  • Can you set a global EntityResolver (via system property, or static method)

    I'm trying to set a customized EntityResolver (telling the xml parser where to look for XML schema files).
    Usually, you'd use the standard syntax - somehting like:
    SaxParser parser=new SaxParser();
    parser.parser.setEntityResolver(myResolver);
    However, I was wondering whether you can set a "global" EntityResolver, to be used as default for all parsers ?
    Maybe this can be done through some system property, or a static method somewhere in the parsing XML ?
    (BTW, I need it because I'm using some third-party API, that encapsulates a SaxParser, but won't let me access it, so I can't configure it directly).
    thanks.

    I don't think you can.
    What is possible is to set content on the folder resource itself; that would be returned instead of the page you mentioned.

Maybe you are looking for

  • Is it possible to create manually a dump?

    Dear all, I have a question about Dumps created in SAP while programs run with unpredicted errors. I have a specific table defined in the dictionary which has two coloumns progId and path. The first one is a unique identifier given to a program and t

  • File upload in FormDataMultiPart with invalid Chinese filename in MS Window

    Hi, I found a strange problem that for the same file loading code work very well in OSX but not in Windows. The chinese filename get corrupted in Windows but not in OSX. I'm using Jersey 1.9 and the server is running Node.js. Is it a Java problem or

  • Unable to access following endpoint(s) : url...New upgrade to 11g issue.

    [C:\Users\DELL\Desktop\error_description.txt] Dear All, Similar kind of issue is already there in another thread. but that solution is not suitable for this issue. We are migrating our BPEL processes from 10g to 11g. We are facing two critical issues

  • Integrating a non-Portal system via a web service SSO

    Hi all, Hope you could help with this scenario.  There is a request from a client to integrate a non-Portal website into their Portal system via a single-sign on web service.  In particular, 1.  Portal user will see an iView in the Portal with the fo

  • Keyboard on IOS 7

    i have ios 7 and now the keyboard isn't useful ! what is to do? can someone help me ?