You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ha...@apache.org on 2008/08/27 14:17:01 UTC
svn commit: r689456 - in /activemq/camel/trunk/components/camel-ldap/src:
main/java/org/apache/camel/component/ldap/LdapEndpoint.java
test/java/org/apache/camel/component/ldap/LdapRouteTest.java
Author: hadrian
Date: Wed Aug 27 05:17:00 2008
New Revision: 689456
URL: http://svn.apache.org/viewvc?rev=689456&view=rev
Log:
CAMEL-853. Fixed comment, made base dn optional using "ou=system" as default.
Modified:
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java
activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java
Modified: activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java?rev=689456&r1=689455&r2=689456&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java Wed Aug 27 05:17:00 2008
@@ -34,12 +34,13 @@
* @version
*/
public class LdapEndpoint<E extends Exchange> extends DefaultEndpoint<E> {
+ public static final String SYSTEM_DN = "ou=system";
public static final String OBJECT_SCOPE = "object";
public static final String ONELEVEL_SCOPE = "onelevel";
public static final String SUBTREE_SCOPE = "subtree";
private String remaining;
- private String base;
+ private String base = SYSTEM_DN;
private String scope = SUBTREE_SCOPE;
protected LdapEndpoint(String endpointUri, String remaining, LdapComponent component) throws URISyntaxException {
Modified: activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java?rev=689456&r1=689455&r2=689456&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java (original)
+++ activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java Wed Aug 27 05:17:00 2008
@@ -33,7 +33,7 @@
// START SNIPPET: invoke
Endpoint endpoint = context.getEndpoint("direct:start");
Exchange exchange = endpoint.createExchange();
- // then we set the SQL on the in body
+ // then we set the LDAP filter on the in body
exchange.getIn().setBody("(!(ou=test1))");
// now we send the exchange to the endpoint, and receives the response from Camel
@@ -56,7 +56,7 @@
protected JndiRegistry createRegistry() throws Exception {
// START SNIPPET: register
JndiRegistry reg = super.createRegistry();
- reg.bind("localhost:" + port, this.getWiredContext());
+ reg.bind("localhost:" + port, getWiredContext());
return reg;
// END SNIPPET: register
}