code: private void connect_to_dbase(final Connection connection) throws DevFailed {
  		if (connection.device == null) {
  	    	try {
                  // Prepare the connection string
                  final String db_corbaloc = "corbaloc:iiop:" + connection.url.host + ":"
                      + connection.url.strPort + "/database";
                  // And connect to database.
                  createDevice(connection, db_corbaloc);
                  connection.classname = "Database";
   	    	} catch (final SystemException ex) {
  				if (connection.transparent_reconnection) {
  		    		try {
                          final DbRedundancy dbr = DbRedundancy.get_instance();
                          final String th2 = dbr.get(connection.url.host + ":" + connection.url.port);
  
                          // Prepare the connection string
                          final String db_corbaloc = "corbaloc:iiop:" + th2 + "/database";
  
                          // And connect to database.
                          createDevice(connection, db_corbaloc);
                          // System.out.println("Connected to " + db_corbaloc);
                      } catch (final SystemException e) {
                          // e.printStackTrace();
                          connection.device = null;
                          connection.ior = null;
                          Except.throw_connection_failed("TangoApi_DATABASE_CONNECTION_FAILED",
                              "Connection to database failed  !\n" + e, "connect_to_dbase("
                                  + connection.url.host + "," + connection.url.strPort + ")");
   		    		}
  				} else {
  		    		// e.printStackTrace();
  		    		connection.device = null;
  		    		connection.ior = null;
      		    	Except.throw_connection_failed("TangoApi_DATABASE_CONNECTION_FAILED",
  	    		    	"Connection to database failed  !\n" + ex, "connect_to_dbase("
  		    		    	+ connection.url.host + "," + connection.url.strPort + ")");
  				}
  	    	}
  		}
      }
docs: ===================================================================