|Check the connection and try to reconnect [message #515364]
||Thu, 18 February 2010 15:15
Registered: February 2010
I use EL and Spring in a RCP-Application.|
There're two problems:
1.) Is there an easy way to check the database connection? Currently I create a simple query on the entitymanager and check the result. But I think, there have to be a better solution. I also tried EnityManger#isOpen: This returns always true, even when the connection is lost (strange).
2.) When I lost the connection (deactivate the network-connection) I get the following message:
[EL Fine]: 2010-02-18 15:30:22.108--ServerSession(20612044)--Thread(Thread[Thread-8,5,spring-osgi-extender[7736bd]-threads])--SELECT 1
[EL Info]: 2010-02-18 15:30:22.108--UnitOfWork(20457864)--Thread(Thread[Thread-8,5,spring-osgi-extender[7736bd]-threads])--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query.
But when I reactivate the network connection, nothing happens and the app hangs up.
Has anyone an idea, what I could do?
[Updated on: Thu, 18 February 2010 15:15]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01611 seconds