diff --git a/pom.xml b/pom.xml
index e3900d87b..4611bc97c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -228,6 +228,13 @@
**/*Test.java
**/*Tests.java
+
+
+
+ datasource.default
+ ${datasource.default}
+
+
diff --git a/src/main/java/com/avaje/ebean/PrimaryServer.java b/src/main/java/com/avaje/ebean/PrimaryServer.java
index 4244dccd3..9a9d7747c 100644
--- a/src/main/java/com/avaje/ebean/PrimaryServer.java
+++ b/src/main/java/com/avaje/ebean/PrimaryServer.java
@@ -46,7 +46,13 @@ class PrimaryServer {
if (globalProperties == null) {
globalProperties = PropertyMap.defaultProperties();
}
- defaultServerName = globalProperties.getProperty("datasource.default");
+ defaultServerName = System.getProperty("datasource.default");
+ if(defaultServerName == null) {
+ defaultServerName = System.getProperty("ebean.default.datasource");
+ }
+ if(defaultServerName == null) {
+ defaultServerName = globalProperties.getProperty("datasource.default");
+ }
if (defaultServerName == null) {
defaultServerName = globalProperties.getProperty("ebean.default.datasource");
}