[jboss-user] [EJB 3.0] - Re: Removing a detached instance

idefix-free do-not-reply at jboss.com
Tue Jul 17 03:34:36 EDT 2007

Still the same error:

  | 	public String delete()
  | 	{
  | 		String id = FacesContext.getCurrentInstance()
  |         .getExternalContext().getRequestParameterMap()
  |         .get("selectedId");
  | 		selectedSpielplatz = dao.findById(Long.valueOf(id), false);
  | 		selectedSpielplatz=dao.merge(selectedSpielplatz);
  | 		dao.makeTransient(selectedSpielplatz);
  | 		selectedSpielplatz=null;
  | 		return "list";
  | 	}
But I dont understand, that if I load the object(selectedspielplatz) why it is not managed.
Why are the objects always detached?
I tried the same thing with glassfish and toplink and I haven't this problem.
Is it really necessary always to merge before making an operation, or is it possible to reconfigure something, maybe entity manager per session?

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

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

More information about the jboss-user mailing list