jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gamba <holger.bre...@handelshof.de>
Subject Re: Own nodes with mix:lockable
Date Thu, 20 Aug 2009 06:22:10 GMT

Just found it. I need to separate mix:lockable by comma from
my own types. Then all types hmmg:folder are creates as lockable.

I get a lock with myNode.getLock(true, true).

Thought that the second param called "isSessionScoped" means, that
after calling session.logout() the lock will be removed, but my node
is still locked .... I'm using an jboss-application server an the code
is from a stateless-session-bean:

try {
        Node rootNode = session.getRootNode();
        lastNodeInTree = rootNode.getNode(pathLocal);
	lastNodeInTree.lock(false, true);

	if (!lastNodeInTree.hasNode(name)) {
		lastNodeInTree.addNode(name, "hmg:folder");
	}
        ...
	session.save();
}
catch (RepositoryException re) {
	...
}
finally {
	if (session != null) {
		session.logout();
	}
}



Gamba wrote:
> 
> Hi,
> 
> I have my own node-types extending nt:folder and nt:file:
> 
> [hmg:folder] > nt:folder
> - * (string)  
> - * (string) multiple
> - * (boolean)
> - * (boolean) multiple
> - * (double) 
> - * (double) multiple
> - * (long) 
> - * (long) multiple
> - * (date) 
> - * (date) multiple
> 
> 
> [hmg:file] > nt:file
> - * (string)
> - * (string) multiple
> - * (boolean) 
> - * (boolean) multiple
> - * (double) 
> - * (double) multiple
> - * (long) 
> - * (long) multiple
> - * (date) 
> - * (date) multiple
> 
> I wonder if it would be possible to add a mixin-type at creation time, e.
> g.  mix:lockable ?
> Where must it be places in my notation?
> 
> Thx
> Gamba
> 
> 

-- 
View this message in context: http://www.nabble.com/Own-nodes-with-mix%3Alockable-tp25056308p25056614.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message