Now using the new database support functionality.
[utils] / system / general / src / test / java / org / wamblee / system / components / DatabaseComponentFactory.java
index b8ca2596e4e4c034f985e6196cdcd9e5440562fa..4c100fcca9bd459cf772268c2a4d6d3d815efaea 100644 (file)
  */
 package org.wamblee.system.components;
 
-import org.wamblee.persistence.DerbyDatabase;
+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",
-                    new DerbyDatabase())); 
+                    DatabaseBuilder.getDatabase())); 
         } catch (Exception e) {
             throw new RuntimeException("Could not add database configuration",
                     e);