onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sclas...@apache.org
Subject svn commit: r1631832 - /onami/trunk/persist/src/main/java/org/apache/onami/persist/PersistenceModule.java
Date Tue, 14 Oct 2014 18:31:23 GMT
Author: sclassen
Date: Tue Oct 14 18:31:23 2014
New Revision: 1631832

URL: http://svn.apache.org/r1631832
Log:
ONAMI-115: servlet filter must be bound in singleton scope

Modified:
    onami/trunk/persist/src/main/java/org/apache/onami/persist/PersistenceModule.java

Modified: onami/trunk/persist/src/main/java/org/apache/onami/persist/PersistenceModule.java
URL: http://svn.apache.org/viewvc/onami/trunk/persist/src/main/java/org/apache/onami/persist/PersistenceModule.java?rev=1631832&r1=1631831&r2=1631832&view=diff
==============================================================================
--- onami/trunk/persist/src/main/java/org/apache/onami/persist/PersistenceModule.java (original)
+++ onami/trunk/persist/src/main/java/org/apache/onami/persist/PersistenceModule.java Tue
Oct 14 18:31:23 2014
@@ -22,6 +22,8 @@ package org.apache.onami.persist;
 import com.google.inject.AbstractModule;
 import com.google.inject.Key;
 import javax.inject.Provider;
+
+import com.google.inject.Scopes;
 import com.google.inject.TypeLiteral;
 
 import javax.persistence.EntityManagerFactory;
@@ -72,7 +74,7 @@ public abstract class PersistenceModule
     {
         configurePersistence();
 
-        bind( PersistenceFilter.class ).to( PersistenceFilterImpl.class );
+        bind( PersistenceFilter.class ).to( PersistenceFilterImpl.class ).in( Scopes.SINGLETON
);
 
         final AllPersistenceUnits allPersistenceUnits = new AllPersistenceUnits();
         requestInjection( allPersistenceUnits );



Mime
View raw message