[seam-commits] Seam SVN: r14557 - branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-ejb/src/main/java/com/jboss/dvd/seam.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Apr 12 08:09:11 EDT 2012
Author: maschmid
Date: 2012-04-12 08:09:10 -0400 (Thu, 12 Apr 2012)
New Revision: 14557
Modified:
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-ejb/src/main/java/com/jboss/dvd/seam/CheckoutAction.java
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-ejb/src/main/java/com/jboss/dvd/seam/ShowOrdersAction.java
Log:
JBSEAM-4931 Fix dvdstore example attempting to use transactional and extended persistence contexts in one transaction
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-ejb/src/main/java/com/jboss/dvd/seam/CheckoutAction.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-ejb/src/main/java/com/jboss/dvd/seam/CheckoutAction.java 2012-04-12 12:01:40 UTC (rev 14556)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-ejb/src/main/java/com/jboss/dvd/seam/CheckoutAction.java 2012-04-12 12:09:10 UTC (rev 14557)
@@ -16,7 +16,6 @@
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Begin;
@@ -37,7 +36,7 @@
{
private static final long serialVersionUID = -4651884454184474207L;
- @PersistenceContext(type=PersistenceContextType.EXTENDED)
+ @PersistenceContext
EntityManager em;
@In(value="currentUser",required=false)
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-ejb/src/main/java/com/jboss/dvd/seam/ShowOrdersAction.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-ejb/src/main/java/com/jboss/dvd/seam/ShowOrdersAction.java 2012-04-12 12:01:40 UTC (rev 14556)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-ejb/src/main/java/com/jboss/dvd/seam/ShowOrdersAction.java 2012-04-12 12:09:10 UTC (rev 14557)
@@ -13,7 +13,6 @@
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Begin;
@@ -40,7 +39,7 @@
@In(value="currentUser",required=false)
Customer customer;
- @PersistenceContext(type=PersistenceContextType.EXTENDED)
+ @PersistenceContext
EntityManager em;
@DataModel
@@ -67,7 +66,7 @@
@ResumeProcess(definition="OrderManagement", processKey="#{orders.rowData.orderId}")
public String cancelOrder() {
-
+ order = em.merge(order);
em.refresh(order);
if ( order.getStatus() != Status.OPEN ) {
@@ -82,6 +81,7 @@
}
public String detailOrder() {
+ order = em.merge(order);
em.refresh(order);
return "showorders";
}
More information about the seam-commits
mailing list