this is not doable in Java (ie to change one class into another one), hence it's not possible in EJB3.
i agree, but the problem is not creating the right subclasse in java (done by copying every attribute and/or using a special constructor).
Suppose baseclasse X and subclasse A and B.
I have a persistent object A, i create an object B with the SAME ID in A.
The problem is that i can not persist object B without deleting A first.
If i delete A and persist B in 1 transaction on what moment is the consistency checked by the application server (at the moment of delete of A or at the end of the transaction ?)
I don't really understand your question, but your domain could probably be refactored (and benefit from it) wo using inheritance