jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rokham <somebodyik...@gmail.com>
Subject Versioning with Jcrom
Date Thu, 17 Apr 2008 23:57:24 GMT

Hi all,

I'm trying to use Jcrom to map my POJOs onto Jackrabbit. I've used Jcrom's
annotation to indicate that my persistent object is versionable like:

@JcrNode(mixinTypes = {"mix:versionable"})
public class CurnitOtmlImpl{ .....}

I use Jcrom to create the object and once it's created, I set some more
properties on the object and call update on it. The reason I have to do that
is because once the object is created certain information is set for the
object (eg, UUID, object path) which I'm interested to save in jackrabbit.

My problem is this:

When I step into the code for 
public abstract class AbstractJcrDAO<T> implements JcrDAO<T> {...} abstract
class, I get to this method:

protected String update( Node node, T entity, String childNodeFilter, int
maxDepth ) throws Exception {
		if ( isVersionable ) {
			node.checkout();
		}
		String name = jcrom.updateNode(node, entity, childNodeFilter, maxDepth);
		session.save();
		if ( isVersionable ) {
			node.checkin();
		}
		return name;
	}

In the update method above, I realized that "isVersionable" is false and
therefore my node is not versioned in jackrabbit.

Does anyone happen to know if there's a bug in Jcrom? Is there a quick fix I
could use to get my stuff working? I believe the problem is with Jcrom
interpreting the class annotation, indicating that this object is
versionable.

I really really appreciate any help. I'm under a deadline and like to get
this done ASAP.

Thank you all in advance,

Rokham
-- 
View this message in context: http://www.nabble.com/Versioning-with-Jcrom-tp16758079p16758079.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message