I have integrated the jack rabbit with Oracle database and I am storing the
Data using Jackrabbit, if I don't want to retrieve the data using the
Jackrabbit, in what way I can get the data. In database data is storing in
blob type.

- 53
- 6
-
Short answer is, you can't. If you need to access the data in the database directly then consider using eg. a ORM framework. – TedTrippin Jan 11 '16 at 12:32
-
@TedTrippin An ORM framework is nothing else but code that encapsulates a bit (or a bit more) of abstraction. But this piece of code also would need to access the DB via JDBC in the end, so why should the OP not be able to do it with his own custom code as well? He should be able to study the code of http://jackrabbit.apache.org/jcr/object-content-mapping.html, then can get the content, although probably not in one but multiple queries per document, eventually with user-defined functions, which are supported in Oracle and might make things easier. I guess that would've been the "long answer"? – Mathias Conradt Mar 21 '16 at 19:44
-
1If the OP has to go to those lengths then they have chosen the wrong technologies. My point was, by using ORM the data would be easily accessible direct from the database without the need to "study code" and write custom code. – TedTrippin Mar 22 '16 at 09:06
2 Answers
The way Jackrabbit stores the data in the DB is an implementation detail, and it does not magically map this into a "nice" DB schema if that's what you mean. (The hierarchical nature and all the JCR features make this impossible). It's a bit like having a Unix file system and then asking how can I read the low level inodes etc. from the file system implementation - you really should not.
Last but not least note that while it is running nothing else (except for a Jackrabbit cluster setup) must write to the DB (the tables used by Jackrabbit) as this will easily lead to data corruption.

- 3,585
- 31
- 36
As @TedTrippin already mentioned above, an ORM framework would make things much easier. But if you really want to do it manually in Oracle, the approach would be:
Study the code of the OCM http://jackrabbit.apache.org/jcr/object-content-mapping.html, then get the content according to the logic of associations and relations from Oracle, probably not in one but multiple queries per document; eventually with user-defined functions, which are supported in Oracle and might make things easier.
Would be interesting to know the background of your questions. You tagged it with "Spring" and "CMS". I don't see any reason why you would want to access the data directly from Oracle, it's tedious. In case you want to provide an API for the content to an external system, or in case you have lost a CMS that was once in front of and just using the Jackrabbit repo as a content store, you could still use such ORM / OCM framework standalone to make it easier to access the data.

- 28,420
- 21
- 138
- 192