[Major] Refactored StrolchConfiguration.xml to use environments

Now the agent requires an environment parameter to start, and the
configuration of that environment is used to load different sections of
the configuration file
This commit is contained in:
Robert von Burg 2014-08-13 16:06:14 +02:00
parent 8140192441
commit 6a0199a544
3 changed files with 90 additions and 84 deletions

View File

@ -1,31 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<StrolchConfiguration> <StrolchConfiguration>
<Runtime> <env id="dev">
<applicationName>StrolchPersistenceTest</applicationName> <Runtime>
<Properties> <applicationName>StrolchPersistenceTest</applicationName>
<verbose>true</verbose> <Properties>
</Properties> <verbose>true</verbose>
</Runtime> </Properties>
<Component> </Runtime>
<name>RealmHandler</name> <Component>
<api>li.strolch.agent.api.RealmHandler</api> <name>RealmHandler</name>
<impl>li.strolch.agent.impl.DefaultRealmHandler</impl> <api>li.strolch.agent.api.RealmHandler</api>
<depends>PersistenceHandler</depends> <impl>li.strolch.agent.impl.DefaultRealmHandler</impl>
<Properties> <depends>PersistenceHandler</depends>
<dataStoreMode>CACHED</dataStoreMode> <Properties>
</Properties> <dataStoreMode>CACHED</dataStoreMode>
</Component> </Properties>
<Component> </Component>
<name>PersistenceHandler</name> <Component>
<api>li.strolch.persistence.api.PersistenceHandler</api> <name>PersistenceHandler</name>
<impl>li.strolch.persistence.xml.XmlPersistenceHandler</impl> <api>li.strolch.persistence.api.PersistenceHandler</api>
<Properties> <impl>li.strolch.persistence.xml.XmlPersistenceHandler</impl>
<verbose>true</verbose> <Properties>
</Properties> <verbose>true</verbose>
</Component> </Properties>
<Component> </Component>
<name>ObserverHandler</name> <Component>
<api>li.strolch.runtime.observer.ObserverHandler</api> <name>ObserverHandler</name>
<impl>li.strolch.runtime.observer.DefaultObserverHandler</impl> <api>li.strolch.runtime.observer.ObserverHandler</api>
</Component> <impl>li.strolch.runtime.observer.DefaultObserverHandler</impl>
</Component>
</env>
</StrolchConfiguration> </StrolchConfiguration>

View File

@ -1,31 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<StrolchConfiguration> <StrolchConfiguration>
<Runtime> <env id="dev">
<applicationName>StrolchPersistenceTest</applicationName> <Runtime>
<Properties> <applicationName>StrolchPersistenceTest</applicationName>
<verbose>true</verbose> <Properties>
</Properties> <verbose>true</verbose>
</Runtime> </Properties>
<Component> </Runtime>
<name>RealmHandler</name> <Component>
<api>li.strolch.agent.api.RealmHandler</api> <name>RealmHandler</name>
<impl>li.strolch.agent.impl.DefaultRealmHandler</impl> <api>li.strolch.agent.api.RealmHandler</api>
<depends>PersistenceHandler</depends> <impl>li.strolch.agent.impl.DefaultRealmHandler</impl>
<Properties> <depends>PersistenceHandler</depends>
<dataStoreMode>CACHED</dataStoreMode> <Properties>
</Properties> <dataStoreMode>CACHED</dataStoreMode>
</Component> </Properties>
<Component> </Component>
<name>PersistenceHandler</name> <Component>
<api>li.strolch.persistence.api.PersistenceHandler</api> <name>PersistenceHandler</name>
<impl>li.strolch.persistence.xml.XmlPersistenceHandler</impl> <api>li.strolch.persistence.api.PersistenceHandler</api>
<Properties> <impl>li.strolch.persistence.xml.XmlPersistenceHandler</impl>
<verbose>true</verbose> <Properties>
</Properties> <verbose>true</verbose>
</Component> </Properties>
<Component> </Component>
<name>ObserverHandler</name> <Component>
<api>li.strolch.runtime.observer.ObserverHandler</api> <name>ObserverHandler</name>
<impl>li.strolch.runtime.observer.DefaultObserverHandler</impl> <api>li.strolch.runtime.observer.ObserverHandler</api>
</Component> <impl>li.strolch.runtime.observer.DefaultObserverHandler</impl>
</Component>
</env>
</StrolchConfiguration> </StrolchConfiguration>

View File

@ -1,31 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<StrolchConfiguration> <StrolchConfiguration>
<Runtime> <env id="dev">
<applicationName>StrolchPersistenceTest</applicationName> <Runtime>
<Properties> <applicationName>StrolchPersistenceTest</applicationName>
<verbose>true</verbose> <Properties>
</Properties> <verbose>true</verbose>
</Runtime> </Properties>
<Component> </Runtime>
<name>RealmHandler</name> <Component>
<api>li.strolch.agent.api.RealmHandler</api> <name>RealmHandler</name>
<impl>li.strolch.agent.impl.DefaultRealmHandler</impl> <api>li.strolch.agent.api.RealmHandler</api>
<depends>PersistenceHandler</depends> <impl>li.strolch.agent.impl.DefaultRealmHandler</impl>
<Properties> <depends>PersistenceHandler</depends>
<dataStoreMode>TRANSACTIONAL</dataStoreMode> <Properties>
</Properties> <dataStoreMode>TRANSACTIONAL</dataStoreMode>
</Component> </Properties>
<Component> </Component>
<name>PersistenceHandler</name> <Component>
<api>li.strolch.persistence.api.PersistenceHandler</api> <name>PersistenceHandler</name>
<impl>li.strolch.persistence.xml.XmlPersistenceHandler</impl> <api>li.strolch.persistence.api.PersistenceHandler</api>
<Properties> <impl>li.strolch.persistence.xml.XmlPersistenceHandler</impl>
<verbose>true</verbose> <Properties>
</Properties> <verbose>true</verbose>
</Component> </Properties>
<Component> </Component>
<name>ObserverHandler</name> <Component>
<api>li.strolch.runtime.observer.ObserverHandler</api> <name>ObserverHandler</name>
<impl>li.strolch.runtime.observer.DefaultObserverHandler</impl> <api>li.strolch.runtime.observer.ObserverHandler</api>
</Component> <impl>li.strolch.runtime.observer.DefaultObserverHandler</impl>
</Component>
</env>
</StrolchConfiguration> </StrolchConfiguration>