I believe what you want is a DataSourceKeyResolver. You could have two DataSourceKeys in your ibconfig file, called something like "default_primary" and "default_secondary". In the Resolver code, you could check for availability of the primary server and use the secondary one in case of an outage. In the event of a disconnect once you've instantiated your PM, you could also switch over to the other DataSourceKey and therefore the other server.
Off the top of my head, I'm not sure whether you can change the DataSourceKey of an instantiated PM, or whether you'd have to start a new one and then copy all your existing changes over.