Injection of PersistenceContext with PersistenceContextType EXTENDED
I'm currently looking at the new JPA Support of Spring 2.0 and also would like to know, how an Entity Manager injected via @PersitenceContext works, if you use PersistenceContextType EXTENDED. (See http://forum.springframework.org/showthread.php?t=27209)
As far as I understand, it's an container managed Entity Manager with the semantic of JPA extended entity manager.
My main problem with this Entity Manager: how closes it? It's not closed when a tx ends because it's an extended entity manager. On the other hand it can't be closed by the application, because it's a container managed entity manager.
Does it make sense to use PersistenceContextType EXTENDED in a purly Spring managed environment?
Any feedback is very welcome.