+ @Override
+ protected DataSource doStart(Scope aScope) {
+ DriverManagerDataSource ds = new DriverManagerDataSource(
+ _dbProps.getProperty("database.driver"),
+ _dbProps.getProperty("database.url"),
+ _dbProps.getProperty("database.username"),
+ _dbProps.getProperty("database.password"));
+ addInterface(DATASOURCE, ds, aScope);
+ DatabaseType type = DatabaseType.valueOf(_dbProps.getProperty("database.type"));
+
+ ORMappingConfig config = new ORMappingConfig(true, type);
+
+ addInterface(ORM_CONFIG, config, aScope);
+
+ return ds;
+ }
+
+ @Override
+ protected void doStop(DataSource aRuntime) {
+ // Empty.
+ }