public class Darwin extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
In short it has following features:
- when there are no tables for your component, it uses create.sql script to setup them - when there exists data layer for your component, but newer version of the component starts up, it looks up for patches that fill the gap between current structure of data layer and structure that is expected for new version - when suddenly old patch appears (ie. data layer is in version 2.0 but patch_1.6.sql appears) it looks up whether it was applied and when not it tries to apply it ... this allows parallel development in several branches sharing the same database (assuming patches are not conflicting) - it recovers from errors in patch in a way that it stores information about SQL commands successfully executed so that when applying the same patch again (after it has been corrected by developer) it skips commands already executed and jumps straight to the one that failed last time
| Modifier and Type | Field and Description |
|---|---|
static String |
DARWIN_COMPONENT_NAME |
static String |
DARWIN_COMPONENT_VERSION |
| Constructor and Description |
|---|
Darwin() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Initializes Darwin and updates infrastructure tables for it.
|
void |
evolve()
Executes darwin instance logic.
|
void |
initDefaults()
This method will initializes default objects needed for autoupdating.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public static final String DARWIN_COMPONENT_NAME
public static final String DARWIN_COMPONENT_VERSION
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void evolve()
public void afterPropertiesSet()
updateComponent(String, String)afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic void initDefaults()
Copyright © 2020 FG Forrest, a.s.. All rights reserved.