jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Lustig <tho...@futuredesign.at>
Subject New Properties for nt:unstructured and nt:resource get lost on reboot
Date Fri, 20 Aug 2010 09:41:38 GMT
Dear all

I am using Jackrabbit 2.1 and I would like to add two custom String 
Properties to the Nodetypes
nt:unstructured and nt:resource. This is for storing an ID and a 
classname representation of the Hibernate Objects
I du this by adding a Mixin Type defined in the custom_nodetypes.xml file

In Java i used it this way:
..........
filenode.addMixin("myns:javaobject");
            filenode.setProperty("myns:javaclass", myclass);
            filenode.setProperty("myns:hibernateid", myuuid);
.........

everthing works fine until i restart the jackrabbit server. Then the two 
properties added to the nodes  is lost.
What is done wrong there?
Do i have to do something extra to store my additional nodetypes 
permanently to get the data after the reboot of jackrabbit server?
Could anyone  tell me how i could solve my problem; this would be really 
great!

----------------- my custom_nodetypes.xml in folder 
\repository\nodetypes -------------
<nodeTypes xmlns:myns="my-namespace"
          xmlns:nt="http://www.jcp.org/jcr/nt/1.0">

 <nodeType name="myns:javaobject"
           isMixin="true" hasOrderableChildNodes="false" primaryItemName=""
           isAbstract="false">
   <supertypes>
     <supertype>nt:base</supertype>
   </supertypes>

    <propertyDefinition name="myns:hibernateid"
                       requiredType="String"
                       autoCreated="false"
                       mandatory="false"
                       onParentVersion="COPY"
                       protected="false"
                       multiple="false"/>

    <propertyDefinition name="myns:javaclass"
                       requiredType="String"
                       autoCreated="false"
                       mandatory="false"
                       onParentVersion="COPY"
                       protected="false"
                       multiple="false"/>

 </nodeType>
</nodeTypes>
------------------------------------------------------------------------------------- 



Thanks again in advance for helping me
best regards
thomas

Mime
View raw message