JavaEE6: How to safeguard web application when the database shut down
问题 First of all, my framework is Java EE 6 with JSF, managed bean, EJB and JPA. I write a simple program to query information from the database. So when I click a button, it trigger an event to a managed bean, where an event listener method will access EJB method. The EJB method will do a simple select query to an Entity. If the database is shutdown before or during the time I select , I get an exception Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org