<html>
<head>
    <base href="https://docs.jboss.org/author">
            <link rel="stylesheet" href="/author/s/en/2172/19/5/_/styles/combined.css?spaceKey=TEIID&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://docs.jboss.org/author/display/TEIID/LDAP+Data+Sources">LDAP Data Sources</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://docs.jboss.org/author/display/~shawkins">Steven Hawkins</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >h1. {*}LDAP Data Sources{*} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >LDAP data sources use a Teiid specific JCA connector which is deployed into <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">the AS7.x</span> <span class="diff-added-words"style="background-color: #dfd;">AS {space-metadata-from:asVersionNumber}</span> during installation. There are many ways to create the ldap data source, using CLI,&amp;nbsp;[AdminShell], admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>Execute following command using&amp;nbsp;[CLI|https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-RunningtheCLI]&amp;nbsp;once you connected to the Server. Make sure you provide the correct URL and user credentials. Add any additional properties required by the connector by duplicating the &quot;connection-definitions&quot; command below. Edit the JNDI name to match the JNDI name you used in VDB. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="LDAPDataSources-%7B%7DLDAPDataSources%7B%7D"></a><b>LDAP Data Sources</b></h1>

<p>LDAP data sources use a Teiid specific JCA connector which is deployed into AS 7.2 (EAP 6.1 Alpha) during installation. There are many ways to create the ldap data source, using CLI,&nbsp;<a href="/author/display/TEIID/AdminShell" title="AdminShell">AdminShell</a>, admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes.</p>

<p>Execute following command using&nbsp;<a href="https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-RunningtheCLI" class="external-link" rel="nofollow">CLI</a>&nbsp;once you connected to the Server. Make sure you provide the correct URL and user credentials. Add any additional properties required by the connector by duplicating the "connection-definitions" command below. Edit the JNDI name to match the JNDI name you used in VDB.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
batch
/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS:add(jndi-name=java:/ldapDS, class-name=org.teiid.resource.adapter.ldap.LDAPManagedConnectionFactory, enabled=true, use-java-context=true)
/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapUrl:add(value=ldap://ldapServer:389)
/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapAdminUserDN:add(value={cn=???,ou=???,dc=???})
/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapAdminUserPassword:add(value={pass})
/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapTxnTimeoutInMillis:add(value=-1)
/subsystem=resource-adapters/resource-adapter=ldap:activate
runbatch
</pre>
</div></div>

<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>To find out all the properties that are supported by this Salesforce Connector execute the following command in the CLI.
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">/subsystem=teiid:read-rar-description(rar-name=ldap)
</pre>
</div></div></td></tr></table></div>


<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Developer's Tip</b><br />If the JBoss AS 7.x is running in standalone mode, you can also manually edit the "&lt;jboss-install&gt;/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "&lt;jboss-install&gt;/docs/teiid/datasources/ldap" directory under "resource-adapters" subsystem. Shutdown the server before you edit this file, and restart after the modifications are done.</td></tr></table></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://docs.jboss.org/author/users/removespacenotification.action?spaceKey=TEIID">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://docs.jboss.org/author/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
        <a href="https://docs.jboss.org/author/display/TEIID/LDAP+Data+Sources">View Online</a>
        |
        <a href="https://docs.jboss.org/author/pages/diffpagesbyversion.action?pageId=55476959&revisedVersion=5&originalVersion=4">View Changes</a>
                |
        <a href="https://docs.jboss.org/author/display/TEIID/LDAP+Data+Sources?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>