LDAP服务运行一会就没有,请问是怎么回事
各位大侠,我想在程序中对Domino LDAP服务更新一个属性值
在实现中,我首先查询是否有该指定属性
try {
String attrList[] = { "cn" };
ctx.getAttributes("cn=name", attrList);
} catch (NamingException ne) {
return false;
}return true;
然后再更新其中一个属性
ModificationItem[] modUser = new ModificationItem[1];
BasicAttribute membership =
new BasicAttribute("dataProperty", "updateData");
modUser[0] =new ModificationItem(DirContext.REPLACE_ATTRIBUTE, membership);
try {
ctx.modifyAttributes("cn=name", modUser);
}catch (NamingException ne) {
ne.printStackTrace();
return false;
}
return true;
程序一开始运行没有问题,但是在运行过一段时间以后,就发现LDAP服务找不到了。
期间肯定没有任何程序修改,只有在ear包重新启动以后,
又一切正常了,请问这是怎么一回事,谢谢!