AnsweredAssumed Answered

Instantiate Activiti when database is down.

Question asked by gjaya26 on Mar 8, 2018
Latest reply on Mar 8, 2018 by ryandawson

Hi,

We are using activiti 5.22. We have a spring application which uses activiti apis. We have the following in our xml configuration:

<bean id="processEngineConfiguration" class="com.pru.wf.engine.extension.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />

...

<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="true" />
<property name="enableDatabaseEventLogging" value="true" />

</bean>

SpringProcessEngineConfiguration extends org.activiti.spring.SpringProcessEngineConfiguration

We would like to bring up our application when the database is down.

 

We tried the above xml config with lazy-init="true". But we get the following exception:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engi
ne.ActivitiException: couldn't check if tables are already present using metadata: weblogic.common.resourcepool.ResourceDeadException: 0:weblogic.common.ResourceException: Could not create pool connec
tion for datasource 'WFEngine'.

Caused by: org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata: weblogic.common.resourcepool.ResourceDeadException: 0:weblogic.common.ResourceException:
Could not create pool connection for datasource 'WFEngine'.

 

Is there any way to lazy initialize process engine beans using xml? What options are available?

Outcomes