mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
write lock subscription
This commit is contained in:
@@ -2,7 +2,9 @@ package com.commafeed.backend.services;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ejb.Stateless;
|
||||
import javax.ejb.Lock;
|
||||
import javax.ejb.LockType;
|
||||
import javax.ejb.Singleton;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import com.commafeed.backend.dao.FeedDAO;
|
||||
@@ -17,7 +19,7 @@ import com.commafeed.backend.model.FeedSubscription;
|
||||
import com.commafeed.backend.model.User;
|
||||
import com.google.api.client.util.Lists;
|
||||
|
||||
@Stateless
|
||||
@Singleton
|
||||
public class FeedSubscriptionService {
|
||||
|
||||
@Inject
|
||||
@@ -32,6 +34,7 @@ public class FeedSubscriptionService {
|
||||
@Inject
|
||||
FeedSubscriptionDAO feedSubscriptionDAO;
|
||||
|
||||
@Lock(LockType.WRITE)
|
||||
public void subscribe(User user, String url, String title,
|
||||
FeedCategory category) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user