forked from spring-projects/spring-integration-samples
/
spring-integration-context.xml
47 lines (41 loc) · 2.5 KB
/
spring-integration-context.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?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:int="http://www.springframework.org/schema/integration"
xmlns:int-jpa="http://www.springframework.org/schema/integration/jpa"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
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.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/integration/jpa http://www.springframework.org/schema/integration/jpa/spring-integration-jpa.xsd">
<int:channel id="createPersonRequestChannel"/>
<int:channel id="listPeopleRequestChannel"/>
<int:gateway id="personService"
service-interface="org.springframework.integration.samples.jpa.service.PersonService"
default-request-timeout="5000" default-reply-timeout="5000">
<int:method name="createPerson" request-channel="createPersonRequestChannel"/>
<int:method name="findPeople" request-channel="listPeopleRequestChannel"/>
</int:gateway>
<int-jpa:retrieving-outbound-gateway entity-manager-factory="entityManagerFactory"
request-channel="listPeopleRequestChannel"
jpa-query="select p from Person p order by p.name asc">
</int-jpa:retrieving-outbound-gateway>
<int-jpa:updating-outbound-gateway entity-manager-factory="entityManagerFactory"
request-channel="createPersonRequestChannel" >
<int-jpa:transactional transaction-manager="transactionManager" />
</int-jpa:updating-outbound-gateway>
<!-- Depending on the selected profile, users can use different JPA Providers -->
<beans profile="default, hibernate">
<import resource="classpath:/META-INF/spring/integration/hibernate-context.xml"/>
</beans>
<beans profile="openjpa">
<import resource="classpath:/META-INF/spring/integration/openjpa-context.xml"/>
</beans>
<beans profile="eclipselink">
<import resource="classpath:/META-INF/spring/integration/eclipselink-context.xml"/>
</beans>
</beans>