Spring Integration channel中使用message-store的例子
来源:互联网 发布:万科荣华金域名城1号楼 编辑:程序博客网 时间:2024/06/10 16:47
<bean id="sessionQueuePersistance" class="com.emph.SessionQueuePersistance"> <constructor-arg name="sessionInboundChannel" ref="sessionInboundChannel" /></bean><int:channel id="sessionInboundChannel"> <int:queue message-store="sessionStore" /> <int:interceptors> <int:ref bean="messageListener"/> </int:interceptors></int:channel><bean id="messageListener" class="com.emph.MessageListener" /><!-- int:logging-channel-adapter id="logger" log-full-message="true" level="INFO" /--><bean id="sessionStore" class="org.springframework.integration.jdbc.store.JdbcChannelMessageStore"> <property name="dataSource" ref="queueDataSource" /> <property name="channelMessageStoreQueryProvider" ref="queryProvider" /> <property name="tablePrefix" value="QUEUE_" /></bean><bean id="queryProvider" class="org.springframework.integration.jdbc.store.channel.OracleChannelMessageStoreQueryProvider" /><bean id="queueDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> <property name="url" value="jdbc:oracle:thin:@localhost:1521:XE" /> <property name="username" value="test" /> <property name="password" value="test" /></bean><!-- the bridge polls the persisted messages and forwards them to the output channel --><int:bridge input-channel="sessionInboundChannel" output-channel="sessionOutboundChannel"> <int:poller fixed-rate="1000" max-messages-per-poll="-1"> <int:transactional transaction-manager="txManager" /> </int:poller></int:bridge><bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="queueDataSource"/></bean><int:channel id="sessionOutboundChannel"> <int:dispatcher task-executor="taskExecutor" /></int:channel><bean id="sessionQueueReader" class="com.emph.SessionReader" /><int:service-activator input-channel="sessionOutboundChannel" ref="sessionQueueReader" method="handleMessage" /><bean id="taskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> <property name="corePoolSize" value="4" /> <property name="maxPoolSize" value="4" /></bean>
阅读全文
0 0
- Spring Integration channel中使用message-store的例子
- Spring Integration --- Message Channel
- Spring Integration集成框架之Message-Channel
- Spring Integration Message Bus Understanding
- 在Spring中使用内置的Message Broker
- mina 的 Spring Integration
- Java拷贝文件的例子(使用channel实现)
- spring integration之http-rest例子解析
- ExtJs中Store的使用
- JSP 中 如何使用 spring:message 标签
- 使用Spring BlazeDS Integration步骤
- Spring Integration-File Adapter使用
- 对Spring Integration中关键概念的个人理解
- Spring中使用AOP例子
- Spring中RestTemplate使用例子
- Windows Store App使用IAsyncOperationWithProgress的一个例子
- Spring中配合hibernate使用的简单例子
- Spring中JdbcTemplate类query的使用例子
- Android集成高德地图如何将定位按钮显示到想要的位置
- 线程使用之读写锁
- 学生管理系统
- ini_set — 为一个配置选项设置值
- 汽车之家监控系统的第一次里程碑
- Spring Integration channel中使用message-store的例子
- 优酷自动播放代码
- Linux内核源码目录结构
- 修改linux终端命令行颜色
- Oozie4.1编译过程记录
- C++ 类的自动转换与强制类型转换
- LIST_VIEW_和LVITEM用法
- 前端要注意“开发、命名”的模块化
- 线程基础:多任务处理(16)——Fork/Join框架(排序算法性能补充)