changeset 135:f33f6e1ba9f8

Changed scope of repositories.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 13 Jun 2013 17:19:53 +0200
parents 8250e5bb7c84
children 168db8339867
files src/main/java/de/intevation/lada/data/LMessungRepository.java src/main/java/de/intevation/lada/data/LProbeRepository.java src/main/java/de/intevation/lada/data/Repository.java
diffstat 3 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/data/LMessungRepository.java	Thu Jun 13 17:19:17 2013 +0200
+++ b/src/main/java/de/intevation/lada/data/LMessungRepository.java	Thu Jun 13 17:19:53 2013 +0200
@@ -5,7 +5,6 @@
 import java.util.Map;
 
 import javax.ejb.EJBTransactionRolledbackException;
-import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
 import javax.inject.Named;
 import javax.persistence.EntityExistsException;
@@ -27,7 +26,7 @@
  * 
  * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
  */
-@ApplicationScoped
+@Named("lmessungrepository")
 public class LMessungRepository
 extends Repository
 {
--- a/src/main/java/de/intevation/lada/data/LProbeRepository.java	Thu Jun 13 17:19:17 2013 +0200
+++ b/src/main/java/de/intevation/lada/data/LProbeRepository.java	Thu Jun 13 17:19:53 2013 +0200
@@ -5,7 +5,6 @@
 import java.util.Map;
 
 import javax.ejb.EJBTransactionRolledbackException;
-import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
 import javax.inject.Named;
 import javax.persistence.EntityExistsException;
@@ -29,7 +28,6 @@
  * 
  * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
  */
-@ApplicationScoped
 @Named("lproberepository")
 public class LProbeRepository extends Repository{
 
--- a/src/main/java/de/intevation/lada/data/Repository.java	Thu Jun 13 17:19:17 2013 +0200
+++ b/src/main/java/de/intevation/lada/data/Repository.java	Thu Jun 13 17:19:53 2013 +0200
@@ -3,13 +3,12 @@
 import java.util.List;
 import java.util.Map;
 
-import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.RequestScoped;
 import javax.inject.Inject;
 import javax.persistence.EntityManager;
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Root;
-import javax.inject.Named;
 
 import de.intevation.lada.rest.Response;
 
@@ -19,8 +18,7 @@
  * 
  * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
  */
-@Named
-@ApplicationScoped
+@RequestScoped
 public abstract class Repository
 {
     /**
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)