[jboss-user] [JBoss Seam] - Seam persistence with Web Service

paradigmza do-not-reply at jboss.com
Thu May 31 05:38:03 EDT 2007


Hello,

I am trying to use Seam managed persistence (Seam Application Framework) with a web service on Jboss 4.0.5 with ws 1.2.1 and seam 1.2.1.




  | @WebService
  | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
  | public class JustSwipeService {
  | 
  | 	@WebMethod
  | 	public boolean saveSettlement(Settlement settlement) throws Exception {
  | 		SettlementHome settlementHome = (SettlementHome) Component.getInstance(
  | 				"settlementHome", true);
  | 		settlementHome.setInstance(settlement);
  | 		settlementHome.persist();
  | 		return true;
  | 	}
  | 
  | }

When I call this I get the exception

anonymous wrote : 
  | 11:15:50,459 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
  | javax.persistence.TransactionRequiredException: No active JTA transaction on joinTransaction call
  |         at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:469)
  |         at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:442)
  |         at org.jboss.seam.persistence.EntityManagerProxy.joinTransaction(EntityManagerProxy.java:113)
  |         at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:47)

is there an elegant way to solve this?

Thanks
Sean.

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

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



More information about the jboss-user mailing list