cancel
Showing results for 
Search instead for 
Did you mean: 

customSessionFactories don't work? activiti 5.14?

li6151770
Champ in-the-making
Champ in-the-making
hi,
I am new to Activiti .
when using activiti5.14, then the configuration is as follows:
1.
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
           <property name="customSessionFactories"> 
           <list> 
               <bean class="com.flow.service.activiti.CustomUserEntityManagerFactory"></bean>
           </list> 
        </property>
</bean>

2.
public class CustomUserEntityManagerFactory implements SessionFactory {
    @Autowired
    private CustomUserEntityManager customUserEntityManager;
   
    public Class<?> getSessionType() {
        return UserEntityManager.class;
    }
   
    public Session openSession() {
        return customUserEntityManager;
    }
}

3.
@Service
public class CustomUserEntityManager extends UserEntityManager {
    public Boolean checkPassword(String userId, String password) {
        System.out.println(userId+"====="+password);//??????????????? no-run??
        return super.checkPassword(userId, password);
    }
}

But when I call "identityService.checkPassword(test, 123456)", I configure CustomUserEntityManager doesn't work,
Program still run the default UserEntityManager, why not run my configuration?

Please help.
4 REPLIES 4

li6151770
Champ in-the-making
Champ in-the-making
1.        <property name="customSessionFactories"> 
         <list> 
             <bean class="com.flow.service.activiti.CustomUserEntityManagerFactory"></bean>
         </list> 
      </property>

li6151770
Champ in-the-making
Champ in-the-making
Any solutions ?

trademak
Star Contributor
Star Contributor
Hi,

I don't directly see a problem. Could you create a unit test project and create a JIRA so we can test the problem directly?

Best regards,

danilo_mendez
Champ in-the-making
Champ in-the-making
The function getSessionType must return the interface UserIdentityManager 

public Class getSessionType() {
return UserIdentityManager.class;
}
…for Groups: GroupIdentityManager