title: how to config multiple datasource/ebean for play project
body: <p>My play project is created with play framework 2.4. I want to configure two datasouroces for it, one for test purpose, one for production.</p>
  
  <h2>test datasource</h2>
  
  <pre><code>db.test.driver=org.h2.Driver&lt;br&gt;
  db.test.url="jdbc:h2:mem:test;MODE=MYSQL;MVCC=false;DB_CLOSE_DELAY=-1"
  </code></pre>
  
  <h2>production datasource</h2>
  
  <pre><code>  db.mysql.driver=com.mysql.jdbc.Driver
    db.mysql.url="jdbc:mysql://127.0.0.1:3306/db"
    db.mysql.user=root
    db.mysql.password=root
  </code></pre>
  
  <p>I also configure Ebean server for this two datasource and set the default Ebean datasource as 'test'.</p>
  
  <pre><code>   ebean.test=["xx.*"]
     ebean.mysql=["xx.*"]
     ebeanconfig.datasource.default=test
  </code></pre>
  
  <p>But when i run my unit test(activator test), got error:</p>
  
  <blockquote>
    <p><em>[PersistenceException: The default EbeanServer has not been defined? This is normally set via the ebean.datasource.default property.
    Otherwise it should be registered programatically via
    registerServer()]</em></p>
  </blockquote>
  
  <p>I also tried to use property <strong>ebean.datasource.default=test</strong> to set the default Ebean datasource, but still failed. </p>
  
  <p>Any configuration error for me? I'm really struggle for this...</p>