Announcement Announcement Module
Collapse
No announcement yet.
Uncomprehensible behaviour of DirContextOperations Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Uncomprehensible behaviour of DirContextOperations

    Greetings,

    I'm working with a Spring LDAP using OpenLdap on Windows. I have the following code in a methos which is supposed to do an update via ldaptemplate.modifyAttributesContext()

    Code:
          ...
          System.out.println("### customerorcompanyname not null " + customerProfile.getCustomerOrCompanyName());
          String attribute = context.getStringAttribute("customerorcompanyname");
          System.out.println("### Trying to modify the value of the customerorcompanyname attribute from " + attribute + " to " + customerProfile.getCustomerOrCompanyName());
          context.setAttributeValue("customerorcompanyname", customerProfile.getCustomerOrCompanyName());
          attribute = context.getStringAttribute("customerorcompanyname");
          System.out.println("### Done. The new value is " + attribute);
          ...
    The result which is displayed is the following:

    Code:
    ### customerorcompanyname not null customerorcompanyname-200
    ### Trying to modify the value of the customerorcompanyname attribute from customerorcompanyname-100 to customerorcompanyname-200
    ### Done. The new value is customerorcompanyname-100
    The setAttributeValue method of the DirContextOperations doesn't seem to change the old value. I can't understand that. Does anybody have any idea ?

    Many thanks in advance,

    Nicolas
Working...
X