hi,
i want to switch between 2 simpleldaptemplates say ldapTemplate and SslLdapTemplate based on the value of sslenabled=true/false.

i wrote the following code but whn i run it still points to the old template even if ssl is enabled.
kindly answer

public void setLdapTemplate(SimpleLdapTemplate ldapTemplate)

{
if(isLdapsEnabled())
{ log.info("Inside abstractdao setldaptemplate ldaps enbled^^^^^^^^");
this.ldapTemplate=getSslLdapTemplate();
}
else
{ log.info("Inside abstractdao setldaptemplate ldaps NOT enbled^^^^^^^^");
this.ldapTemplate = ldapTemplate;
}
}