-
Feature Request
-
Resolution: Done
-
Minor
-
JBossAS-4.0.1 Final
-
None
-
None
In the following sample of an MBean the StringPropertyReplacer is not applied for the
values needed in the constructor.
<mbean code="org.jboss.security.plugins.JaasSecurityDomain"
name="jboss.security:service=JaasSecurityDomain,domain=RMI+SSL">
<constructor>
<arg type="java.lang.String" value="${my.domain.name}" />
</constructor>
<attribute name="KeyStoreURL">myKeys.ks</attribute>
<attribute name="KeyStorePass">tryIt</attribute>
</mbean>
In this sample JaasSecurityDomain would be creaded with "${my.domain.name}" as argument
instead of the corresponding SystemProperty.
The fix is very simple:
in org.jboss.system.ServiceCreator.ConstructorInfo#create (around line 287):
Element arg = (Element)list.item(j);
// String signature = arg.getAttribute("type");
String signature = StringPropertyReplacer.replaceProperties(arg.getAttribute("type"));
// String value = arg.getAttribute("value");
String value = StringPropertyReplacer.replaceProperties(arg.getAttribute("value"));
Object realValue = value;