=== modified file 'sites/all/modules/contrib/mongodb/mongodb.module'
--- sites/all/modules/contrib/mongodb/mongodb.module	2010-04-14 03:21:30 +0000
+++ sites/all/modules/contrib/mongodb/mongodb.module	2010-05-11 20:35:31 +0000
@@ -90,6 +90,19 @@ function mongodb_test_group_finished() {
 }
 
 /**
+ * Allow for the database connection we are using to be changed.
+ *
+ * @param $alias
+ *   String the alias that we want to change the connection for.
+ * @param $connection_name
+ *   String the name of the connection we will use.
+ */
+function mongodb_set_active_connection($alias, $connection_name = 'default') {
+  // No need to check if the connection is valid as mongodb() does this.
+  $GLOBALS['conf']['mongodb_collections'][$alias] = $connection_name;
+}
+
+/**
  * Return the next id in a sequence.
  */
 function mongodb_next_id($name) {
