Announcement Announcement Module
Collapse
No announcement yet.
Multiple MongoDB hosts with mongodb - Plugin?? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple MongoDB hosts with mongodb - Plugin??

    Hey!

    I was wondering if it is possible to access multiple mongodb hosts with the mongodb-plugin for grails (http://grails.org/plugin/mongodb)
    This works fine, but only for ONE host:
    Code:
    grails{
    	mongo {
    			host = "loclahost"
    			port = 27017
    			username = ""
    			password = ""
    			databaseName = "product"
    		}
    }
    Code:
    	static mapWith = "mongo"
    	static mapping = {
    		collection "products"
    		database "product"
    	}
    I would like to map every domain class to a MongoDB host.
    So s.th. like this (doesn't work):

    Code:
    grails{
    	mongo {
                 dataSource{
    			     host = "loclahost"
    			     port = 27017
    			     username = ""
    			     password = ""
    			     databaseName = "product"
                                }
                 dataSource_test{
    			     host = "anyOtherHost"
    			     port = 27017
    			     username = ""
    			     password = ""
    			     databaseName = "product"
                                }
    		}
    }
    Domainclass 1:
    Code:
    	static mapWith = "mongo"
    	static mapping = {
    		collection "products"
    		database "product"
    		datasource "test"
    	}
    and Domainclass 2:
    Code:
    	static mapWith = "mongo"
    	static mapping = {
    		collection "products"
    		database "product"
    		datasource "DEFAULT"
    	}
    Any help is appreciated!

    What would be the best way to implement MongoDB access to more then one instance with grails if the plugin doesn't support multiple hosts? Manual connection pooling?

    Thanks in advance!

    Kai

  • #2
    viagra buy dublin

    In spite of that, the stylish Spanish control is making tremendous efforts to present subsidize the assurance in the sticks's popular pharmaceutical supermarket and is said to be working on some cardinal layout to develop this sector past bringing in investments and CialisViagraSverige potential customers. Many more are competing drugs Viagra, Cialis and Levitra. Harmonious of them is Cialis online is not so interminable sold as Viagra, but sends an important for all practical purposes of the Internet market. Pfizer to pay after viagra online inventory that sells
    cialis-viagra-sverige.net consumed in enunciated style then it gets double-quick lost in mouth and the concentrations of the chemical are in the blood within thirty to one-liner twenty minutes. The affects of Viagra as a rule last for 4 hours, and its metabolites are expelled in the faeces

    Comment

    Working...
    X