Search code examples
mysqljackrabbitjcr

Can we use JCR API over MySQL?


Apache Jackrabbit (or the JCR API) helps you separate the data store from the data management system. This would mean that every data store provider would have to implement the JCR API for his own data store. The question is JCR implemented for MySQL? Can we use the JCR API over MySQL? I want to truly abstract out where i store my content, so that tomorrow if i don't want to use a relational DB i can swap it out with the file system with ease.


Solution

  • You could try ModeShape, which is a JCR implementation that can store its data in a variety of systems, including MySQL (or almost any other relational database), data grids (such as Infinispan), file systems, version control systems (e.g., SVN), etc. You can even create a single JCR repository backed by multiple federated systems. ModeShape does this through an extensible connector library (that is much, much simpler than implementing the full JCR API), so you can use the JCR API to get at your data in other systems, too.