WebSphere Application Server & Liberty

 View Only
Expand all | Collapse all

What is the usecase for $(shared.config.dir) and $(shared.resource.dir) directories in Liberty?

  • 1.  What is the usecase for $(shared.config.dir) and $(shared.resource.dir) directories in Liberty?

    IBM Champion
    Posted Thu January 26, 2023 10:55 AM
    I'm wondering what the use case(s) for the $(shared.config.dir) and $(shared.resource.dir)  directories n the Liberty directory tree are? The documentation at https://www.ibm.com/docs/en/was-liberty/base?topic=liberty-directory-locations-properties states that these are used for shared config  configuration files and shared resource definitions but these directories are obviously not used when building the server configuration dynamically.
    So I'd appreciate if someone could give me some use cases for the usage of these directories.

    Thanks, Hermann

    ------------------------------
    Hermann Huebler
    2innovate IT Consulting GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------


  • 2.  RE: What is the usecase for $(shared.config.dir) and $(shared.resource.dir) directories in Liberty?

    Posted Fri January 27, 2023 05:47 AM
    Hi, When I help customers I use these directories.  The $(shared.config.dir) I use for common configs, like ldap settings, collective files.  The $(shared.resource.dir) I use for a common keystore/truststore, add sub directories for DBs, MQ, other common libraries, so that the drivers only need to updated in 1 place.

    Brian


    ------------------------------
    Brian S Paskin
    Sr. Technology Engineer
    IBM Cloud Engineering
    ------------------------------



  • 3.  RE: What is the usecase for $(shared.config.dir) and $(shared.resource.dir) directories in Liberty?

    Posted Fri January 27, 2023 10:39 AM
    The names and the structure reflect use cases where the Liberty install is "shared" by more than one server.    If you're running a container image with a single app deployed to a single server, there wouldn't be the same value as there would in a multi-server install.  On the other hand, you might still it convenient to copy/paste config elements using the built-in directory properties like "shared.resource.dir"... and you can certainly still use them if you find it convenient.

    There's overlap too when using the Liberty Maven/Gradle plugins (like the Guide samples do: https://openliberty.io/guides/) to install and manage your server from within the build directory.  The Liberty install lifecycle here, too, is typically scoped to a single app, so there's nothing to "share"... but again, you may still find it convenient and can use these locations.

    ------------------------------
    Scott Kurz
    ------------------------------