cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco CMS with myBatis

aakanksha_tejwa
Champ in-the-making
Champ in-the-making

Hi,

I have a simple question regarding the ORM used by Alfresco CMS. As I understand in the previous versions, Hibernate was used as the ORM layer which was later updated to iBatis. In our current project, we are using myBatis for the different database connections, hence we would like to maintain the consistency across. So my question is that is it possible to use myBatis instead of iBatis while using Alfresco CMS.

Kindly point me to the right direction or documentation.

Regards,

Aakanksha

5 REPLIES 5

afaust
Legendary Innovator
Legendary Innovator

Hibernate hasn't been used (as primary ORM) in a long time (since 4.0 only for jBPM, which was removed in 5.1/5.2). The Hibernate library continues to be used as a technical dependency, primarily to determine the database dialect to be used and for some transaction handling support. Alfresco is using myBatis (successor of ibatis) and of course you can use myBatis for custom database connections. You just have to use the version shipped with Alfresco and not include your own to avoid any conflicts.

Hi,

Thank you for your instant reply.

Actually I came across a document stating that Alfresco CMS uses iBatis - Alfresco drops LGPL'd Hibernate for iBatis - The H Open: News and Features , hence the confusion.

Could you please point me to the correct documentation to understand how can I use myBatis for my custom database connections while using Alfresco CMS?

There is no such documentation because that is not considered a standard / supported use case by Alfresco. It simply is technically possible (and I have been doing that in various customer projects).

Would it be possible for you to may be share a sample code or direct me to a sample project for reference wherein I could use myBatis for my custom database connections while using Alfresco CMS?