Now using the new database support functionality.
[utils] / system / general / src / test / java / org / wamblee / system / components / DatabaseComponentFactory.java
index c6ddeee12d086d2640b0c61123e24efe28502afd..4c100fcca9bd459cf772268c2a4d6d3d815efaea 100644 (file)
  */
 package org.wamblee.system.components;
 
-import org.wamblee.io.ClassPathResource;
-import org.wamblee.system.core.Container;
+import org.wamblee.support.persistence.DatabaseBuilder;
+import org.wamblee.system.container.Container;
 
 public class DatabaseComponentFactory {
 
     public static void addDatabaseConfig(Container aContainer) {
         try {
-            aContainer
-                    .addComponent(new PropertyComponent(
-                            "dbProps",
-                            new ClassPathResource(
-                                    "properties/test.org.wamblee.security.database.properties")));
+            aContainer.addComponent(new DatabaseComponent("db",
+                    DatabaseBuilder.getDatabase())); 
         } catch (Exception e) {
             throw new RuntimeException("Could not add database configuration",
                     e);