@Override
  public void onStart(play.Application argo) {
    super.beforeStart(argo);
    Logger.debug("** on start **");
    try {
      MorphiaObject.mongo = new MongoClient("127.0.0.1", 27017);
    } catch (Exception e) {
      e.printStackTrace();
    }
    MorphiaObject.morphia = new Morphia();
    MorphiaObject.datastore = MorphiaObject.morphia.createDatastore(MorphiaObject.mongo, "test");
    MorphiaObject.datastore.ensureIndexes();
    MorphiaObject.datastore.ensureCaps();

    Logger.debug("** Morphia datastore: " + MorphiaObject.datastore.getDB());
  }
Exemple #2
0
 @Override
 public void beforeStart(Application application) {
   super.beforeStart(application);
 }
Exemple #3
0
 @Override
 public void beforeStart(Application app) {
   Logger.info(" Global beforeStart");
   super.beforeStart(app);
 }