remove ejb behavior for services that do not benefit from it

This commit is contained in:
Athou
2013-04-05 21:57:22 +02:00
parent 41cbb1516a
commit 3db578a2d6
5 changed files with 3 additions and 10 deletions

View File

@@ -1,7 +1,5 @@
package com.commafeed.backend;
import javax.ejb.Stateless;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
@@ -11,7 +9,6 @@ import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpProtocolParams;
import org.apache.http.util.EntityUtils;
@Stateless
public class HttpGetter {
public String get(String url) throws Exception {

View File

@@ -1,6 +1,5 @@
package com.commafeed.backend.feeds;
import javax.ejb.Stateless;
import javax.inject.Inject;
import org.jsoup.Jsoup;
@@ -13,7 +12,6 @@ import com.commafeed.backend.HttpGetter;
import com.commafeed.backend.model.Feed;
import com.sun.syndication.io.FeedException;
@Stateless
public class FeedFetcher {
private static Logger log = LoggerFactory.getLogger(FeedFetcher.class);

View File

@@ -4,8 +4,6 @@ import java.io.StringReader;
import java.util.Calendar;
import java.util.List;
import javax.ejb.Stateless;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.SystemUtils;
import org.jsoup.Jsoup;
@@ -21,7 +19,6 @@ import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.io.FeedException;
import com.sun.syndication.io.SyndFeedInput;
@Stateless
public class FeedParser {
@SuppressWarnings("unchecked")

View File

@@ -1,5 +1,7 @@
package com.commafeed.backend.feeds;
import javax.ejb.Lock;
import javax.ejb.LockType;
import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.inject.Inject;
@@ -17,6 +19,7 @@ public class FeedTimer {
FeedUpdater updater;
@Schedule(hour = "*", minute = "*", persistent = false)
@Lock(LockType.READ)
private void timeout() {
for (Feed feed : feedService.findAll()) {
updater.update(feed);

View File

@@ -3,7 +3,6 @@ package com.commafeed.backend.feeds;
import java.io.StringReader;
import java.util.List;
import javax.ejb.Stateless;
import javax.inject.Inject;
import org.apache.commons.lang.StringUtils;
@@ -20,7 +19,6 @@ import com.sun.syndication.feed.opml.Outline;
import com.sun.syndication.io.FeedException;
import com.sun.syndication.io.WireFeedInput;
@Stateless
public class OPMLImporter {
@Inject