Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-2.5.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spenter code herering-tx-3.0.xsd">
- <tx:annotation-driven transaction-manager="transactionManager"/>
- <bean id="dataSource"
- class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
- <property name="driverClass" value="org.postgresql.Driver" />
- <property name="url" value="jdbc:postgresql://localhost:5432/activiti_ex_db" />
- <property name="username" value="postgres" />
- <property name="password" value="user" />
- </bean>
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="dataSource" />
- </bean>
- <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
- <property name="dataSource" ref="dataSource" />
- <property name="transactionManager" ref="transactionManager" />
- <property name="databaseSchemaUpdate" value="create-drop" />
- <property name="jobExecutorActivate" value="false" />
- </bean>
- <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
- <property name="processEngineConfiguration" ref="processEngineConfiguration" />
- </bean>
- <!-- <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
- <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
- <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
- <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
- <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" /> -->
- import org.activiti.spring.ProcessEngineFactoryBean;
- public static void main(String[] args) {
- ClassPathXmlApplicationContext applicationContext = null;
- try {
- applicationContext = new ClassPathXmlApplicationContext("/spring-context.xml");
- ProcessEngineFactoryBean processEngin =(ProcessEngineFactoryBean) applicationContext.getBean("processEngine");
- System.out.println(processEngin);
- } catch (Exception e) {
- e.printStackTrace();
- applicationContext = null;
- }
- }
- May 17, 2016 7:20:35 PM org.activiti.engine.impl.interceptor.CommandContext close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement