Add close sqlAdapter on plugin disable
This commit is contained in:
parent
32c1881d95
commit
288287c96d
1 changed files with 5 additions and 0 deletions
|
|
@ -28,6 +28,10 @@ public abstract class VelocityPreparedPlugin extends VelocityPlugin implements P
|
||||||
return new SqlAdapter();
|
return new SqlAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void closeSqlAdapter() {
|
||||||
|
sqlAdapter.close();
|
||||||
|
}
|
||||||
|
|
||||||
protected void loadPhrases() {
|
protected void loadPhrases() {
|
||||||
ConfigSection languageSection = defaultConfig.getOrCreateSection("language");
|
ConfigSection languageSection = defaultConfig.getOrCreateSection("language");
|
||||||
String locale = languageSection.getString("locale", "default");
|
String locale = languageSection.getString("locale", "default");
|
||||||
|
|
@ -80,5 +84,6 @@ public abstract class VelocityPreparedPlugin extends VelocityPlugin implements P
|
||||||
private void onProxyInitialization(ProxyShutdownEvent event) {
|
private void onProxyInitialization(ProxyShutdownEvent event) {
|
||||||
onPreDisable();
|
onPreDisable();
|
||||||
onPostDisable();
|
onPostDisable();
|
||||||
|
closeSqlAdapter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue