Author: pete.muir(a)jboss.org
Date: 2009-03-15 15:55:43 -0400 (Sun, 15 Mar 2009)
New Revision: 2016
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverFactory.java
Log:
remove JTA deps
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverFactory.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverFactory.java 2009-03-15
19:54:16 UTC (rev 2015)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverFactory.java 2009-03-15
19:55:43 UTC (rev 2016)
@@ -20,6 +20,7 @@
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.bean.AbstractClassBean;
import org.jboss.webbeans.introspector.AnnotatedMethod;
+import org.jboss.webbeans.transaction.spi.TransactionServices;
/**
* Basic factory class that produces implicit observers for observer methods.
@@ -40,7 +41,7 @@
public static <T> ObserverImpl<T> create(AnnotatedMethod<?> method,
AbstractClassBean<?> declaringBean, ManagerImpl manager)
{
ObserverImpl<T> result = null;
- if (TransactionalObserverImpl.isObserverMethodTransactional(method))
+ if (manager.getServices().contains(TransactionServices.class) &&
TransactionalObserverImpl.isObserverMethodTransactional(method))
{
result = new TransactionalObserverImpl<T>(method, declaringBean,
manager);
}
Show replies by date