cancel
Showing results for 
Search instead for 
Did you mean: 

How conf activiti-context.xml with Spring 1.2?

webfrog
Champ in-the-making
Champ in-the-making
I have a web app with Spring 1.2.8.

My activiti-context.xml content:
———————————————-
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "../spring-beans.dtd">
<beans default-lazy-init="true" default-autowire="no" default-dependency-check="none">  
   <bean id="dataSource11" class="org.apache.commons.dbcp.BasicDataSource">
    <property name="driverClassName" >
    <value>org.postgresql.Driver</value>
    </property>
    <property name="url" >
    <value>jdbcSmiley Tongueostgresql://localhost:5432/zmdb</value>
    </property>
    <property name="username" >
    <value>postgres</value>
    </property>
    <property name="password">
    <value>xxxxx</value>
    </property>
    <property name="maxActive" >
    <value>30</value>
    </property>
    <property name="maxIdle">
    <value>30</value>
    </property>   
    <property name="maxWait" >
    <value>10000</value>
    </property>   
    <property name="defaultAutoCommit">
    <value>false</value>
    </property>
  </bean>

  <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
     <property name="dataSource" >
     <ref bean="dataSource11" />
     </property>
  </bean>
 
  <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration" >
     <property name="dataSource" >
     <ref bean="dataSource11" />
     </property>
     <property name="transactionManager" >
     <ref bean="transactionManager" />
     </property>
     <property name="databaseSchemaUpdate" >
     <value>true</value>
     </property>
     <property name="jobExecutorActivate" >
     <value>true</value>
     </property>
  </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" />
  <bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />
 
</beans>
—————————————————–

ApplicationContext ctx = new ClassPathXmlApplicationContext("activiti-context.xml");// It works well
RepositoryService repositoryService = (RepositoryService)ctx.getBean("repositoryService");//It dosn't work

so,please tell me how to do.

Thanks
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

We don't support Spring 1.2.8.

Best regards,

webfrog
Champ in-the-making
Champ in-the-making
Hi,

We don't support Spring 1.2.8.

Best regards,

I updated Spring from 1.2.8 to 3.0.3.

It works.

Thank you.