5

I need to use an object oriented data repository for a project.
It's going to be something between a wiki and a CMS.

I'm not an expert in the field of persistence yet.
I suppose Hibernate and Jackrabbit are the frameworks to go, right?

As far as I'm informed correctly, Jackrabbit does not support
annotations or other convenience techniques for mapping
between object instances and data storage.

Hibernate, on the other hand, does not support versioning
out-of-the box.

What would you suggest me to use?
Could I in some way combine both these frameworks?

Could you also, if possible, summarize the pros and cons of the two frameworks?

Thank you!

EDIT
I really would like to use something that does NOT require me to take care of mapping objects to tables and back. Why should I? In which century do we live? ;)

I had good experience with JAXB (mapping objects to XML and back in an object-oriented way), but JAXB has no use in databases.

Cœur
  • 37,241
  • 25
  • 195
  • 267
ivan_ivanovich_ivanoff
  • 19,113
  • 27
  • 81
  • 100
  • 3
    What makes you think JackRabbit doesn't support annotations? Even the 5min tutorial uses them. http://jackrabbit.apache.org/5-with-jackrabbit-ocm.html – jitter Jun 18 '09 at 17:10
  • Oh, thank you! I was primary searching for information about the JCR spec, not the Jackrabbit implementation. – ivan_ivanovich_ivanoff Jun 18 '09 at 17:12
  • Hmm I'm not sure I understand what you want. The JCR 2 spec is http://jcp.org/en/jsr/detail?id=283. Do you want a ORM: http://en.wikipedia.org/wiki/Object-relational_mapping or a content repository? – jitter Jun 18 '09 at 17:32
  • +1 since I hadn't heard of jackrabbit and it sounds like something i could use for one of my applications. Apache rules! – Jason S Jun 18 '09 at 17:40
  • @jitter: I want to store objects in a OOP way. With mapping or without. – ivan_ivanovich_ivanoff Jun 18 '09 at 17:59

6 Answers6

4

db4o is an object oriented database. As it's OO you store the objects directly so you don't have to maintain any mappings to tables.

Mark
  • 28,783
  • 8
  • 63
  • 92
2

Oracle Berkeley DB Java Edition

Is a direct persistence layer (no mapping to a relational database).

Brian
  • 13,412
  • 10
  • 56
  • 82
2

Try NeoDatis. It's got all the goodness of db4o (native queries, no mappings, fast) except that it's completely free (even for commercial use).

UPDATE: Last time I tried NeoDatis (mid-2010) it still had some critical bugs. For example, power loss could result in database corruption. Beware!

Gili
  • 86,244
  • 97
  • 390
  • 689
0

I would go with Hibernate. Simply because it has so vast community. Yes, I have a lot of (good) experience with Hib personally, so I'm biased.

As for versioning, well, implement it yourself -- it's not hard, just make a copy (reflection is a helper), and save the object.

Vladimir Dyuzhev
  • 18,130
  • 10
  • 48
  • 62
0

You could also look into using JPA's. While they aren't the hottest thing since sliced bread, they are being adopted by the Java community and are being pushed as the new standard by the Sun community. Hibernate is safe and proven though, so I personally am going to stick with it.

amischiefr
  • 4,750
  • 2
  • 29
  • 22
0

DB4o and Neodatis are the way to go...

I think that you'll need a commercial license if your project is for profit.... If so go with neodatis....

daniel
  • 128
  • 1
  • 5