Hi,
I would like to save time on the construction of the entityManagerFactory for at least two reasons:
- We have 300 overnight batches, and we don’t have the option to add 10 seconds x 300 batches = 50 minutes (we would need to reduce the number of batches, I admit ^^).
- We also run a significant number of integration tests, which are increasingly time-consuming.
The idea is therefore to save time on the construction of the entityManagerFactory by serializing it, as shown here:
But from what I understood, the serialization of the entityManagerFactory is customized to be added to the EntityManagerFactoryRegistry for use via JNDI. So, it compromises my plan a bit.
Is it possible to build an entityManagerFactory in one JVM and utilize it in other JVMs?
Should a distributed cache be used to accomplish this?
Thank you !