-
1. Re: remove on detached object no IllegalArgumentException??
mwoelke Mar 6, 2006 10:26 AM (in response to rparree)hi,
u are receiving this exception since remove, as defined by the spec (persistence 3.1.1), throws illegalargumentexceptions for detached entities. If you want to remove the entity that way, u first have to reintegrate the entity instance in the persistence context using merge.
regards, milan wölke -
2. Re: remove on detached object no IllegalArgumentException??
rparree Mar 6, 2006 10:40 AM (in response to rparree)Milan,
Thanks for your post....However, the problem is i am NOT receiving this exception when I am indeed expecting it. My sentence was not too clear.. it should read
"According to the EJB spec [section] 3.2.2 3rd option should this not result in a IllegalArgumentException? [exception]"
Environment is jboss-4.0.4RC1
Cheers,
Raphael -
3. Re: remove on detached object no IllegalArgumentException??
luntain Apr 7, 2006 7:45 AM (in response to rparree)In Jboss 4.0.4.CR2: if you do it in the way of ejb3 spec final draft you would get an exception :). NonUniqueObjectException. You can remove only detached objects.