Home
Cloud
Big Data
CI
Install
Samples
Java
Ubuntu
Maven
Archive
mtitek-process-app-hello-web
|
application-context.xml
References
application-context.xml
References
See this page for more information about spring integration:
http://docs.jboss.org/jbpm/release/latest/jbpm-docs/html_single/#_spring
application-context.xml
<?xml version="1.0" encoding="UTF-8"?> <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:util="http://www.springframework.org/schema/util" 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-4.3.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.3.xsd"> <context:annotation-config /> <context:component-scan base-package="mtitek.process" /> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>file:**/application-context.properties</value> </list> </property> </bean> <bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close"> <property name="driverClassName" value="${jpa.db.driverClassName}" /> <property name="url" value="${jpa.db.url}" /> <property name="username" value="${jpa.db.username}" /> <property name="password" value="${jpa.db.password}" /> </bean> <bean id="hibernateJpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="database" value="${jpa.db.database}" /> <property name="databasePlatform" value="${jpa.db.database}" /> <property name="showSql" value="${jpa.show.sql}" /> <property name="generateDdl" value="${jpa.generate.ddl}" /> </bean> <bean id="hibernateJpaDialect" class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" /> <bean id="localContainerEntityManagerFactoryBean" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="jpaVendorAdapter" ref="hibernateJpaVendorAdapter" /> <property name="jpaDialect" ref="hibernateJpaDialect" /> <property name="persistenceUnitName" value="${jpa.persistence.unit.name}" /> <property name="persistenceXmlLocation" value="${jpa.persistence.xml.location}" /> <property name="jpaProperties"> <props> <prop key="hibernate.dialect">${jpa.dialect}</prop> <prop key="hibernate.show_sql">${jpa.show.sql}</prop> <prop key="hibernate.format_sql">${jpa.format.sql}</prop> <prop key="hibernate.id.new_generator_mappings">${jpa.id.new.generator.mappings}</prop> </props> </property> </bean> <bean id="springJpaTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="localContainerEntityManagerFactoryBean" /> <property name="persistenceUnitName" value="${jpa.persistence.unit.name}" /> <property name="dataSource" ref="dataSource" /> <property name="jpaDialect" ref="hibernateJpaDialect" /> <property name="jpaPropertyMap"> <props> <prop key="hibernate.dialect">${jpa.dialect}</prop> <prop key="hibernate.show_sql">${jpa.show.sql}</prop> <prop key="hibernate.format_sql">${jpa.format.sql}</prop> <prop key="hibernate.id.new_generator_mappings">${jpa.id.new.generator.mappings}</prop> </props> </property> </bean> <tx:annotation-driven transaction-manager="springJpaTransactionManager" /> <bean id="resourceFactory" class="org.kie.internal.io.ResourceFactory" factory-method="newClassPathResource"> <constructor-arg> <value>${jbpm.resource.file}</value> </constructor-arg> </bean> <bean id="runtimeEnvironmentFactoryBean" class="org.kie.spring.factorybeans.RuntimeEnvironmentFactoryBean"> <property name="entityManagerFactory" ref="localContainerEntityManagerFactoryBean" /> <property name="transactionManager" ref="springJpaTransactionManager" /> <property name="assets"> <map> <entry key-ref="resourceFactory"> <util:constant static-field="org.kie.api.io.ResourceType.BPMN2" /> </entry> </map> </property> </bean> <bean id="runtimeManagerFactoryBean" class="org.kie.spring.factorybeans.RuntimeManagerFactoryBean" destroy-method="close"> <property name="identifier" value="${jbpm.runtimeManager.identifier}" /> <property name="type" value="${jbpm.runtimeManager.type}" /> <property name="runtimeEnvironment" ref="runtimeEnvironmentFactoryBean" /> </bean> <bean id="jpaAuditLogService" class="org.jbpm.process.audit.JPAAuditLogService"> <constructor-arg> <ref bean="localContainerEntityManagerFactoryBean" /> </constructor-arg> <constructor-arg value="${jbpm.audit.persistence.strategy.local}" /> </bean> <bean id="restProcess" class="mtitek.process.ws.RestProcessImpl"> <property name="processRuntime" ref="processRuntime" /> </bean> <bean id="processRuntime" class="mtitek.process.runtime.ProcessRuntimeDefault"> <property name="processDefinitionId" value="mtitek.process.app.hello.id.1" /> <property name="runtimeManager" ref="runtimeManagerFactoryBean" /> <property name="auditLogService" ref="jpaAuditLogService" /> <property name="workItemsHandlers"> <map> <entry key="helloTask" value-ref="helloTask" /> </map> </property> </bean> <bean id="helloTask" class="mtitek.process.workItems.HelloTask" /> </beans>
© 2010-2022
mti
tek