cancel
Showing results for 
Search instead for 
Did you mean: 

How to use custom ldapGroupManagerFactory

ismail1
Champ in-the-making
Champ in-the-making
Hi,
I d like to extend ldapGroupManagerFactory to use my own implemnetation extended from default. But it needs a constructor of ldapConfigurator and causes a cyclic dependency.

Here is my configuration:


  <bean id="ldapQueryBuilderKKB" class="org.activiti.demo.util.LdapQueryBuilderKKB" />
  <bean id="ldapGroupManagerFactoryKKB" class="org.activiti.demo.util.LdapGroupManagerFactoryKKB" />
  ….
     <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
     ….
        <property name="configurators">
          <list>
              <bean class="org.activiti.ldap.LDAPConfigurator" id="ldapConfigurator">
                   <property name="ldapGroupManagerFactory">
         <ref local="ldapGroupManagerFactoryKKB"/>
              </property>            
              <property name="ldapQueryBuilder">
               <ref local="ldapQueryBuilderKKB"/>
              </property>
              </bean>
             …..
           </list>
        </property>
      </bean>


This configuration complains about empty constructor, needs a constructor of ldapConfigurator as parameter.
But when i pass configurator like below ( which i referenced ldapGroupManagerFactory from) will casue a cyclic dependency.


   <bean id="ldapGroupManagerFactoryKKB" class="org.activiti.demo.util.LdapGroupManagerFactoryKKB" >
     <constructor-arg ref="ldapConfigurator"/>
   </bean>


Any idea about how to resolve this please?

1 REPLY 1

jbarrez
Star Contributor
Star Contributor
* The ldap factories were implemented in such a way that extension should not be needed. What is the use case you are trying to accomplish?

* A quick workaround here would be to extend the LDAPConfigurator too, and use the custom implementations in this class.