CDI injection in EntityListeners

前端 未结 1 1053
渐次进展
渐次进展 2020-12-10 14:48

Since JPA 2.0 does not support injection into EntityListener (JPA 2.1 will), decided to use JNDI lookup to get the BeanManager and through it get the logged in

相关标签:
1条回答
  • 2020-12-10 15:14

    Your approach is correct.

    Performance throughput?

    IMHO no need to worry - JPA 2.1 will use an equivalent mechanism. But make sure to write a realistic test to be on the safe side.

    What happens when there are multiple logged in users updating entities concurrently in their own scopes?

    All (non-dependend-scoped) bean references are proxied internally. The underlaying CDI-implementation has to guarantee the correct resolution.

    0 讨论(0)
提交回复
热议问题