Topic
3 replies Latest Post - ‏2012-09-24T12:11:49Z by Jacek_Laskowski
alicinar
alicinar
5 Posts
ACCEPTED ANSWER

Pinned topic Liberty profile Custom Properties

‏2012-09-24T09:15:15Z |
Hello again,
How do I add a liberty profile in jvm custom properties?

Example:
System.getProperty("TEST");
  • SystemAdmin
    SystemAdmin
    590 Posts
    ACCEPTED ANSWER

    Re: Liberty profile Custom Properties

    ‏2012-09-24T09:37:34Z  in response to alicinar
    The JVM command line options can be placed in a jvm.options file located in either the wlp/etc directory or the server configuration directory. Each line in this file is a different JVM command line option. To define the property shown below you would create a jvm.options file with the following content:

    -DTEST=myvalue

    This is documented in the product infocenter here: http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-base-dist&topic=twlp_admin_customvars
    • alicinar
      alicinar
      5 Posts
      ACCEPTED ANSWER

      Re: Liberty profile Custom Properties

      ‏2012-09-24T10:36:37Z  in response to SystemAdmin
      Himm.Ok.
      Thanks Alasdair.
  • Jacek_Laskowski
    Jacek_Laskowski
    133 Posts
    ACCEPTED ANSWER

    Re: Liberty profile Custom Properties

    ‏2012-09-24T12:11:49Z  in response to alicinar
    Hi,

    I think using JNDI bindings would make the application a bit more manageable, esp. when you think to move to other application server, e.g. the full WebSphere AS, once the application is fully tested and ready for production (it's not to say Liberty Profile is not ready to host production applications, just point out an option only). Don't develop your applications based on JVM properties.

    See Using @Resource to access JNDI in WebSphere AS 8.5 Liberty Profile for more guidance.

    Jacek
    Japila :: verba docent, exempla trahunt