database - Java EclipseLink EntityManger: Way to Ensure Connection Can be Established? -
i'm using eclipselink 2.4 in jax-rs (jersey) application.
in base controller, connect database, since entity manager really connects when query executed, exception thrown.
is there way determine if can connect database after entitymanager object can handle exception myself (and fail on manually database).
edit: assume cannot change underlying dbms @ all.
you create servletcontextlistener , run query on startup application. if fails out of luck error handling guess.
you should clustered ha database.
Comments
Post a Comment