blog.removeCategory(category);
try {
// remove it from the persistent store
DAOFactory factory = DAOFactory.getConfiguredFactory();
CategoryDAO dao = factory.getCategoryDAO();
dao.deleteCategory(category, blog);
} catch (PersistenceException pe) {
pe.printStackTrace();
}
}
}