Hi,
On 11/15/06, Ted Roeloffzen <[EMAIL PROTECTED]> wrote:
I have made a small web application with JackRabbit and the first time that
i run it I have to register the new nodetypedefinitions and the namespace
URI. Now is my question this: Is there a generic way to check whether or not
your using the repository for the first time?
I generally check whether my namespaces or nodetypes are already
registered. Something like this:
try {
session.getNamespacePrefix(MY_NAMESPACE);
} catch (NamespaceException e) {
// register the namespace(s)
}
or:
try {
session.getWorkspace().getNodeTypeManager()
.getNodeType(MY_NODETYPE);
} catch (NoSuchNodeTypeException e) {
// register the node type(s)
}
BR,
Jukka Zitting