langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
|
|
@ -0,0 +1,43 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols binary
|
||||
|
||||
import org.apache.directory.ldap.client.api.LdapConnection
|
||||
import org.apache.directory.ldap.client.api.LdapNetworkConnection
|
||||
import org.apache.directory.shared.ldap.model.exception.LdapException
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
class RDirectoryLDAP public
|
||||
|
||||
properties constant
|
||||
log_ = LoggerFactory.getLogger(RDirectoryLDAP.class)
|
||||
|
||||
properties private static
|
||||
connection = LdapConnection null
|
||||
|
||||
method main(args = String[]) public static
|
||||
ldapHostName = String "localhost"
|
||||
ldapPort = int 10389
|
||||
|
||||
if log_.isInfoEnabled() then log_.info("LDAP Connection to" ldapHostName "on port" ldapPort)
|
||||
connection = LdapNetworkConnection(ldapHostName, ldapPort)
|
||||
|
||||
do
|
||||
if log_.isTraceEnabled() then log_.trace("LDAP bind")
|
||||
connection.bind()
|
||||
|
||||
if log_.isTraceEnabled() then log_.trace("LDAP unbind")
|
||||
connection.unBind()
|
||||
catch lex = LdapException
|
||||
log_.error("LDAP Error", Throwable lex)
|
||||
catch iox = IOException
|
||||
log_.error("I/O Error", Throwable iox)
|
||||
finally
|
||||
do
|
||||
if connection \= null then connection.close()
|
||||
catch iox = IOException
|
||||
log_.error("I/O Error on connection.close()", Throwable iox)
|
||||
end
|
||||
end
|
||||
|
||||
return
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
|
||||
<appender name="stdout" class="org.apache.log4j.ConsoleAppender">
|
||||
<param name="Target" value="System.out" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="[%d{HH:mm:ss}] %-5p [%c] - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- with these we'll not get innundated when switching to DEBUG -->
|
||||
<logger name="org.apache.directory.shared.ldap.name">
|
||||
<level value="warn" />
|
||||
</logger>
|
||||
<logger name="org.apache.directory.shared.codec">
|
||||
<level value="warn" />
|
||||
</logger>
|
||||
<logger name="org.apache.directory.shared.asn1">
|
||||
<level value="warn" />
|
||||
</logger>
|
||||
|
||||
<root>
|
||||
<level value="info" />
|
||||
<appender-ref ref="stdout" />
|
||||
</root>
|
||||
</log4j:configuration>
|
||||
Loading…
Add table
Add a link
Reference in a new issue