rmpestano / cdi-generic-dao

see: http://youtu.be/9mGQx0tjxgo
http://rpestano.wordpress.com/2013/07/15/cdi-generic-dao/
8 stars 8 forks source link

Remove EntityClass from BaseDao #1

Closed rmpestano closed 11 years ago

rmpestano commented 11 years ago

BaseDao is a stateless session bean and should not hold state as EntityClass.

It in fact it cause an issue when Injecting BaseDao for multiple entities in the same bean because the container can return the same EJB instance and the original EntityClass will be lost.