|WebServiceHandler does not use template method to create EntityManager [message #998801]
||Thu, 10 January 2013 13:08
| Donat Mueller
Registered: January 2013
In WebServiceHandler.java on line 133 an EntityManager for the the ServiceContext is created with
entityManager = EntityManagerProvider.getInstance().createEntityManager();
There is a template method protected EntityManager createEntityManager() which is never used.
The descriptions says:
Can be overridden for specific logic to get the entity manager. In that case also override the releaseEntityManager().
I want to delegate requests for virtual models (without jpa annotations) to a generic persistent model. Therefore it would be convenient to override the EntityManager in order to translate the requests to the other model and then reply with marshaled objects from the source model.
Please let me know if there is a reason for not using the template method.
Powered by FUDForum
. Page generated in 0.01520 seconds