I require adding a little intelligence to the JPA EntityManager, customizing the createNamedQuery.
I'm working in a project build of many modules, where every module annotates its instance of EntityManager with @PersistenceContext(unitName = "emModuleName").
It seems that I cannot simply extends the interface EntityManager, but I don't find any documentation about this matter online.
Does anyone has an idea what is the best solution for my needs?
I cannot extend one specific implementation because the application has to be JPA implementation independent. Thanks