<div dir="ltr">Thanks, I will take a look. Did this change recently? If not I am at a loss why it is starting to fail an existing test.</div><div class="gmail_extra"><br><div class="gmail_quote">On 12 December 2016 at 21:33, Brian Stansberry <span dir="ltr">&lt;<a href="mailto:brian.stansberry@redhat.com" target="_blank">brian.stansberry@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; On Dec 12, 2016, at 3:21 PM, Brian Stansberry &lt;<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt; This is the problem: the TransactionExtension initialize method of touching classes that result in doing static initialization stuff that reads the system props at that point, which is too early:<br>
&gt;<br>
<br>
</span>s/of touching/is touching/g<br>
<br>
A likely fix is to just not store a ref to coordinatorEnvironmentBean in TransactionSubsystemRootResour<wbr>ceDefinition$<wbr>StatisticsEnabledHandler. Just find it and use it in applyUpdateToRuntime/<wbr>revertUpdateToRuntime neither of which will get called before system properties are set. They don’t get called at all if the user doesn’t do a write-attribute op to change that attribute.<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; &quot;ServerService Thread Pool -- 21@3635&quot; prio=5 tid=0x30 nid=NA runnable<br>
&gt;  java.lang.Thread.State: RUNNABLE<br>
&gt;         at com.arjuna.common.util.<wbr>propertyservice.<wbr>PropertiesFactory.<wbr>initPropertiesFactory(<wbr>PropertiesFactory.java:53)<br>
&gt;         - locked &lt;0x1389&gt; (a java.lang.Class)<br>
&gt;         at com.arjuna.common.util.<wbr>propertyservice.<wbr>PropertiesFactory.<wbr>getDefaultProperties(<wbr>PropertiesFactory.java:36)<br>
&gt;         at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>getNamedInstance(<wbr>BeanPopulator.java:86)<br>
&gt;         at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>getDefaultInstance(<wbr>BeanPopulator.java:53)<br>
&gt;         at com.arjuna.ats.arjuna.common.<wbr>arjPropertyManager.<wbr>getCoordinatorEnvironmentBean(<wbr>arjPropertyManager.java:51)<br>
&gt;         at org.jboss.as.txn.subsystem.<wbr>TransactionSubsystemRootResour<wbr>ceDefinition$<wbr>StatisticsEnabledHandler.&lt;<wbr>init&gt;(<wbr>TransactionSubsystemRootResour<wbr>ceDefinition.java:518)<br>
&gt;         at org.jboss.as.txn.subsystem.<wbr>TransactionSubsystemRootResour<wbr>ceDefinition.<wbr>registerAttributes(<wbr>TransactionSubsystemRootResour<wbr>ceDefinition.java:314)<br>
&gt;         at org.jboss.as.controller.<wbr>registry.NodeSubregistry.<wbr>registerChild(NodeSubregistry.<wbr>java:104)<br>
&gt;         at org.jboss.as.controller.<wbr>registry.<wbr>ConcreteResourceRegistration.<wbr>registerSubModel(<wbr>ConcreteResourceRegistration.<wbr>java:225)<br>
&gt;         at org.jboss.as.controller.<wbr>extension.ExtensionRegistry$<wbr>SubsystemRegistrationImpl.<wbr>registerSubsystemModel(<wbr>ExtensionRegistry.java:706)<br>
&gt;         at org.jboss.as.txn.subsystem.<wbr>TransactionExtension.<wbr>initialize(<wbr>TransactionExtension.java:104)<br>
&gt;         at org.jboss.as.controller.<wbr>extension.ExtensionAddHandler.<wbr>initializeExtension(<wbr>ExtensionAddHandler.java:131)<br>
&gt;         at org.jboss.as.controller.<wbr>extension.ExtensionAddHandler.<wbr>initializeExtension(<wbr>ExtensionAddHandler.java:104)<br>
&gt;         at org.jboss.as.controller.<wbr>extension.<wbr>ParallelExtensionAddHandler$<wbr>ExtensionInitializeTask.call(<wbr>ParallelExtensionAddHandler.<wbr>java:144)<br>
&gt;         at org.jboss.as.controller.<wbr>extension.<wbr>ParallelExtensionAddHandler$<wbr>ExtensionInitializeTask.call(<wbr>ParallelExtensionAddHandler.<wbr>java:127)<br>
&gt;         at java.util.concurrent.<wbr>FutureTask.run(FutureTask.<wbr>java:266)<br>
&gt;         at java.util.concurrent.<wbr>ThreadPoolExecutor.runWorker(<wbr>ThreadPoolExecutor.java:1142)<br>
&gt;         at java.util.concurrent.<wbr>ThreadPoolExecutor$Worker.run(<wbr>ThreadPoolExecutor.java:617)<br>
&gt;         at java.lang.Thread.run(Thread.<wbr>java:745)<br>
&gt;         at org.jboss.threads.JBossThread.<wbr>run(JBossThread.java:320)<br>
&gt;<br>
&gt;<br>
&gt;&gt; On Dec 12, 2016, at 2:50 PM, Tom Jenkinson &lt;<a href="mailto:tom.jenkinson@redhat.com">tom.jenkinson@redhat.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Thanks for the input/<br>
&gt;&gt;<br>
&gt;&gt; This is the point I do not think the property has been set by:<br>
&gt;&gt;<br>
&gt;&gt; &quot;MSC service thread 1-3@2595&quot; prio=5 tid=0x14 nid=NA runnable<br>
&gt;&gt;  java.lang.Thread.State: RUNNABLE<br>
&gt;&gt;        at com.arjuna.ats.arjuna.common.<wbr>RecoveryEnvironmentBean.<wbr>getExpiryScannerClassNames(<wbr>RecoveryEnvironmentBean.java:<wbr>336)<br>
&gt;&gt;        - locked &lt;0x1bb6&gt; (a com.arjuna.ats.arjuna.common.<wbr>RecoveryEnvironmentBean)<br>
&gt;&gt;        at sun.reflect.<wbr>NativeMethodAccessorImpl.<wbr>invoke0(<wbr>NativeMethodAccessorImpl.java:<wbr>-1)<br>
&gt;&gt;        at sun.reflect.<wbr>NativeMethodAccessorImpl.<wbr>invoke(<wbr>NativeMethodAccessorImpl.java:<wbr>62)<br>
&gt;&gt;        at sun.reflect.<wbr>DelegatingMethodAccessorImpl.<wbr>invoke(<wbr>DelegatingMethodAccessorImpl.<wbr>java:43)<br>
&gt;&gt;        at java.lang.reflect.Method.<wbr>invoke(Method.java:498)<br>
&gt;&gt;        at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>handleGroupProperty(<wbr>BeanPopulator.java:263)<br>
&gt;&gt;        at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>configureFromProperties(<wbr>BeanPopulator.java:170)<br>
&gt;&gt;        at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>getNamedInstance(<wbr>BeanPopulator.java:87)<br>
&gt;&gt;        at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>getDefaultInstance(<wbr>BeanPopulator.java:53)<br>
&gt;&gt;        at com.arjuna.ats.arjuna.common.<wbr>recoveryPropertyManager.<wbr>getRecoveryEnvironmentBean(<wbr>recoveryPropertyManager.java:<wbr>34)<br>
&gt;&gt;        at org.jboss.as.txn.service.<wbr>ArjunaRecoveryManagerService.<wbr>start(<wbr>ArjunaRecoveryManagerService.<wbr>java:96)<br>
&gt;&gt;        - locked &lt;0x1bd2&gt; (a org.jboss.as.txn.service.<wbr>ArjunaRecoveryManagerService)<br>
&gt;&gt;        at org.jboss.msc.service.<wbr>ServiceControllerImpl$<wbr>StartTask.startService(<wbr>ServiceControllerImpl.java:<wbr>1963)<br>
&gt;&gt;        at org.jboss.msc.service.<wbr>ServiceControllerImpl$<wbr>StartTask.run(<wbr>ServiceControllerImpl.java:<wbr>1896)<br>
&gt;&gt;        at java.util.concurrent.<wbr>ThreadPoolExecutor.runWorker(<wbr>ThreadPoolExecutor.java:1142)<br>
&gt;&gt;        at java.util.concurrent.<wbr>ThreadPoolExecutor$Worker.run(<wbr>ThreadPoolExecutor.java:617)<br>
&gt;&gt;        at java.lang.Thread.run(Thread.<wbr>java:745)<br>
&gt;&gt;<br>
&gt;&gt; (that is output from the debugger)<br>
&gt;&gt;<br>
&gt;&gt; Once releasing that thread and letting the container continue startup I see this execute:<br>
&gt;&gt; 2016-12-12 20:46:49,731 TRACE [org.jboss.as.controller.<wbr>management-operation] (Controller Boot Thread) Final response for step handler org.jboss.as.server.<wbr>operations.<wbr>SystemPropertyAddHandler@<wbr>5c7e7735 handling add in address [(&quot;system-property&quot; =&gt; &quot;RecoveryEnvironmentBean.<wbr>expiryScannerClassNames&quot;)] is {&quot;outcome&quot; =&gt; &quot;success&quot;}<br>
&gt;&gt; 2016-12-12 20:46:49,787 TRACE [org.jboss.as.controller.<wbr>management-operation] (Controller Boot Thread) Final response for step handler org.jboss.as.controller.<wbr>ValidateModelStepHandler@<wbr>f15c8f7 handling internal-model-validation in address [(&quot;system-property&quot; =&gt; &quot;RecoveryEnvironmentBean.<wbr>expiryScannerClassNames&quot;)] is {&quot;outcome&quot; =&gt; &quot;success&quot;}<br>
&gt;&gt;<br>
&gt;&gt; I believe this is different to previous behaviour as I have had a defect raised against TX: <a href="https://issues.jboss.org/browse/JBEAP-7820" rel="noreferrer" target="_blank">https://issues.jboss.org/<wbr>browse/JBEAP-7820</a>. It&#39;s possible that there is a regression in Narayana (somehow) if nothing changed in this area in the core itself.<br>
&gt;&gt;<br>
&gt;&gt; Thanks for your input,<br>
&gt;&gt; Tom<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 12 December 2016 at 20:15, Brian Stansberry &lt;<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>&gt; wrote:<br>
&gt;&gt; This works fine for me. Adding that xml snippet to standalone.xml after the &lt;extensions&gt; element I see the property being set during boot before any processing of subsystem operations begins.<br>
&gt;&gt;<br>
&gt;&gt;&gt; On Dec 12, 2016, at 1:55 PM, Brian Stansberry &lt;<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I don’t see anything in the organization of boot ops that would have changed the ordering, and the add op for that system property should be executing prior to the subsystem ops. I’ll see if I can reproduce.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Dec 12, 2016, at 12:10 PM, Kabir Khan &lt;<a href="mailto:kabir.khan@jboss.com">kabir.khan@jboss.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Where are you trying to use the system property from? They should only be attempted resolved during the RUNTIME stage, not MODEL.<br>
&gt;&gt;&gt;&gt;&gt; On 12 Dec 2016, at 18:00, Tom Jenkinson &lt;<a href="mailto:tom.jenkinson@redhat.com">tom.jenkinson@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; I have a subsystem that configures itself from system properties.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; For example:<br>
&gt;&gt;&gt;&gt;&gt; &lt;system-properties&gt;<br>
&gt;&gt;&gt;&gt;&gt; &lt;property name=&quot;RecoveryEnvironmentBean.<wbr>expiryScannerClassNames&quot; value=&quot;com.arjuna.ats.<wbr>internal.arjuna.recovery.<wbr>ExpiredTransactionStatusManage<wbr>rScanner com.arjuna.ats.internal.<wbr>arjuna.recovery.<wbr>AtomicActionExpiryScanner&quot;/&gt;<br>
&gt;&gt;&gt;&gt;&gt; &lt;/system-properties&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; In earlier revisions of WFLY this worked fine. However I am now seeing that the system property is not set until after my subsystem has started. I can tell this as I have breakpoints on where I process the property. I can see &quot;MSC service thread 1-4&quot; attempting to process the property (which is not set). I do later see messages that suggest the system property is set but at that the later point:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 2016-12-12 17:57:48,042 TRACE [org.jboss.as.controller.<wbr>management-operation] (Controller Boot Thread) Final response for step handler org.jboss.as.server.<wbr>operations.<wbr>SystemPropertyAddHandler@<wbr>784c8c5f handling add in address [(&quot;system-property&quot; =&gt; &quot;RecoveryEnvironmentBean.<wbr>expiryScannerClassNames&quot;)] is {&quot;outcome&quot; =&gt; &quot;success&quot;}<br>
&gt;&gt;&gt;&gt;&gt; 2016-12-12 17:57:48,093 TRACE [org.jboss.as.controller.<wbr>management-operation] (Controller Boot Thread) Final response for step handler org.jboss.as.controller.<wbr>ValidateModelStepHandler@<wbr>87b4493 handling internal-model-validation in address [(&quot;system-property&quot; =&gt; &quot;RecoveryEnvironmentBean.<wbr>expiryScannerClassNames&quot;)] is {&quot;outcome&quot; =&gt; &quot;success&quot;}<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Does my subsystem need to depend on something to get the old behaviour of being started after system properties are processed?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; My subsystem is the transaction one and the service is the recovery manager.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Thanks!<br>
&gt;&gt;&gt;&gt;&gt; Tom<br>
&gt;&gt;&gt;&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt;&gt;&gt;&gt; wildfly-dev mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/wildfly-dev</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt;&gt;&gt; wildfly-dev mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/wildfly-dev</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Brian Stansberry<br>
&gt;&gt;&gt; Manager, Senior Principal Software Engineer<br>
&gt;&gt;&gt; JBoss by Red Hat<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt;&gt; wildfly-dev mailing list<br>
&gt;&gt;&gt; <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/wildfly-dev</a><br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Brian Stansberry<br>
&gt;&gt; Manager, Senior Principal Software Engineer<br>
&gt;&gt; JBoss by Red Hat<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; wildfly-dev mailing list<br>
&gt;&gt; <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/wildfly-dev</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Brian Stansberry<br>
&gt; Manager, Senior Principal Software Engineer<br>
&gt; JBoss by Red Hat<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; wildfly-dev mailing list<br>
&gt; <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/wildfly-dev</a><br>
<br>
--<br>
Brian Stansberry<br>
Manager, Senior Principal Software Engineer<br>
JBoss by Red Hat<br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>