0

I am using Liquibase in OSGi environment via bundle org.openengsb.labs.liquibase.extender (https://github.com/openengsb-labs/labs-liquibase) which defines datasource globaly in org.openengsb.labs.liquibase.cfg (https://github.com/openengsb-labs/labs-liquibase#configuration-file).

Does anyboady have experience with multiple bundles using different datasources for Liquibase?

Tom
  • 83
  • 1
  • 1
  • 9
  • If I were you, I would simply use Liquibase programmatically from a component when every dependencies are available. By dependencies, I mean DataSource services that are registered as OSGi services by other components. I also suggest to use at least liquibase 3.5.0 as liquibase-core contains the right MANIFEST header from that version and some classloader issues are solved, too. – Balazs Zsoldos Jan 12 '17 at 11:27
  • You mean [CDI](http://www.liquibase.org/documentation/cdi.html) approach? I have already checked it as posible solution – Tom Jan 12 '17 at 11:45
  • No, I mean using Declarative Services to implement a simple component that waits for the DataSource to be available and calls "new Liquibase.update()". Or, you can use ECM and Liquibase ECM component that re-registers the DataSource OSGi service after the Liquibase update is successful. See: http://everit.org/ecm/index.html and https://github.com/everit-org/liquibase-datasource-ecm – Balazs Zsoldos Jan 12 '17 at 12:11

0 Answers0