Open Sanne opened 3 years ago
I don't work in the Narayana team any more, so I cannot say if this would be acceptable or not. Although this does sound reasonable and we have exactly the same issue in the Narayana Spring Boot starter. Maybe @mmusgrov could provide some input?
oops, sorry Gytis :) I remember now, old habits.
This could be partially related to https://github.com/quarkusio/quarkus/issues/6654
@ochaloup yes, I think it could be interesting to dedicate some days to review the Narayana bootstrap process as a whole.
I'd suggest take a baseline metric of bootstrap efficiency, and try to improve on it - both in terms of speed and (native) memory. XML parsing, Loading of XML parsers, filesystem loading and resource loading are all just implementation details of the same problem - I'm sure you might be able to find other improvements in the area if you happen to be able to zoom into the process :)
Description I noticed the that the Narayana bootstrap process is looking in many places to try find its default configuration settings, to allow for a lot of flexibility about where such files can be stored. IMO such flexibility is maybe necessary in other systems, but it's a non-feature in Quarkus as it conflicts with our principles.
For example, I just observed it looking into
/opt/jdk1.8.0_211/jre/jbossts-properties.xml
, and to do so it first had to also crawl environment variables to figure out were I'm having my JDKs.This should have a single place to look into for its default settings - and I think this should be represented as Java code, as a constant. Configuration overrides should be controlled by our central standardized configuration file
application.properties
, and nothing else.Why?
application.properties
Implementation ideas This is all performed by the
com.arjuna.common.util.propertyservice.FileLocator
. One solution could be to allow plugging in a simplifiedFileLocator
implementation; but I think we could take it a step further and not need any of the code inAbstractPropertiesFactory
? Ideally use a different PropertiesFactory which has hardcoded defaults, or maybe it'sBeanPopulator
which could use a bytecode-generated implementation via Gizmo?@gytis WDYT ?