Edit app/config/config.yml

# Doctrine Configuration
doctrine:
    dbal:
        default_connection:       default
        connections:
            default:
                dbname:           db1
                user:             user1
                password:         pwd1
                host:             192.168.2.102
            forum:
                dbname:           db2
                user:             user2
                password:         pwd2
                host:             192.168.2.102
    orm:
        auto_generate_proxy_classes: %kernel.debug%
        default_entity_manager: default
        entity_managers:
            default:
                connection: default
                auto_mapping: true
                metadata_cache_driver: apc
                query_cache_driver: apc
                result_cache_driver: apc
            forum:
                connection: forum
                mappings:
                    DevDreamBundle: ~

Controller

$query = $this->get('doctrine')->getEntityManager('forum')->createQuery("SELECT th FROM DevDreamBundle:devdreamUser th")->setMaxResults(4)->getResult();