if(!jdopo.speedoGetHome().isDetachable()){
throw new JDOUserException("This class cannot be detached: it has not been defined as detachable in the jdo file.");
}
jdopo.speedoGetHome().sendEvent(HomeItf.PRE_DETACH, jdopo, null);
//persistent_new or persistent_dirty: updated with object id and version
if(jdopo.jdoIsTransactional() && jdopo.jdoIsDirty()){
try{
StateItf sa = (StateItf) tpm.writeIntention(tx, jdopo, null);
if(!sa.hasBeenFlush()){
//flush
tpm.flush(tx, sa);