Using Liquibase with OSGI and Hibernate -
i integrate liquibase project. first idea use blueprint's bean starts liquibase update oninit method. there problem hibernate, because have "hbm2ddl.auto" set "validate" , validation executed before bean's oninit. (we use container managed persistence persistence.xml in meta-inf). second attemp use bundletracker , when entry in manifest exists, liquibase performs db update. working enforce bundle won't start if update of database won't successful. don't have idea how bundletracker method addbundle. there way how prevent starting bundle bundletracker event?
i have possible idea doing create addition bundle performs update , other bundle persistence.xml depend on bundle. have lot of bundles persistence.xml that`s why solution bundletracker seems better me.
in cases these kind of dependencies should modeled services. starting/stopping bundles may sound easy in horrendously suckable morass on time.
once dynamic dependency services, parts in osgi (especially declarative services) make trivial work dynamics. not in 'happy' cases in many ways these things can cause errors.
so in case create liquibasehappy service or , bundles use db should depend on it.
Comments
Post a Comment