<div dir="ltr">Yeah - that must be it thanks! </div><div class="gmail_extra"><br><div class="gmail_quote">On 13 December 2016 at 13:46, Brian Stansberry <span dir="ltr"><<a href="mailto:brian.stansberry@redhat.com" target="_blank">brian.stansberry@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Great. :)<br>
<br>
It looks like the TransactionSubsystemRootResour<wbr>ceDefinition$<wbr>StatisticsEnabledHandler logic came in about a month ago. The issue may have surfaced more recently than that if the test that revealed it was not part of CI, but was something extended that Red Hat QE runs against periodic internal builds. Those happen every few weeks.<br>
<div class="HOEnZb"><div class="h5"><br>
> On Dec 13, 2016, at 5:55 AM, Tom Jenkinson <<a href="mailto:tom.jenkinson@redhat.com">tom.jenkinson@redhat.com</a>> wrote:<br>
><br>
> Yeah, moving the lookup to the area you mentioned worked - thanks again!<br>
><br>
> On 13 December 2016 at 10:54, Tom Jenkinson <<a href="mailto:tom.jenkinson@redhat.com">tom.jenkinson@redhat.com</a>> wrote:<br>
> 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.<br>
><br>
> On 12 December 2016 at 21:33, Brian Stansberry <<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>> wrote:<br>
><br>
> > On Dec 12, 2016, at 3:21 PM, Brian Stansberry <<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>> wrote:<br>
> ><br>
> > 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>
> ><br>
><br>
> 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>
><br>
> > "ServerService Thread Pool -- 21@3635" prio=5 tid=0x30 nid=NA runnable<br>
> > java.lang.Thread.State: RUNNABLE<br>
> > at com.arjuna.common.util.<wbr>propertyservice.<wbr>PropertiesFactory.<wbr>initPropertiesFactory(<wbr>PropertiesFactory.java:53)<br>
> > - locked <0x1389> (a java.lang.Class)<br>
> > at com.arjuna.common.util.<wbr>propertyservice.<wbr>PropertiesFactory.<wbr>getDefaultProperties(<wbr>PropertiesFactory.java:36)<br>
> > at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>getNamedInstance(<wbr>BeanPopulator.java:86)<br>
> > at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>getDefaultInstance(<wbr>BeanPopulator.java:53)<br>
> > at com.arjuna.ats.arjuna.common.<wbr>arjPropertyManager.<wbr>getCoordinatorEnvironmentBean(<wbr>arjPropertyManager.java:51)<br>
> > at org.jboss.as.txn.subsystem.<wbr>TransactionSubsystemRootResour<wbr>ceDefinition$<wbr>StatisticsEnabledHandler.<<wbr>init>(<wbr>TransactionSubsystemRootResour<wbr>ceDefinition.java:518)<br>
> > at org.jboss.as.txn.subsystem.<wbr>TransactionSubsystemRootResour<wbr>ceDefinition.<wbr>registerAttributes(<wbr>TransactionSubsystemRootResour<wbr>ceDefinition.java:314)<br>
> > at org.jboss.as.controller.<wbr>registry.NodeSubregistry.<wbr>registerChild(NodeSubregistry.<wbr>java:104)<br>
> > at org.jboss.as.controller.<wbr>registry.<wbr>ConcreteResourceRegistration.<wbr>registerSubModel(<wbr>ConcreteResourceRegistration.<wbr>java:225)<br>
> > at org.jboss.as.controller.<wbr>extension.ExtensionRegistry$<wbr>SubsystemRegistrationImpl.<wbr>registerSubsystemModel(<wbr>ExtensionRegistry.java:706)<br>
> > at org.jboss.as.txn.subsystem.<wbr>TransactionExtension.<wbr>initialize(<wbr>TransactionExtension.java:104)<br>
> > at org.jboss.as.controller.<wbr>extension.ExtensionAddHandler.<wbr>initializeExtension(<wbr>ExtensionAddHandler.java:131)<br>
> > at org.jboss.as.controller.<wbr>extension.ExtensionAddHandler.<wbr>initializeExtension(<wbr>ExtensionAddHandler.java:104)<br>
> > at org.jboss.as.controller.<wbr>extension.<wbr>ParallelExtensionAddHandler$<wbr>ExtensionInitializeTask.call(<wbr>ParallelExtensionAddHandler.<wbr>java:144)<br>
> > at org.jboss.as.controller.<wbr>extension.<wbr>ParallelExtensionAddHandler$<wbr>ExtensionInitializeTask.call(<wbr>ParallelExtensionAddHandler.<wbr>java:127)<br>
> > at java.util.concurrent.<wbr>FutureTask.run(FutureTask.<wbr>java:266)<br>
> > at java.util.concurrent.<wbr>ThreadPoolExecutor.runWorker(<wbr>ThreadPoolExecutor.java:1142)<br>
> > at java.util.concurrent.<wbr>ThreadPoolExecutor$Worker.run(<wbr>ThreadPoolExecutor.java:617)<br>
> > at java.lang.Thread.run(Thread.<wbr>java:745)<br>
> > at org.jboss.threads.JBossThread.<wbr>run(JBossThread.java:320)<br>
> ><br>
> ><br>
> >> On Dec 12, 2016, at 2:50 PM, Tom Jenkinson <<a href="mailto:tom.jenkinson@redhat.com">tom.jenkinson@redhat.com</a>> wrote:<br>
> >><br>
> >> Thanks for the input/<br>
> >><br>
> >> This is the point I do not think the property has been set by:<br>
> >><br>
> >> "MSC service thread 1-3@2595" prio=5 tid=0x14 nid=NA runnable<br>
> >> java.lang.Thread.State: RUNNABLE<br>
> >> at com.arjuna.ats.arjuna.common.<wbr>RecoveryEnvironmentBean.<wbr>getExpiryScannerClassNames(<wbr>RecoveryEnvironmentBean.java:<wbr>336)<br>
> >> - locked <0x1bb6> (a com.arjuna.ats.arjuna.common.<wbr>RecoveryEnvironmentBean)<br>
> >> at sun.reflect.<wbr>NativeMethodAccessorImpl.<wbr>invoke0(<wbr>NativeMethodAccessorImpl.java:<wbr>-1)<br>
> >> at sun.reflect.<wbr>NativeMethodAccessorImpl.<wbr>invoke(<wbr>NativeMethodAccessorImpl.java:<wbr>62)<br>
> >> at sun.reflect.<wbr>DelegatingMethodAccessorImpl.<wbr>invoke(<wbr>DelegatingMethodAccessorImpl.<wbr>java:43)<br>
> >> at java.lang.reflect.Method.<wbr>invoke(Method.java:498)<br>
> >> at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>handleGroupProperty(<wbr>BeanPopulator.java:263)<br>
> >> at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>configureFromProperties(<wbr>BeanPopulator.java:170)<br>
> >> at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>getNamedInstance(<wbr>BeanPopulator.java:87)<br>
> >> at com.arjuna.common.internal.<wbr>util.propertyservice.<wbr>BeanPopulator.<wbr>getDefaultInstance(<wbr>BeanPopulator.java:53)<br>
> >> at com.arjuna.ats.arjuna.common.<wbr>recoveryPropertyManager.<wbr>getRecoveryEnvironmentBean(<wbr>recoveryPropertyManager.java:<wbr>34)<br>
> >> at org.jboss.as.txn.service.<wbr>ArjunaRecoveryManagerService.<wbr>start(<wbr>ArjunaRecoveryManagerService.<wbr>java:96)<br>
> >> - locked <0x1bd2> (a org.jboss.as.txn.service.<wbr>ArjunaRecoveryManagerService)<br>
> >> at org.jboss.msc.service.<wbr>ServiceControllerImpl$<wbr>StartTask.startService(<wbr>ServiceControllerImpl.java:<wbr>1963)<br>
> >> at org.jboss.msc.service.<wbr>ServiceControllerImpl$<wbr>StartTask.run(<wbr>ServiceControllerImpl.java:<wbr>1896)<br>
> >> at java.util.concurrent.<wbr>ThreadPoolExecutor.runWorker(<wbr>ThreadPoolExecutor.java:1142)<br>
> >> at java.util.concurrent.<wbr>ThreadPoolExecutor$Worker.run(<wbr>ThreadPoolExecutor.java:617)<br>
> >> at java.lang.Thread.run(Thread.<wbr>java:745)<br>
> >><br>
> >> (that is output from the debugger)<br>
> >><br>
> >> Once releasing that thread and letting the container continue startup I see this execute:<br>
> >> 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 [("system-property" => "RecoveryEnvironmentBean.<wbr>expiryScannerClassNames")] is {"outcome" => "success"}<br>
> >> 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 [("system-property" => "RecoveryEnvironmentBean.<wbr>expiryScannerClassNames")] is {"outcome" => "success"}<br>
> >><br>
> >> 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's possible that there is a regression in Narayana (somehow) if nothing changed in this area in the core itself.<br>
> >><br>
> >> Thanks for your input,<br>
> >> Tom<br>
> >><br>
> >><br>
> >><br>
> >><br>
> >> On 12 December 2016 at 20:15, Brian Stansberry <<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>> wrote:<br>
> >> This works fine for me. Adding that xml snippet to standalone.xml after the <extensions> element I see the property being set during boot before any processing of subsystem operations begins.<br>
> >><br>
> >>> On Dec 12, 2016, at 1:55 PM, Brian Stansberry <<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>> wrote:<br>
> >>><br>
> >>> 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>
> >>><br>
> >>>> On Dec 12, 2016, at 12:10 PM, Kabir Khan <<a href="mailto:kabir.khan@jboss.com">kabir.khan@jboss.com</a>> wrote:<br>
> >>>><br>
> >>>> Where are you trying to use the system property from? They should only be attempted resolved during the RUNTIME stage, not MODEL.<br>
> >>>>> On 12 Dec 2016, at 18:00, Tom Jenkinson <<a href="mailto:tom.jenkinson@redhat.com">tom.jenkinson@redhat.com</a>> wrote:<br>
> >>>>><br>
> >>>>> Hi,<br>
> >>>>><br>
> >>>>> I have a subsystem that configures itself from system properties.<br>
> >>>>><br>
> >>>>> For example:<br>
> >>>>> <system-properties><br>
> >>>>> <property name="RecoveryEnvironmentBean.<wbr>expiryScannerClassNames" value="com.arjuna.ats.<wbr>internal.arjuna.recovery.<wbr>ExpiredTransactionStatusManage<wbr>rScanner com.arjuna.ats.internal.<wbr>arjuna.recovery.<wbr>AtomicActionExpiryScanner"/><br>
> >>>>> </system-properties><br>
> >>>>><br>
> >>>>> 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 "MSC service thread 1-4" 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>
> >>>>><br>
> >>>>> 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 [("system-property" => "RecoveryEnvironmentBean.<wbr>expiryScannerClassNames")] is {"outcome" => "success"}<br>
> >>>>> 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 [("system-property" => "RecoveryEnvironmentBean.<wbr>expiryScannerClassNames")] is {"outcome" => "success"}<br>
> >>>>><br>
> >>>>> Does my subsystem need to depend on something to get the old behaviour of being started after system properties are processed?<br>
> >>>>><br>
> >>>>> My subsystem is the transaction one and the service is the recovery manager.<br>
> >>>>><br>
> >>>>> Thanks!<br>
> >>>>> Tom<br>
> >>>>> ______________________________<wbr>_________________<br>
> >>>>> wildfly-dev mailing list<br>
> >>>>> <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
> >>>>> <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>
> >>>> ______________________________<wbr>_________________<br>
> >>>> wildfly-dev mailing list<br>
> >>>> <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
> >>>> <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>
> >>><br>
> >>> ______________________________<wbr>_________________<br>
> >>> wildfly-dev mailing list<br>
> >>> <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
> >>> <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>
> >><br>
> >> ______________________________<wbr>_________________<br>
> >> wildfly-dev mailing list<br>
> >> <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
> >> <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>
> > --<br>
> > Brian Stansberry<br>
> > Manager, Senior Principal Software Engineer<br>
> > JBoss by Red Hat<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > wildfly-dev mailing list<br>
> > <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
> > <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>
><br>
><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>