06-28-2011 05:52 PM
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">
<!– Use annotations to configure our components –>
<context:component-scan base-package="org.activiti" />
<!– Turn on annotations for beans –>
<context:annotation-config />
<!– Configure datasource –>
<bean id="dataSource" lazy-init="false"
class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
<property name="targetDataSource">
<bean class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
</bean>
</property>
</bean>
<!– Configure transaction manager –>
<bean id="transactionManager" lazy-init="false"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<!– Use transaction manager annotations –>
<tx:annotation-driven transaction-manager="transactionManager" />
<!– Configure process engine –>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"
lazy-init="true">
<property name="databaseType" value="mysql" />
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="false" />
</bean>
<!– Use process engine –>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean"
lazy-init="true">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
<!– Use process engine service –>
<bean id="repositoryService" factory-bean="processEngine"
factory-method="getRepositoryService" lazy-init="true" />
<bean id="runtimeService" factory-bean="processEngine"
factory-method="getRuntimeService" lazy-init="true" />
<bean id="taskService" factory-bean="processEngine"
factory-method="getTaskService" lazy-init="true" />
<bean id="historyService" factory-bean="processEngine"
factory-method="getHistoryService" lazy-init="true" />
<bean id="managementService" factory-bean="processEngine"
factory-method="getManagementService" lazy-init="true" />
<bean id="identityService" factory-bean="processEngine"
factory-method="getIdentityService" lazy-init="true" />
<bean id="formService" factory-bean="processEngine"
factory-method="getFormService" lazy-init="true" />
<bean id="propertyService" class="org.licosystems.web.lico.config.properties.PropertyServiceImpl"/>
<bean id="mailService" class="org.licosystems.web.lico.util.MailService"/>
</beans>
[/size]public class ProcessStartListener implements ExecutionListener {
private PropertyService propertyService;
private MailService mailService;
private FormService formService;
@Autowired
public void setFormService(FormService formService) {
this.formService = formService;
}
@Autowired
public void setMailService(MailService mailService) {
this.mailService = mailService;
}
@Autowired
public void setPropertyService(PropertyService propertyService) {
this.propertyService = propertyService;
System.out.println(" &&&&&&&&&&& PRoperty auto wiered: " + this.propertyService);
}
@Override
public void notify(DelegateExecution execution) throws Exception {
}
}
[/size]06-28-2011 07:32 PM
03-24-2015 08:14 AM
03-24-2015 09:54 AM
03-25-2015 12:50 AM
03-26-2015 03:34 AM
03-26-2015 11:35 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.