Skip to content
Snippets Groups Projects
Commit 4277980d authored by amelentev's avatar amelentev
Browse files

XTOOLS-4: Shutdown needs only for hsqldb database

git-svn-id: https://svn.xwiki.org/svnroot/xwiki/xwiki-platform/xwiki-tools/trunk@3925 f329d543-caf0-0310-9063-dda96c69346f
parent 201efeab
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,8 @@
import java.io.IOException;
import org.hibernate.Session;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.HSQLDialect;
/**
* Import a set of XWiki documents into an existing database.
......@@ -100,6 +102,10 @@ private void shutdownHSQLDB(XWikiContext context) throws XWikiException
if (XWikiHibernateStore.class.isAssignableFrom(store.getClass())) {
XWikiHibernateStore hibernateStore = (XWikiHibernateStore) store;
// check that is HSQLDB
Dialect dialect = Dialect.getDialect(hibernateStore.getConfiguration().getProperties());
if (!(dialect instanceof HSQLDialect)) return;
boolean bTransaction = true;
try {
hibernateStore.checkHibernate(context);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment