Author: shane.bryzak(a)jboss.com
Date: 2010-07-19 02:14:01 -0400 (Mon, 19 Jul 2010)
New Revision: 13439
Modified:
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/TransactionInterceptor.java
Log:
interceptor should be passivation capable
Modified:
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/TransactionInterceptor.java
===================================================================
---
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/TransactionInterceptor.java 2010-07-19
05:52:25 UTC (rev 13438)
+++
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/TransactionInterceptor.java 2010-07-19
06:14:01 UTC (rev 13439)
@@ -21,11 +21,13 @@
*/
package org.jboss.seam.persistence.transaction;
+import java.io.Serializable;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
+import javax.enterprise.inject.Instance;
import javax.inject.Inject;
import javax.interceptor.AroundInvoke;
import javax.interceptor.Interceptor;
@@ -43,14 +45,13 @@
*/
@Transactional
@Interceptor
-public class TransactionInterceptor
+public class TransactionInterceptor implements Serializable
{
private static final long serialVersionUID = -4364203056333738988L;
transient private Map<AnnotatedElement, TransactionMetadata> transactionMetadata
= new HashMap<AnnotatedElement, TransactionMetadata>();
- @Inject
- UserTransaction transaction;
+ @Inject Instance<UserTransaction> transaction;
private class TransactionMetadata
{
@@ -139,7 +140,7 @@
}
}
- }.workInTransaction(transaction);
+ }.workInTransaction(transaction.get());
}
}
Show replies by date