I've added this to the initial context, but same exception:
contextProperties.put("jboss.naming.client.ejb.context", true);
contextProperties.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
contextProperties.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS", "JBOSS-LOCAL-USER");
contextProperties.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
Also not sure if it's a client problem because this server configuration 'works':
<security-realm name="ApplicationRealm">
<authentication>
<properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
</authentication>
</security-realm>
but this not:
<security-realm name="ApplicationRealm">
<authentication>
<jaas name="my-security-domain"/>
</authentication>
</security-realm>
In the meantime: thanks for your help