I'm sorry guys I'm not able to follow this rich discussion these days. I will try to read the backlog later next week. I've also asked other guys from CDI/Weld team to take a look at it.
- AfterBeanDiscovery and connecting JPA "state" to extension - yes, I understand; the other question how to implement this properly for more complicated use cases: multiple persistence units are used, EAR deployment, etc.
- enhancing the CDI API - ok, we could bring this to CDI EG and add something to 2.0; in the mean time we would have to enchance the Weld API (i.e. non-portable solution)
I personally think this should be solved at the spec level, both JPA and CDI - the spec should define some minimal requirements so that smooth and portable cooperation is possible. I believe there is no portable way to do it right now. |