/** * Stores all of the entities associated with the specified transaction. * As per the spec 9.6.4, entities must be synchronized with the datastore * when an ejbFind<METHOD> is called. * Also, all entities within entire transaction should be synchronized before * a remove, otherwise there may be problems with 'cascade delete'. * * @param tx the transaction that associated entites will be stored */ public static void synchronizeEntitiesWithinTransaction(Transaction tx) { // If there is no transaction, there is nothing to synchronize. if(tx != null) { getGlobalTxEntityMap().synchronizeEntities(tx); } }