On Sun, Jan 24, 2010 at 1:19 AM, ChadDavis <[email protected]> wrote: > I'm using the following line of code to register custom node types, > Jackrabbit-2.0-beta3. > > manager.registerNodeTypes(new FileInputStream("./nodeTypes.cnd"), > JackrabbitNodeTypeManager.TEXT_X_JCR_CND); > > This works great, but not exactly as I expected. I expected that I > could keep a single node type file, and add to it when I wanted to add > another custom node type. However, this doesn't work. It seems that > if a node type is already registered, the whole process fails. No > errors or anything, but none of the node types are registered.
the said method should IMO throw an exception in such a situation. please report a jira issue if it doesn't. > In > other words, the .cnd file has to be completely full of new node > types, or none of them are loaded. Shouldn't the behavour be that it > skips already registered types, but continues to scan the file for > other node types that haven't been registered yet? IMO no ;) but there following method pretty much does what you'e looking for: http://jackrabbit.apache.org/api/1.6/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.html#registerNodeTypes(java.io.InputStream,%20java.lang.String,%20boolean) cheers stefan >
