During the server start up(tomcat) I am creating an entitymangerfactory and storing into the memory. My question, is there any way I can check the connection state during this time?
What is happening now, it is creating an entitymangerfactory object during startup, but do not test whether has connected the database or not. With invalid configuration it is creating the entitymanagerfactory but when we are trying to execute some queries only then I am getting the exception.
What should I do if I want to check the connection state during server startup?
Thanks in advance
-regards, Somnath Guha