How to replace PersistenceImpl with my own implementation

Dear CubaTeam,

How to replace com.haulmont.cuba.core.sys.PersistenceImpl with my own implementation ?

Thanks.

Create your bean implementing Persistence (probably extending the class from PersistenceImpl) and register it in your spring.xml with the name of the original bean (cuba_Persistence). See example in the documentation: https://doc.cuba-platform.com/manual-6.2/bean_extension.html

Thanks!