title: Reuse ldap connection in WildFly
body: <p>In <code>standalone.xml</code> I have <code>security-realm</code> defined for LDAP authentication and authorization. This security realm uses a connection defined in <code>outbound-connections</code>.</p>
  
  <p>I also use naming subsystem to define <code>external-context</code>, which I use in Java class for making some changes in LDAP.</p>
  
  <p><strong>The question is:</strong> Can I somehow reuse the outbound connection when defining external context? I don't want to give LDAP configuration properties again. Or maybe there is some other solution for this - to have LDAP connection defined in one place in <code>standalone.xml</code> and reuse it for security realm and naming subsystem?</p>
  
  <p><strong>One extra question:</strong> If I want to move from JNDI to LDAP library (like UnboundID), can I still reuse this connection from <code>standalone.xml</code>?</p>