Chris, Am 27.05.24 um 15:51 schrieb Christopher Schultz:
Rémy,On 5/22/24 06:14, Rémy Maucherat wrote:On Wed, May 22, 2024 at 9:06 AM Mark Thomas <ma...@apache.org> wrote:On 21/05/2024 18:50, Christopher Schultz wrote: <snip/>1. Allow ServiceBindingPropertySource to use the SERVICE_BINDING_ROOT environment variable *or* a system property with an appropriate name such as service.binding.root, with the system property overriding the environment variable.Seems reasonable to me but keep in mind I've never used this code.I haven't either, it's been contributed. I don't really understand why the change overall, Kube uses the environment and never the system properties.I'd like to use this feature without Kubernetes.2. Have ServiceBindingPropertySource fall-back to system property resolution if no matching file is found. Maybe we should do this with all PropertySource classes provided by Tomcat?My reading of the docs and the code is that SystemPropertySource is always added already.Yes, SystemPropertySource is added. Does it not work properly ?Sorry, I didn't actually try it. I didn't see anything in the PropertySource code for that... maybe it's part of the Digester configuration. Happy to hear this should be the way things work already.
That code is in the constructor of Digester.java. You could even use EnvironmentPropertySource and ServiceBindingPropertySource in combination.
Regards Felix
3. If the SERVICE_BINDING_ROOT environment variable is being used, copyits value into a system property. This will allow application software or Tomcat itself to use the file reference as necessary. For example:Again seems reasonable to me but same caveat as above.The resolution should work as it is already given the javadocs from ServiceBindingPropertySource. At this point it would seem easier to simply add -Dservice.binding.root=${SERVICE_BINDING_ROOT} to the Catalina options.This is absolutely doable at the code of a longer JVM launch command-line. Also, lots of people are using Spring Boot or other embedded launchers where modifying the command-line is either difficult, discouraged, or simple non-standard.-chris --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
OpenPGP_0xEA6C3728EA91C4AF.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature