Author: swd847
Date: 2010-09-21 06:28:15 -0400 (Tue, 21 Sep 2010)
New Revision: 13770
Modified:
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java
Log:
minor
Modified:
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java
===================================================================
---
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java 2010-09-21
10:06:33 UTC (rev 13769)
+++
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java 2010-09-21
10:28:15 UTC (rev 13770)
@@ -25,10 +25,8 @@
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import javax.annotation.Resource;
@@ -82,8 +80,6 @@
private static final Logger log =
LoggerFactory.getLogger(ManagedPersistenceContextExtension.class);
- private Map<String, Bean<EntityManagerFactory>> emfBeans = new
HashMap<String, Bean<EntityManagerFactory>>();
-
public void beforeBeanDiscovery(@Observes BeforeBeanDiscovery event)
{
ServiceLoader<SeamPersistenceProvider> providers =
ServiceLoader.load(SeamPersistenceProvider.class);
@@ -111,7 +107,7 @@
boolean bootstrapped = false;
for (AnnotatedField<? super T> f : event.getAnnotatedType().getFields())
{
- if (f.isAnnotationPresent(PersistenceUnit.class) &&
f.isAnnotationPresent(Produces.class) && EnvironmentUtils.isEEEnvironment())
+ if (f.isAnnotationPresent(PersistenceUnit.class) &&
f.isAnnotationPresent(Produces.class) && !EnvironmentUtils.isEEEnvironment())
{
bootstrapped = true;
final String unitName = f.getAnnotation(PersistenceUnit.class).unitName();
Show replies by date