title: Configure Symfony to use multiple mongodb databases
body: <p>In my application i have to use two different MongoDb databses.
  So i followed the instruction in the following  <a href="http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/config.html" rel="nofollow">link</a>.Here is a part of my app/config.yml file </p>
  
  <pre><code>doctrine_mongodb:
      default_database: music_store_database
      default_connection: conn1
      default_document_manager: dm1
      connections:
         conn1:
            server: mongodb://localhost:27017
            options:
               connect: true
               db: music_store_database
        conn2:
           server: mongodb://localhost:27017
           options:
              connect: true
              db: another_database
      document_managers:
          dm1:
              connection: conn1
              mappings:
                  MyfirstBundle: ~
          dm2:
              connection: conn2
              mappings:
                  MySecondBundle: ~  
  </code></pre>
  
  <p>Now if i do an ./app/console cache:clear --env=prod or anything else i get this issue:</p>
  
  <pre><code>  [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]                                                                  
  
    The service "doctrine_mongodb.odm.conn1_connection" has a dependency on a non-         existent service "doctrine_mongodb.odm.conn1_configuration".
    The service "doctrine_mongodb.odm.conn1_connection" has a dependency on a non-          existent service "doctrine_mongodb.odm.conn1_configuration". 
  </code></pre>
  
  <p>I am stuck i didn't find any workaround.So i wonder what i am doing wrong? what is the right way to configure Symfony to use two MongoDb databases</p>