title: Pass Parameters to Scala Object
body: <p>Is it ever possible to initialize a Scala object from an external object? The Scala object that I'm trying to initialize does not have any Companion class. Here it is as an example:</p>
  
  <pre><code>object ObjectA {
    val mongoDBConnectionURI = // This is the Val that I want to initialize from an external object
    ....
    ....
  }
  </code></pre>
  
  <p>But the mongoDBConnectionURI which is of type MongoDBConnectionURI needs a host and a port that I have to read from a config file which is actually done by Object B and these values are passed to ObjA. Later all my DAO objects will access the mongoDBConnectionURI variable in Object A to get the connection string. How could I pass the values from Object B to Object A and have the vals in Object A initialized?</p>