Force reconnect code if connection lost
Posted: Wed 14 Apr 2010 07:11
Hi
Just want to find out if it is possible to force the execution of the reconnect code if the msconnection comp lost the connection. This is when a automatic failover occurs. Normally it works fine and the onconnectionlost event is fired, but sometimes a error occurs, example network cable is unplugged,and the onerror event is fired. i want to know if it is possible to try re-establish the connection, from within the onerror event, using the same code that is used when the failover occurs succesfully and the onconnectionlost event is fired.
The reason is that is seems that if connection is redirected successfully all transactions are restored for the connection. If I just close and reopen the connection in the onError event, all the transactions are lost.
I just want to re try the entire reconnect process, after some additional check to ensure that failover is complete and the new principal is ready.
regards
M
Just want to find out if it is possible to force the execution of the reconnect code if the msconnection comp lost the connection. This is when a automatic failover occurs. Normally it works fine and the onconnectionlost event is fired, but sometimes a error occurs, example network cable is unplugged,and the onerror event is fired. i want to know if it is possible to try re-establish the connection, from within the onerror event, using the same code that is used when the failover occurs succesfully and the onconnectionlost event is fired.
The reason is that is seems that if connection is redirected successfully all transactions are restored for the connection. If I just close and reopen the connection in the onError event, all the transactions are lost.
I just want to re try the entire reconnect process, after some additional check to ensure that failover is complete and the new principal is ready.
regards
M