## Note:

Extension of the classes in this package is prohibited unless otherwise documented. Similarly, extension or implementation of the interfaces in this package is prohibited except as documented.

# Package com.sas.services.connection.jndi

@CodeSet("sas.platform") @SASScope("ALL") package com.sas.services.connection.jndi
JNDI connection services.

### Connection Factory Configuration using JNDI

Metadata accessed through the Java Naming and Directory Interface (JNDI) is expected to be stored in an Lightweight Directory Access Protocol (LDAP) server using the IT Administrator tool. IOM servers and logins defined this way are identified to a connection factory using a logical name. You must also provide a live connection to the LDAP server and a search context.

If the metadata defines a connection pool, then the two-tiered security model dictates that the metadata repository be used authenticate factory users. You may provide an authentication domain name for the ldap server, and the connection factory will include this name in it's list of valid authentication domains if it is configured for pooling. If you do not provide a name, and empty string will be used, if necessary.

The following code fragment demonstrates connection factory configuration using JNDI metadata.

     Hashtable env = new Hashtable();
     env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
     env.put(Context.PROVIDER_URL,"ldap://ldap.abc.com:389");
     env.put(Context.SECURITY_AUTHENTICATION,"simple");
     env.put(Context.SECURITY_PRINCIPAL,"cn=admin,o=ABC,c=US");
     env.put(Context.SECURITY_CREDENTIALS,"admin1");
     DirContext ctx = new InitialDirContext(env);
     String searchContext = "o=ABC,c=US";
     String logicalName = "myServer";
     String ldapServerDomain = "LDAP";
     ConnectionFactoryConfiguration cxfConfig = new JNDIConnectionFactoryConfiguration(ctx,searchContext,logicalName,ldapServerDomain);

- Related Packages
  Package
  Description
  com.sas.services.connection
  Service for making and managing connections to IOM servers.
  com.sas.services.connection.omr
  Provides a connection factory configuation for use with a SAS Metadata Server.
  com.sas.services.connection.platform
  Provides a connection factory configuation for use with SAS Foundation Services.
- Classes
  Class
  Description
  JNDIConnectionFactoryConfiguration
  A connection factory configuration that describes a server or a pool of servers to connect to using meta data in accessed through a JNDI interface.