message.getCompanyId(), MBMessage.class.getName(),
ResourceConstants.SCOPE_INDIVIDUAL, message.getMessageId());
}
mbMessagePersistence.remove(message);
}
<BUG>if (!rootMessage.isDiscussion()) {
MBCategory category = mbCategoryPersistence.findByPrimaryKey(</BUG>
thread.getCategoryId());
category.setThreadCount(category.getThreadCount() - 1);
category.setMessageCount(

message.getCompanyId(), MBMessage.class.getName(),
ResourceConstants.SCOPE_INDIVIDUAL, message.getMessageId());
}
mbMessagePersistence.remove(message);
}
if (rootMessage.getCategoryId() > 0) {
MBCategory category = mbCategoryPersistence.findByPrimaryKey(
thread.getCategoryId());
category.setThreadCount(category.getThreadCount() - 1);
category.setMessageCount(
