3 Replies Latest reply on Apr 7, 2006 7:45 AM by Kamil Dworakowski

    remove on detached object no IllegalArgumentException??

    Raphael Parree Newbie

      Hi,

      In a small test application, I have a client, a remote session bean and an entity. In the client I have the following code:

      Employee e = manager.getByName("Jennifer Wirth");
      manager.fire(e);


      (Where manager is the Remote Session Bean).

      The implementation of the fire method is:

      // em is the entity manager
      em.remove(emp);



      According to the EJB spec 3.2.2 3rd option this should this not result in a IllegalArgumentException?

      The code above comes from an earlier Hibernate example. I know in hibernate the state transition from detached to transient is allowed.

      Is this a left ofer, feature or insight that this will change in the next draft (or am i just reading it wrong?)

      Cheers,

      Raphael