<div dir="ltr">Cool I will look it up and get back to you if I'm stuck. Thank you for your help David.<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br></div><div dir="ltr">Thanks</div></div><div>./Sam</div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 15, 2018 at 10:55 PM David Lloyd <<a href="mailto:david.lloyd@redhat.com">david.lloyd@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have a look at the static initializer of the org.jboss.modules.Module<br>
class. If you extracted the computation of those two fields to a<br>
method, and then made the fields volatile, you would be able to<br>
re-call the method whenever you've updated the system property.<br>
<br>
The fields are consulted on each class lookup so changes should take<br>
effect immediately.<br>
On Thu, Nov 15, 2018 at 10:57 AM Sam Thomas <<a href="mailto:sam.thomas@broadcom.com" target="_blank">sam.thomas@broadcom.com</a>> wrote:<br>
><br>
> Hi David,<br>
><br>
> Can you point me to that field(the class as well) that stores these values? I assume just changing the value(after making the field mutable) to include additional classes isn’t going to be enough?<br>
><br>
> Thanks<br>
> ./Sam<br>
><br>
> On Thu, Nov 15, 2018 at 8:22 PM David Lloyd <<a href="mailto:david.lloyd@redhat.com" target="_blank">david.lloyd@redhat.com</a>> wrote:<br>
>><br>
>> On Thu, Nov 15, 2018 at 8:38 AM Sam Thomas <<a href="mailto:sam.thomas@broadcom.com" target="_blank">sam.thomas@broadcom.com</a>> wrote:<br>
>> > Hi guys!<br>
>> ><br>
>> > When an agent starts up with the JVM (through premain()) we can specify in the command to start up jboss, classes to be added to jboss system packages by setting the above property.<br>
>> ><br>
>> > I am looking to replicate the effect of setting that system property after jboss has started up, i.e, an agent will be loaded through agentmain() after jboss is up and running.<br>
>><br>
>> At present, these values are calculated when JBoss Modules starts up<br>
>> and stored in a constant field. So to change that exact mechanism<br>
>> with one which can be reloaded would require that the field be made<br>
>> mutable and that an operation be added which recomputes that field.<br>
>> This is to say that it is possible, but the current code doesn't do<br>
>> that.<br>
>><br>
>> --<br>
>> - DML<br>
><br>
> --<br>
><br>
> Thanks<br>
> ./Sam<br>
<br>
<br>
<br>
-- <br>
- DML<br>
</blockquote></div>