I have a multi-module JavaEE project where several beans carry methods
findByColumn(String value)
I'd like to factorize all these different findBy* methods in a single super class.
I know the risk of such design is that I could potentially create a bottleneck for my application when it comes to finding something in a given persistence unit.
However, I noticed that if I made this method asynchronous, then it could solve my bottleneck problem since the calls wouldn't be blocking.
I was wondering if it's possible to make the EntityManager transactions asynchronous, i.e., if the EntityManager is thread-safe, and if my solution would really solve the bottleneck problem.