title: Fallback Mechanism - Best approach?
body: <p>I have three different types of server connection. These can be configured in properties file.</p>
  
  <p>Say there are three servers:</p>
  
  <pre><code>Server1
  Server2
  Server3
  </code></pre>
  
  <p>In <code>Properties</code> file, I've configured as below:</p>
  
  <pre><code>ServerPref1 = Server1
  ServerPref2 = Server2
  ServerPref3 = Server3
  </code></pre>
  
  <p>In code level, my fall back mechanism is as below:</p>
  
  <pre><code>    private static void getServerAndConnect() {
          try {
              connect(Properties.ServerPref1);
          } catch (ServerException se1) {
              try {
                  connect(Properties.ServerPref2);
              } catch (ServerException se2) {
                  try {
                      connect(Properties.ServerPref3);
                  } catch (ServerException se3) {
                      // Unable to connect
                  }
              }
          }
      }
  </code></pre>
  
  <p>The <code>connect()</code> method will throw custom <code>ServerException</code>, if unable to connect to server.</p>
  
  <p>Everything works as expected.</p>
  
  <p>My question is: <strong><em>Is this the correct or best way to implement fallback mechanism?</em></strong></p>