MwCertificateX509 mwCertificateX509;
try {
mwCertificateX509 = em.getReference(MwCertificateX509.class, id);
mwCertificateX509.getId();
} catch (EntityNotFoundException enfe) {
throw new NonexistentEntityException("The mwCertificateX509 with id " + id + " no longer exists.", enfe);
}
em.remove(mwCertificateX509);
em.getTransaction().commit();
} finally {
em.close();