mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Preparation for ALF-9258. Activiti process engine is now passed in to SchemaBootstrap so that table creation can be invoked at the appropriate time. Frederik is going to complete this task as he can build the latest Activiti JARs with the required method call and passing the process engine into SchemaBootstrap introduces a circular dependency in activiti-context.xml that needs to be resolved.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29331 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -57,6 +57,11 @@
|
|||||||
<property name="localSessionFactory">
|
<property name="localSessionFactory">
|
||||||
<ref bean="&sessionFactory"></ref> <!-- inject the actual factory, not a session -->
|
<ref bean="&sessionFactory"></ref> <!-- inject the actual factory, not a session -->
|
||||||
</property>
|
</property>
|
||||||
|
<!--
|
||||||
|
<property name="activitiProcessEngine">
|
||||||
|
<ref bean="activitiProcessEngine" />
|
||||||
|
</property>
|
||||||
|
-->
|
||||||
<property name="dialect">
|
<property name="dialect">
|
||||||
<ref bean="dialect" />
|
<ref bean="dialect" />
|
||||||
</property>
|
</property>
|
||||||
|
@@ -41,6 +41,7 @@ import java.util.Properties;
|
|||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import org.activiti.engine.ProcessEngine;
|
||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
import org.alfresco.ibatis.SerializableTypeHandler;
|
import org.alfresco.ibatis.SerializableTypeHandler;
|
||||||
import org.alfresco.repo.admin.patch.Patch;
|
import org.alfresco.repo.admin.patch.Patch;
|
||||||
@@ -194,6 +195,7 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
|||||||
|
|
||||||
private DataSource dataSource;
|
private DataSource dataSource;
|
||||||
private LocalSessionFactoryBean localSessionFactory;
|
private LocalSessionFactoryBean localSessionFactory;
|
||||||
|
private ProcessEngine activitiProcessEngine;
|
||||||
private String schemaOuputFilename;
|
private String schemaOuputFilename;
|
||||||
private boolean updateSchema;
|
private boolean updateSchema;
|
||||||
private boolean stopAfterSchemaBootstrap;
|
private boolean stopAfterSchemaBootstrap;
|
||||||
@@ -235,6 +237,11 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
|||||||
{
|
{
|
||||||
return localSessionFactory;
|
return localSessionFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setActivitiProcessEngine(ProcessEngine processEngine)
|
||||||
|
{
|
||||||
|
this.activitiProcessEngine = processEngine;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set this to output the full database creation script
|
* Set this to output the full database creation script
|
||||||
@@ -789,6 +796,9 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
|||||||
checkSchemaPatchScripts(cfg, connection, postUpdateScriptPatches, true);
|
checkSchemaPatchScripts(cfg, connection, postUpdateScriptPatches, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ask emebedded Activiti to create or update it's schema
|
||||||
|
// activitiProcessEngine.getManagementService().databaseSchemaUpgrade(connection, null, null);
|
||||||
|
|
||||||
return create;
|
return create;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user