[jboss-user] [EJB 3.0 Users] - Re: Persistence Context Transaction

MarcusDidiusFalco do-not-reply at jboss.com
Wed Dec 2 09:59:39 EST 2009


I found the bug:

The checkout method must return the order returned by the entity manager. 


  | @Stateless
  | public class WarehouseBean implements Warehouse {
  | 
  | 	@PersistenceContext(unitName="ECB")
  | 	EntityManager entityManager;
  | 	
  | 	@TransactionAttribute(TransactionAttributeType.MANDATORY)
  | 	public Order checkout(Order order) {
  | 		return this.entityManager.merge(order);
  |                 //wrong: return order
  | 	}
  | }
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268561#4268561

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268561



More information about the jboss-user mailing list