jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Thrasher <ja...@coachthrasher.com>
Subject hybrid Hibernate(JDBC)/OCM Objects
Date Thu, 16 Jul 2009 23:16:36 GMT

Greetings Users,
Does anyone have pointers on creating POJOs that have some fields stored in
OCM, and relational/business logic stored in a relational DB?
With a well established data model, DAO layer, and business layer in my app
using Hibernate for JDBC into a MySQL database, only one object uses
Jackrabbit to store binary file data, and it's mapped using a UUID into the
relational model.  It works great, and I'm very happy with it.

Now I'm adding features to the app that are very heavily content based, and
I'd like to utilize Jackrabbit OCM for fields in the model that are content
oriented, as it will be much more powerful than the relational model for
this.  However, I need to preserve the relational integrity of the system,
as this is not a content-only application.  I've tested pure OCM objects,
and have build a DAO layer for them using generics, and it works fine.  The
problem I'm facing is how to map between the relational and OCM systems, for
a single object.

I've started to explore this using the OCM object's "path" field as a unique
identifier in the relational system.  I have one relational table for all
content objects that has columns:
	id, classname, path
I think I can preserve the lazy-instantiation of the Hibernate system by
creating a custom LazyInitializer and POJOEntityTuplizer, that would CRUD
data from Jackrabbit whenever the hybrid model objects are CRUDed by
Hibernate.  However, this looks really complicated, and there are very few
google-able references online on doing something similar.  All I could find
was this:
http://www.theserverside.com/tt/articles/content/RemoteLazyLoadinginHibernate/article.html
Which only seems to be a starting point.

Has anyone done this, or have any pointers?  Am I going down the wrong path?

thanks,
Jason

-- 
View this message in context: http://www.nabble.com/hybrid-Hibernate%28JDBC%29-OCM-Objects-tp24526110p24526110.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message