mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
remove ejb behavior for services that do not benefit from it
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user