*/
public void setupRepository(Session session) throws RepositoryException {
log.info("Setting up the repository, registering node types etc.");
try {
Node root = session.getRootNode();
Workspace ws = session.getWorkspace();
//no need to set it up again, skip it if it has.
boolean registered = RulesRepositoryAdministrator.isNamespaceRegistered( session );
if (!registered) {
ws.getNamespaceRegistry().registerNamespace("drools", RulesRepository.DROOLS_URI);
//Note, the order in which they are registered actually does matter !
jcrRepositoryConfigurator.registerNodeTypesFromCndFile("/node_type_definitions/tag_node_type.cnd", session, ws);
jcrRepositoryConfigurator.registerNodeTypesFromCndFile("/node_type_definitions/state_node_type.cnd", session, ws);
jcrRepositoryConfigurator.registerNodeTypesFromCndFile("/node_type_definitions/versionable_node_type.cnd", session, ws);