Search in sources :

Example 1 with RepositoryStartupException

use of net.jforum.exceptions.RepositoryStartupException in project jforum2 by rafaelsteil.

the class ForumStartup method startForumRepository.

/**
	 * Starts the cache control for forums and categories.
	 * @throws RepositoryStartupException is something were wrong.
	 */
public static void startForumRepository() {
    try {
        ForumDAO fm = DataAccessDriver.getInstance().newForumDAO();
        CategoryDAO cm = DataAccessDriver.getInstance().newCategoryDAO();
        ConfigDAO configModel = DataAccessDriver.getInstance().newConfigDAO();
        ForumRepository.start(fm, cm, configModel);
    } catch (Exception e) {
        log.error("Unable to bootstrap JForum repository.", e);
        throw new RepositoryStartupException("Error while trying to start ForumRepository: " + e, e);
    }
}
Also used : ForumDAO(net.jforum.dao.ForumDAO) CategoryDAO(net.jforum.dao.CategoryDAO) ConfigDAO(net.jforum.dao.ConfigDAO) DatabaseException(net.jforum.exceptions.DatabaseException) RepositoryStartupException(net.jforum.exceptions.RepositoryStartupException) RepositoryStartupException(net.jforum.exceptions.RepositoryStartupException)

Aggregations

CategoryDAO (net.jforum.dao.CategoryDAO)1 ConfigDAO (net.jforum.dao.ConfigDAO)1 ForumDAO (net.jforum.dao.ForumDAO)1 DatabaseException (net.jforum.exceptions.DatabaseException)1 RepositoryStartupException (net.jforum.exceptions.RepositoryStartupException)1