cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Database configuration

pp84
Champ in-the-making
Champ in-the-making
How does one dynamically specify schema name while using spring activiti configuration with jndi datasource?

I have the following configuration
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
       <property name="dataSource" ref="dataSource" />
       <property name="transactionManager" ref="transactionManager" />
       <property name="deploymentResources" value="classpath*:auto.*.bpmn20.xml" />
       <property name="databaseSchemaUpdate" value="false" />
       <property name="jobExecutorActivate" value="false" />
       <property name="dbIdentityUsed" value="false" />
       <property name="history" value="full" />             
    </bean>

<jee:jndi-lookup id="dataSource" jndi-name="jdbc/activitiDS" resource-ref="true"/>

By default the sql statement generated is using the user id of the connection as schema name?
I would like to configure the schema name from a properties file.
How to do that?
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Isn't there a way of specifying the schema-name in the JDBC-url (not sure which DB you're using). The only place where the schema is explicitly set, is when checking if tables are present. Other queries just run unqualified against the connection…

The only place a schema is "assumed" is when checking if tables exist in oracle (upgrade/creating engine) due to https://jira.codehaus.org/browse/ACT-1062, when NO schema is explicitly set. The schema can be set when manually performing the "create" or upgrades, see ManagementService:


  public String databaseSchemaUpgrade(final Connection connection, final String catalog, final String schema) {