You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Tom Wheeler <to...@gmail.com> on 2007/02/02 02:23:28 UTC

Is JCR/Jackrabbit Appropriate for Complex Java Object Persistence?

I currently have a subsystem in a project I'm working on that provides
object persistence, caching, reference resolution and change
notification.  I also need to support additional capabilities in the
future such as transactions and versioning.

I came across Jackrabbit somewhat by accident last week and am new to
JCR  in general.  However, it seems like Jackrabbit does much of what
I need already, and I could easily wrap it to provide the rest.  In
fact, I've got a simple proof-of-concept working already.

Much of what I've read so far seem focused on content and document
management applications like blogs, wikis and CMS systems.  Is what
I'm trying to do a misuse of JCRs?  Is there some open source
framework on top of Jackrabbit already that makes it easier to use
them for general persistence of complex Java objects?

--
Tom Wheeler
http://www.tomwheeler.com/

Re: Is JCR/Jackrabbit Appropriate for Complex Java Object Persistence?

Posted by Tom Wheeler <to...@gmail.com>.
Thanks Jukka and David for the very helpful responses.

> On 2/2/07, Tom Wheeler <to...@gmail.com> wrote:
> I currently have a subsystem in a project I'm working on that provides
> object persistence, caching, reference resolution and change
> notification.  I also need to support additional capabilities in the
> future such as transactions and versioning.
> ...

--
Tom Wheeler
http://www.tomwheeler.com/

Re: Is JCR/Jackrabbit Appropriate for Complex Java Object Persistence?

Posted by David Nuescheler <da...@gmail.com>.
Hi Tom,

I believe that you are using JCR exactly right.
There are many reasons why JCR is better suited for object persistence
than an RDBMS, understanding inheritance to just mention one.
You may find an ongoing effort to offer Object-Content-Mapping in Graffito
http://incubator.apache.org/graffito/jcr-mapping/index.html

I am convinced that the reason that we see so many "Content Applications"
that revolve around Document Management, Wiki's or other classical CMS
applications is really lack of imagination ;) .

You may find my views on that particular subject in the following
presentation that I recently gave at the Content Managent Forum
in Denmark:
http://www.day.com/o.file/cmf-2006.pdf?get=073d75dc38e1f3af470652f5e9086972
(Slides 31-35 are speaking about that very topic)

regards,
david

On 2/2/07, Tom Wheeler <to...@gmail.com> wrote:
> I currently have a subsystem in a project I'm working on that provides
> object persistence, caching, reference resolution and change
> notification.  I also need to support additional capabilities in the
> future such as transactions and versioning.
>
> I came across Jackrabbit somewhat by accident last week and am new to
> JCR  in general.  However, it seems like Jackrabbit does much of what
> I need already, and I could easily wrap it to provide the rest.  In
> fact, I've got a simple proof-of-concept working already.
>
> Much of what I've read so far seem focused on content and document
> management applications like blogs, wikis and CMS systems.  Is what
> I'm trying to do a misuse of JCRs?  Is there some open source
> framework on top of Jackrabbit already that makes it easier to use
> them for general persistence of complex Java objects?
>
> --
> Tom Wheeler
> http://www.tomwheeler.com/
>

Re: Is JCR/Jackrabbit Appropriate for Complex Java Object Persistence?

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 2/2/07, Tom Wheeler <to...@gmail.com> wrote:
> Much of what I've read so far seem focused on content and document
> management applications like blogs, wikis and CMS systems.  Is what
> I'm trying to do a misuse of JCRs?

One could well claim that object-relational persistence is a misuse of
JDBC and relational databases. Similarly you could claim that object
persistence is not the core use case for JCR. The question boils down
to whether you want your application to be document or object
oriented.

However, there are many good uses for object-relational persistence
and the hierarchical nature of JCR makes it in many cases even better
suited for object persistence than relational databases.

> Is there some open source framework on top of Jackrabbit already that
> makes it easier to use them for general persistence of complex Java objects?

See the incubating Apache Graffito project for the JCR Mapping tool
(http://incubator.apache.org/graffito/jcr-mapping/index.html), an
object-content mapping framework for JCR. From the web site:

    This tools lets you to persist java objects into a JCR compliant
    repository - including association, inheritance, polymorphism,
    composition, and the Java collections framework. Furthermore, this
    jcr-mapping allows you to express queries in Java-based Criteria,
    as well as in JCR query language. It offers also features like
    version support and object locking.

Unfortunately the tool is not yet released so you'll need to grab and
build the sources to try it out.

BR,

Jukka Zitting