Hi, Using Sling to talk to Oracle works using a number of libraries or osgi-ready bundles. For example, if you need something equivalent to hibernate you can use eclipselink from the eclipse foundation: https://www.eclipse.org/eclipselink/ There’s another big library whose name escapes me right now that is osgi-compliant. If you want something simpler there are other options - some osgi bundles, some simple libraries. I’ve even used the very basic apache.org dbcp library inside sling to talk to MySQL over jdbc without problems - no memory leaks, good performance, on a very database-intensive application.
As far as removing bundles from sling… You may not want to. You can try turning off the various extra bundles, but they give you some nice features like user management, REST access to nodes, permissions, etc. Sling might be bigger than you need, but you can keep them running but just not use them. I haven’t tried turning some of the basic bundles off and seeing what happens. It will probably be ok, but there are definitely dependencies between the bundles. You’ll have to see what your minimum configuration can be. Also, there’s a jcr adapter for talking to a database, making the database rows similar to nodes in jcr. Personally, I don’t think it makes sense to do it that way - jcr data should be hierarchical unstructured data and database data should be relational. But if you really want to express your database data as jcr nodes there’s a bundle for doing so - I just can’t remember the name and I’m not sure if it’s available in plain Sling (vs Adobe’s product). That said, I have used the bundle and it works - it just had problems such as no lazy loading, not able to express relationships… basically, the problems you’d expect trying to express tabular relational data as unstructured hierarchical data. Robert A. Decker On 31 Mar 2014, at 20:02, Dube, Shreyas <[email protected]> wrote: > Hello, > > I’m using Apache Felix in the bridged mode[0] to embed an OSGi runtime in a > Tomcat6 web container. > > I’m investigating ways to provide a JCR-like abstraction over a RDBMS > persistence layer (Oracle). I stumbled across Apache Sling and Jackrabbit and > was wondering if it was possible to: > > * use only the JCR and JackRabbit bundles from Sling (and skip the others) > * configure JackRabbit to use Oracle for persistence > > Are there any issues with this approach? Any advice would be greatly > appreciated. > > Thanks, > Shreyas > [0] > http://felix.apache.org/documentation/subprojects/apache-felix-http-service.html#using-the-servlet-bridge
