According to the Operations allowed table on page 88, EntityManager Access is not allowed in PreDestroy methods. Section 5.7.1.2, page 126 of the core spec shows an example where PreDestroy method calls em.close(). Is this an error?
I am having a tough time with the operations allowed tables (outside of the obvious cases like container manager bean using getUserTransactions()), any pointers on how to go about it. I did read the reasons why operations are not allowed but they don't cover everything. As an example for stateless session bean why is getBusinessObject of sessionContext not allowed in dependency injection methods but allowed in PostConstruct.