
OSGI-INF.blueprint.activiti-config.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"> <ext:property-placeholder /> <!-- Setting up the process engine configuration, using an embedded H2 database together with our default Aries transaction manager. --> <bean id="dataSource" class="org.h2.jdbcx.JdbcDataSource"> <property name="URL" value="jdbc:h2:file:${karaf.data}/activiti/database;DB_CLOSE_ON_EXIT=FALSE"/> <property name="user" value="sa"/> <property name="password" value=""/> </bean> <reference id="transactionManager" interface="javax.transaction.TransactionManager"/> <bean id="configuration" class="org.activiti.engine.impl.cfg.JtaProcessEngineConfiguration" ext:field-injection="true"> <property name="databaseType" value="h2"/> <property name="dataSource" ref="dataSource"/> <property name="transactionManager" ref="transactionManager"/> <property name="databaseSchemaUpdate" value="true"/> <property name="transactionsExternallyManaged" value="true" /> </bean> <!-- Set up the custom resolver implementation to ease integration with Camel routes --> <bean id="resolver" class="org.apache.servicemix.activiti.config.CamelAwareELResolver"/> <reference-list availability="optional" interface="org.activiti.camel.ContextProvider"> <reference-listener ref="resolver" bind-method="addContextProvider" unbind-method="removeContextProvider" /> </reference-list> <reference-list availability="optional" interface="org.activiti.engine.delegate.JavaDelegate"> <reference-listener ref="resolver" bind-method="bindService" unbind-method="unbindService" /> </reference-list> <!-- Set up the Activiti process engine itself --> <bean id="processEngineFactory" class="org.activiti.osgi.blueprint.ProcessEngineFactoryWithELResolver" init-method="init" destroy-method="destroy"> <property name="processEngineConfiguration" ref="configuration"/> <property name="bundle" ref="blueprintBundle"/> <property name="blueprintELResolver" ref="resolver" /> </bean> <bean id="processEngine" factory-ref="processEngineFactory" factory-method="getObject"/> <bean id="runtimeService" factory-ref="processEngine" factory-method="getRuntimeService" /> <!-- Register the ProcessEngine and RuntimeService as OSGi services to allow other bundles to use them --> <service ref="processEngine" interface="org.activiti.engine.ProcessEngine"/> <service ref="runtimeService" interface="org.activiti.engine.RuntimeService"/> </blueprint>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy