mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.9 to HEAD
9848: Merged V2.2 to V2.9 9610: Fixed ETWOTWO-548 10232: Merged V2.2 to V2.9 10231: Merged V2.1 to V2.2 10229: Merged V2.1-A to V2.1 10227: https://issues.alfresco.com/jira/browse/ADB-106 10530: Merged V2.2 to V2.9 9847: Applied patch for ETWOTWO-542 (supplied by Peter Monks) 9897: Fix for ETWOTWO-302: Alphabetise advanced workflow names 9901: Fixed ETWOTWO-426: V2.2 upgrade problems with MySQL 5.0.51 9902: Fix for ETWOTWO-438: Versionable aspect and add-content permissions 9905: Fix ETWOTWO-560 9912: Increased test wait iterations from 10 (10s) to 100 (100s). 9919: Part fix for ACT-3574: Added close for schema bootstrap connection git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10612 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -971,10 +971,11 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
||||
{
|
||||
// do everything in a transaction
|
||||
Session session = getSessionFactory().openSession();
|
||||
Connection connection = null;
|
||||
try
|
||||
{
|
||||
// make sure that we AUTO-COMMIT
|
||||
Connection connection = session.connection();
|
||||
connection = session.connection();
|
||||
connection.setAutoCommit(true);
|
||||
|
||||
Configuration cfg = localSessionFactory.getConfiguration();
|
||||
@@ -1080,6 +1081,17 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
if (connection != null)
|
||||
{
|
||||
connection.close();
|
||||
}
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
logger.warn("Error closing DB connection: " + e.getMessage());
|
||||
}
|
||||
// Remove the connection reference from the threadlocal boostrap
|
||||
SchemaBootstrapConnectionProvider.setBootstrapConnection(null);
|
||||
|
||||
|
Reference in New Issue
Block a user