Had some interesting feedback from a failing test which turned out to be applying an incorrect usage of FullTextEntityManager in an EJB context.
The injections points were wrongly mapped because of how CDI and @PersistenceContext was being applied, making it attempt using an underlying EntityManager which was already closed.
The tricky part is that it would sometimes work fine; the discriminating factor turned out to be that some of the operations exposed on the FullTextEntityManager don't actually make use of the underlying EntityManager. For example, when running a FullTextQuery you wouldn't have an exception about the EntityManager being closed if there are no matches for the query.
|