Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1689

Why not provide a constructor with a String-Multi hosts?

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      Now, I put mongo.host1,mongo.host2,mongo.host3 ... in my db.properties file,and config the MongoClient bean in beans.xml of Spring, like this:
      <bean id="mongoClient" ..>
      <constructor-arg>
      <list>
      <bean id="m1" ../>
      <bean id="m2" ../>
      <bean id="m3" ../>
      </list>
      </bean>
      if I add/remove host, I must change the two files,
      So, why not we provide a constructor with one String param and parse it in method?

      Thanks~

      Attachments

        Activity

          People

            Unassigned Unassigned
            yyam yangyameng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: