farrukh_najmi wrote:
Hi Guys,
Does any one have any suggestions on my question. Please let me know if I was not clear in my post. Thanks.
I have tried adding logic to detect that PersistenceException is caused by a JDBCConnectionException and if so creating a new EntityManager to use for my query.
This does not seem to work either. The retried query using the new EntityManager gives the same PersistenceException is caused by a JDBCConnectionException. I have validated in debugger that the retry is done with a newly created EntityManager.
So my rephrased question is... How do I use force hibernate layer to create a new connection to the database if a newly created EntityManager does not do the trick? Where in hibernate layers is the connection to the database made?
I assume this is something many people before me have needed to do so please share your experience. Thanks.