remove serializable as it does not make sense

This commit is contained in:
Athou
2013-04-15 11:47:17 +02:00
parent 056023552a
commit f8faa69f02
12 changed files with 9 additions and 14 deletions

View File

@@ -7,6 +7,8 @@ import java.util.concurrent.Future;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.ejb.ConcurrencyManagement;
import javax.ejb.ConcurrencyManagementType;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.inject.Inject;
@@ -27,6 +29,7 @@ import com.google.api.client.util.Lists;
@Startup
@Singleton
@ConcurrencyManagement(ConcurrencyManagementType.BEAN)
public class StartupBean {
private static Logger log = LoggerFactory.getLogger(StartupBean.class);
@@ -65,8 +68,10 @@ public class StartupBean {
}
ApplicationSettings settings = applicationSettingsService.get();
log.info("Starting {} background threads",
settings.getBackgroundThreads());
for (int i = 0; i < settings.getBackgroundThreads(); i++) {
Future<Void> thread = worker.start();
Future<Void> thread = worker.start("Thread " + i);
threads.add(thread);
}

View File

@@ -4,7 +4,6 @@ import javax.ejb.Stateless;
import com.commafeed.backend.model.ApplicationSettings;
@SuppressWarnings("serial")
@Stateless
public class ApplicationSettingsDAO extends GenericDAO<ApplicationSettings> {

View File

@@ -15,7 +15,6 @@ import com.google.common.collect.Lists;
import com.uaihebert.model.EasyCriteria;
@Stateless
@SuppressWarnings("serial")
public class FeedCategoryDAO extends GenericDAO<FeedCategory> {
public List<FeedCategory> findAll(User user) {

View File

@@ -20,7 +20,6 @@ import com.google.common.collect.Iterables;
import com.uaihebert.model.EasyCriteria;
@Stateless
@SuppressWarnings("serial")
public class FeedDAO extends GenericDAO<Feed> {
public List<Feed> findNextUpdatable(int count) {

View File

@@ -16,7 +16,6 @@ import com.google.api.client.util.Lists;
import com.uaihebert.model.EasyCriteria;
@Stateless
@SuppressWarnings("serial")
public class FeedEntryDAO extends GenericDAO<FeedEntry> {
public List<FeedEntry> findByGuids(List<String> guids) {

View File

@@ -29,7 +29,6 @@ import com.google.api.client.util.Maps;
import com.uaihebert.model.EasyCriteria;
@Stateless
@SuppressWarnings("serial")
public class FeedEntryStatusDAO extends GenericDAO<FeedEntryStatus> {
public FeedEntryStatus findById(User user, Long id) {

View File

@@ -14,7 +14,6 @@ import com.uaihebert.factory.EasyCriteriaFactory;
import com.uaihebert.model.EasyCriteria;
@Stateless
@SuppressWarnings("serial")
public class FeedSubscriptionDAO extends GenericDAO<FeedSubscription> {
public FeedSubscription findById(User user, Long id) {

View File

@@ -1,6 +1,5 @@
package com.commafeed.backend.dao;
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
@@ -20,8 +19,7 @@ import com.uaihebert.factory.EasyCriteriaFactory;
import com.uaihebert.model.EasyCriteria;
@SuppressWarnings("serial")
public abstract class GenericDAO<T extends AbstractModel> implements
Serializable {
public abstract class GenericDAO<T extends AbstractModel> {
private TypeToken<T> type = new TypeToken<T>(getClass()) {
};

View File

@@ -10,7 +10,6 @@ import com.commafeed.backend.model.User;
import com.commafeed.backend.model.User_;
@Stateless
@SuppressWarnings("serial")
public class UserDAO extends GenericDAO<User> {
public User findByName(String name) {

View File

@@ -11,7 +11,6 @@ import com.commafeed.backend.model.UserRole.Role;
import com.commafeed.backend.model.UserRole_;
import com.google.common.collect.Sets;
@SuppressWarnings("serial")
@Stateless
public class UserRoleDAO extends GenericDAO<UserRole> {

View File

@@ -10,7 +10,6 @@ import com.uaihebert.factory.EasyCriteriaFactory;
import com.uaihebert.model.EasyCriteria;
@Stateless
@SuppressWarnings("serial")
public class UserSettingsDAO extends GenericDAO<UserSettings> {
public UserSettings findByUser(User user) {

View File

@@ -52,7 +52,8 @@ public class FeedRefreshWorker {
private boolean running = true;
@Asynchronous
public Future<Void> start() {
public Future<Void> start(String threadName) {
log.info("{} starting", threadName);
while (running) {
try {
Feed feed = getNextFeed();