<div dir="auto">Thank you Elsa and Pavol for your answer.<div dir="auto"><br></div><div dir="auto">The use of constants in the systemConfiguration object is definitely what I am looking for.</div><div dir="auto"><br></div><div dir="auto">Thank you for the references about config.xml.</div><div dir="auto"><br></div><div dir="auto">We are planning to get a subscription for 2020 :).</div><div dir="auto"><br></div><div dir="auto">In the meantime, I will create a feature request in Jira for the use of constants in systemConfiguration and another for an improvement of the documentation regarding config.xml configuration.</div><div dir="auto"><br></div><div dir="auto">-Frederic</div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Tue, Dec 10, 2019, 09:18 Pavol Mederly <<a href="mailto:mederly@evolveum.com">mederly@evolveum.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hello Fréderic,</p>
<p>there are two distinct concepts:</p>
<ol>
<li>System Configuration object in midPoint repository,</li>
<li>configuration in config.xml file.</li>
</ol>
<p>The first one is the "main" one. Here e.g. deployment information
(that you'd like to change) resides.</p>
<p>The second one is used for low-level information (e.g. where to
find the repository) or for node-specific information (e.g. node
id). <br>
</p>
<p>Java system properties can be used to override information in
config.xml, not in System Configuration object. That's why <b>-<a href="http://Dmidpoint.system.deploymentInformation.name" target="_blank" rel="noreferrer">Dmidpoint.system.deploymentInformation.name</a>=DEV</b>
does not work.</p>
<p>As far as I know, it is currently not possible to set the
deployment name from the command line.</p>
<p>The following approach works in similar situations
(unfortunately, not in this particular one):</p>
<p><a href="https://wiki.evolveum.com/display/midPoint/Configuration+and+Use+of+Constants" target="_blank" rel="noreferrer">https://wiki.evolveum.com/display/midPoint/Configuration+and+Use+of+Constants</a></p>
<p>You can define a constant in your config.xml file. (So its value
is settable using -D ... switch.) And you can use this constant in
your mappings or resource configurations. In the system config it
would be like this (if it worked):</p>
<p><tt><deploymentInformation></tt><tt><br>
</tt><tt> <name></tt><tt><br>
</tt><tt> <expression></tt><tt><br>
</tt><tt> <const>systemName</const></tt><tt><br>
</tt><tt> </expression></tt><tt><br>
</tt><tt> </name></tt><tt><br>
</tt><tt></deploymentInformation></tt></p>
<p>It's doable, but not there yet. You can always consider <a href="https://wiki.evolveum.com/display/midPoint/Subscriptions+and+Sponsoring" target="_blank" rel="noreferrer">https://wiki.evolveum.com/display/midPoint/Subscriptions+and+Sponsoring</a>
:)</p>
<p>...as for your question on config.xml schema. Unfortunately,
nothing like that exist yet. We read the file programatically,
looking for specific keys. Something is here:</p>
<ul>
<li> <a href="https://github.com/Evolveum/midpoint/blob/master/infra/common/src/main/java/com/evolveum/midpoint/common/configuration/api/MidpointConfiguration.java" target="_blank" rel="noreferrer">https://github.com/Evolveum/midpoint/blob/master/infra/common/src/main/java/com/evolveum/midpoint/common/configuration/api/MidpointConfiguration.java</a><br>
</li>
<li><a href="https://github.com/Evolveum/midpoint/blob/master/repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/TaskManagerConfiguration.java#L52" target="_blank" rel="noreferrer">https://github.com/Evolveum/midpoint/blob/master/repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/TaskManagerConfiguration.java#L52</a></li>
<li><a href="https://github.com/Evolveum/midpoint/blob/master/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlRepositoryConfiguration.java#L249" target="_blank" rel="noreferrer">https://github.com/Evolveum/midpoint/blob/master/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlRepositoryConfiguration.java#L249</a></li>
</ul>
<p>but it's not a complete reference.<br>
</p>
<p>Best regards,<br>
</p>
<pre cols="72">Pavol Mederly
Software developer
<a href="http://evolveum.com" target="_blank" rel="noreferrer">evolveum.com</a>
</pre>
<div>On 10/12/2019 08:18, Gómez Martínez,
Elsa wrote:<br>
</div>
<blockquote type="cite">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hello!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US">Have you tried to change midpoint.sh file?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US">I have to change it to modify the MIDPOINT_PORT
because I tried in all of the files and it only worked in
midpoint.bat (I’m running in Windows, I suppose it’s the
same to Linux.)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US">Hope it helps.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US">Elsa</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#004254"><u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">De:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">
midPoint <a href="mailto:midpoint-bounces@lists.evolveum.com" target="_blank" rel="noreferrer"><midpoint-bounces@lists.evolveum.com></a>
<b>En nombre de </b>Frédéric Lohier<br>
<b>Enviado el:</b> lunes, 9 de diciembre de 2019 18:56<br>
<b>Para:</b> midPoint General Discussion
<a href="mailto:midpoint@lists.evolveum.com" target="_blank" rel="noreferrer"><midpoint@lists.evolveum.com></a><br>
<b>Asunto:</b> [midPoint] Overriding systemConfiguration
attributes in config.xml file or using java system
properties<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif">Hello,<u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif"> <u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif">Following
my last message, I would like to override
systemConfiguration attributes using config.xml or java
system properties as explained here <a href="https://wiki.evolveum.com/display/midPoint/Overriding+config.xml+parameters" target="_blank" rel="noreferrer"><span style="color:#4285f4">https://wiki.evolveum.com/display/midPoint/Overriding+config.xml+parameters</span></a><u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif"> <u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif">Looking
at <a href="https://github.com/Evolveum/midpoint/blob/master/infra/common/src/main/java/com/evolveum/midpoint/common/configuration/api/MidpointConfiguration.java" target="_blank" rel="noreferrer"><span style="color:#4285f4">https://github.com/Evolveum/midpoint/blob/master/infra/common/src/main/java/com/evolveum/midpoint/common/configuration/api/MidpointConfiguration.java</span></a><u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif"> <u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif">I
tried the following in midpoint/bin/setenv.sh<u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif"> <u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif">JAVA_OPTS="$JAVA_OPTS<u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif">-<a href="http://dmidpoint.system.deploymentinformation.name/" target="_blank" rel="noreferrer"><span style="color:#4285f4">Dmidpoint.system.deploymentInformation.name</span></a>=DEV”<u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif"> <u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif">But
it doesn’t work after a restart. Any though of how I could
make this work?<u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif"> <u></u><u></u></span></p>
<p><span style="font-size:9.5pt;font-family:"Arial",sans-serif">-Frederic<u></u><u></u></span></p>
</div>
</div>
<br>
<hr>
<font size="1" face="Arial" color="Gray"><br>
Este correo electrónico y, en su caso, cualquier fichero anexo
al mismo, contiene información de carácter confidencial
exclusivamente dirigida a su destinatario o destinatarios. Si no
es vd. el destinatario indicado, queda notificado que la
lectura, utilización, divulgación y/o copia sin autorización
está prohibida en virtud de la legislación vigente. En el caso
de haber recibido este correo electrónico por error, se ruega
notificar inmediatamente esta circunstancia mediante reenvío a
la dirección electrónica del remitente.<br>
Evite imprimir este mensaje si no es estrictamente necesario.<br>
<br>
This email and any file attached to it (when applicable)
contain(s) confidential information that is exclusively
addressed to its recipient(s). If you are not the indicated
recipient, you are informed that reading, using, disseminating
and/or copying it without authorisation is forbidden in
accordance with the legislation in effect. If you have received
this email by mistake, please immediately notify the sender of
the situation by resending it to their email address.<br>
Avoid printing this message if it is not absolutely necessary.<br>
</font>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" target="_blank" rel="noreferrer">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank" rel="noreferrer">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank" rel="noreferrer">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</blockquote></div></div>