[Devel] busy implementing a component directed acyclic dependency tree

This is needed to start/stop in the right order
This commit is contained in:
Robert von Burg 2013-11-05 20:42:14 +01:00
parent e415dcd6bf
commit ede49b6d20
2 changed files with 6 additions and 3 deletions

View File

@ -33,6 +33,7 @@ import li.strolch.persistence.api.StrolchPersistenceHandler;
import li.strolch.persistence.api.StrolchTransaction;
import li.strolch.persistence.impl.model.OrderContextFactory;
import li.strolch.persistence.impl.model.ResourceContextFactory;
import li.strolch.runtime.component.ComponentContainer;
import li.strolch.runtime.component.StrolchComponent;
import li.strolch.runtime.configuration.ComponentConfiguration;
import ch.eitchnet.xmlpers.api.IoMode;
@ -50,8 +51,8 @@ public class XmlPersistenceHandler extends StrolchComponent implements StrolchPe
public static final String DB_STORE_PATH = "dbStore/"; //$NON-NLS-1$
private PersistenceManager persistenceManager;
public XmlPersistenceHandler() {
super(StrolchPersistenceHandler.class.getName());
public XmlPersistenceHandler(ComponentContainer container) {
super(container, StrolchPersistenceHandler.class.getName());
}
@Override

View File

@ -25,6 +25,7 @@ import java.io.File;
import java.text.MessageFormat;
import li.strolch.persistence.impl.XmlPersistenceHandler;
import li.strolch.runtime.component.ComponentContainer;
import li.strolch.runtime.configuration.ComponentConfiguration;
import li.strolch.runtime.configuration.ConfigurationParser;
import li.strolch.runtime.configuration.StrolchConfiguration;
@ -64,7 +65,8 @@ public abstract class AbstractDaoImplTest {
StrolchConfiguration strolchConfiguration = ConfigurationParser.parseConfiguration(rootPath);
ComponentConfiguration componentConfiguration = strolchConfiguration
.getComponentConfiguration("PersistenceHandler"); //$NON-NLS-1$
persistenceHandler = new XmlPersistenceHandler();
ComponentContainer container = new ComponentContainer();
persistenceHandler = new XmlPersistenceHandler(container);
persistenceHandler.initialize(componentConfiguration);
}