ops4j / org.ops4j.pax.transx

Transaction Manager and JMS / JDBC pooling support
Apache License 2.0
9 stars 7 forks source link

Implement "requireConfigAdminConfig" as in pax-url-aether [PAXTRANSX-1] #35

Closed grgrzybek closed 6 years ago

grgrzybek commented 6 years ago

Grzegorz Grzybek created PAXTRANSX-1

When pax-transx-tm-narayana starts, it may configure internal org.jboss.narayana.osgi.jta.internal.OsgiServer with empty properties. This default configuration creates directories in $KARAF_HOME (see com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean):

private volatile String objectStoreDir = System.getProperty("user.dir") + File.separator + "ObjectStore";

Fixed in: 0.3.0 Votes: 0, Watches: 1

grgrzybek commented 6 years ago

Grzegorz Grzybek commented

Having single property available via org.osgi.framework.BundleContext#getProperty(), e.g., using ${karaf.etc}/config.properties:

org.ops4j.pax.transx.requireConfigAdminConfig = true

We can prevent starting for example Narayana with default configuration values. We'll be seeing this in logs:

2018-04-13 09:29:14,302 INFO  {features-3-thread-1} [org.ops4j.pax.logging.log4j2.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.log()] (PaxLoggingServiceImpl.java:393) : Skipping reconfiguration in activator. Configuration is empty, awaiting ConfigAdmin configuration.
grgrzybek commented 6 years ago

Grzegorz Grzybek commented

Fixed here in https://github.com/ops4j/org.ops4j.pax.transx/commits/master