transaction not needed

This commit is contained in:
Athou
2013-04-16 10:53:56 +02:00
parent 852f834377
commit 11a9d68948

View File

@@ -4,7 +4,6 @@ import java.util.Calendar;
import java.util.Date;
import java.util.concurrent.Future;
import javax.annotation.Resource;
import javax.ejb.AsyncResult;
import javax.ejb.Asynchronous;
import javax.ejb.Stateless;
@@ -16,7 +15,6 @@ import javax.transaction.HeuristicRollbackException;
import javax.transaction.NotSupportedException;
import javax.transaction.RollbackException;
import javax.transaction.SystemException;
import javax.transaction.UserTransaction;
import org.apache.commons.lang.mutable.MutableBoolean;
import org.apache.commons.lang.time.DateUtils;
@@ -46,9 +44,6 @@ public class FeedRefreshWorker {
@Inject
FeedRefreshTaskGiver taskGiver;
@Resource
private UserTransaction transaction;
@Asynchronous
public Future<Void> start(MutableBoolean running, String threadName) {
log.info("{} starting", threadName);
@@ -102,8 +97,6 @@ public class FeedRefreshWorker {
feed.setErrorCount(errorCount);
feed.setDisabledUntil(disabledUntil);
transaction.begin();
if (fetchedFeed != null) {
feedUpdateService.updateEntries(feed, fetchedFeed.getEntries());
if (feed.getLink() == null) {
@@ -112,8 +105,6 @@ public class FeedRefreshWorker {
}
feedDAO.update(feed);
transaction.commit();
}
private Feed getNextFeed() {