[jboss-user] [JBoss Seam] - Re: flushMode= MANUAL, when does commit happen? And other qu

enzhao do-not-reply at jboss.com
Thu Jul 12 17:32:40 EDT 2007


yes tested, it works....The @Destroy method is now like this....


  | @Remove
  |   @Destroy
  |   public void destroy() {
  |     if (!this.completedOrCanceled) {
  |       if (this.motherEntity.getId() != null) {
  |         entityManager.merge(this.recipe); // without merging there might be exception saying you are trying to remove a detached object.....
  |         entityManager.remove(this.recipe);
  |         entityManager.flush();
  |       }
  |     }
  |   }
  | 

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

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



More information about the jboss-user mailing list