When using EJBs the EM may be closed. Need to check that.