Just some more information,

I tried using merge to re-associate the object with the manager. The problem is 
that I have no active transaction, because I don't want the data committed yet 
(I using SeamExtendedManagedPersistencePhaseListener)

So when I called my method with NOT_SUPPORTED transaction type, I got an error. 
Method:
  private void beginEditProperties()
  |   {
  |     if (clone != null)
  |     {
  |       if (editingUser.getId() != null)
  |         editingUser = entityManager.merge(clone);
  |       clone = null;
  |     }
  |     
  |     try
  |     {
  |       clone = ObjectUtils.deepClone(editingUser);
  |     }
  |     catch (Exception ex)
  |     {
  |       handleActionError(ex);
  |     }
  |   }
  | 

Exception:
Caused by: java.lang.IllegalStateException: No transaction.
  |         at org.jboss.tm.TxManager.setRollbackOnly(TxManager.java:751)
  |         at 
org.hibernate.ejb.AbstractEntityManagerImpl.markAsRollback(AbstractEntityManagerImpl.java:392)
  |         at 
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:545)
  |         at 
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:567)
  |         at 
org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:210)
  | ...
  | 

So I seem to be stuck as I can't start a transaction, as EntityManager has no 
way of saying not to flush on this JSF action and I need the transaction to 
re-associate my clone with the entity manager in order to lazy load my children 
objects that may not have been loaded yet.

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

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


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to