06-07-2013 05:16 AM
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-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/aop http://www.springframework.org/schema/aop/spring-aop-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/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
<!– config –>
<context:annotation-config />
<!– <import resource="classpath:spring-dcontract-core-context.xml" />–>
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
id="properties">
<property name="locations">
<list>
<value>classpath:properties/database.properties</value>
</list>
</property>
<property name="ignoreUnresolvablePlaceholders" value="true" />
</bean>
<bean
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<bean id="coreJpaAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="${jpa.showSql}" />
<property name="databasePlatform" value="${jpa.dialect}" />
<property name="generateDdl" value="${jpa.generateDdl}" />
</bean>
<bean id="dContractDataSource"
class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<property name="driverClass" value="${dcontract.database.driverClass}" />
<property name="url" value="${dcontract.database.url}" />
<property name="username" value="${dcontract.database.username}" />
<property name="password" value="${dcontract.database.password}" />
</bean>
<bean id="dContractEntityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dContractDataSource" />
<property name="jpaVendorAdapter" ref="coreJpaAdapter" />
<property name="persistenceUnitName" value="digital-contract-unit" />
<property name="packagesToScan" value="net.domain.entity" />
</bean>
<bean id="dContractTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="dContractEntityManagerFactory" />
</bean>
<tx:annotation-driven transaction-manager="dContractTransactionManager" />
<!– activiti –>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<!– <property name="databaseType" value="h2" /> –>
<property name="dataSource" ref="dContractDataSource" />
<property name="transactionManager" ref="dContractTransactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="deploymentResources" value="classpath*:diagrams/TestProcess.bpmn" />
<property name="jobExecutorActivate" value="true" />
<property name="history" value="audit" />
<!– ajout pour utiliser JPA / hibernate avec activiti –>
<property name="jpaEntityManagerFactory" ref="dContractEntityManagerFactory" />
<property name="jpaHandleTransaction" value="true" />
<property name="jpaCloseEntityManager" value="true" />
</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="identityService" factory-bean="processEngine"
factory-method="getIdentityService" />
<bean id="historyService" factory-bean="processEngine"
factory-method="getHistoryService" />
</beans>
#### H2 ######
dcontract.database.driverClass=org.h2.Driver
dcontract.database.url=jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000
dcontract.database.username=sa
dcontract.database.password=
# Depends on the underlying database system
jpa.dialect=org.hibernate.dialect.H2Dialect
# If true, create/update all relevant tables at startup.
# Only for local and dev environnements, do not activate in production.
jpa.generateDdl=true
jpa.addCustomFK=false
jpa.showSql=true
06-10-2013 10:47 AM
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.