posted 5 years ago
Well, if you're willing to define one externally, here's something that I use. Note that this is Hibernate JPA, not legacy Hibernate, and that the connection pool information is supplied external to the webapp via JNDI:
This setup is designed to inject EntityManagers directly into the DAOs used by the webapp via their @PersistenceContext annotations. It's a little old, so there may be some cruft and/or anachronisms in it, but it worked last time I deployed with it.
I'm going to be a "small government" candidate. I'll be the government. Just me. No one else.