|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectliquibase.integration.cdi.CDILiquibase
@ApplicationScoped public class CDILiquibase
A CDI wrapper for Liquibase.
Example Configuration: This CDI configuration example will cause liquibase to run automatically when the CDI container is initialized. It will loaddb-changelog.xml
from the classpath and apply it against
myDataSource
.
Various producers methods are required to resolve the dependencies
i.e.
public class CDILiquibaseProducer {
- Author:
- Aaron Walker (http://github.com/aaronwalker)
Constructor Summary
CDILiquibase()
Method Summary
protected Database
createDatabase(Connection c)
Subclasses may override this method add change some database settings such as
default schema before returning the database object.
protected Liquibase
createLiquibase(Connection c)
boolean
isInitialized()
boolean
isUpdateSuccessful()
void
onStartup()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
CDILiquibase
public CDILiquibase()
Method Detail
isInitialized
public boolean isInitialized()
isUpdateSuccessful
public boolean isUpdateSuccessful()
onStartup
@PostConstruct
public void onStartup()
throws LiquibaseException
- Throws:
LiquibaseException
createLiquibase
protected Liquibase createLiquibase(Connection c)
throws LiquibaseException
- Throws:
LiquibaseException
createDatabase
protected Database createDatabase(Connection c)
throws DatabaseException
- Subclasses may override this method add change some database settings such as
default schema before returning the database object.
- Parameters:
c
-
- Returns:
- a Database implementation retrieved from the
DatabaseFactory
.
- Throws:
DatabaseException
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2013 Liquibase.org. All Rights Reserved.