锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
鍦?lt;amq:broker>閲岄潰澧炲姞浜?br />聽(tīng)
聽(tīng)聽(tīng)
<amq:persistenceAdapter>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<amq:jdbcPersistenceAdapter聽(tīng)id="jdbcAdapter"聽(tīng)dataSource="#hsql-ds"聽(tīng)createTablesOnStartup="true"聽(tīng)useDatabaseLock="false"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<!--聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)Mysql聽(tīng)can聽(tīng)setup聽(tīng)useDatabaseLock="true",this聽(tīng)is聽(tīng)defualt
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)HSQLDB,MSSQL聽(tīng)plz聽(tīng)setup聽(tīng)useDatabaseLock="false",
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)if聽(tīng)u聽(tīng)setup聽(tīng)useDatabaseLock="true",u聽(tīng)will聽(tīng)catch聽(tīng)error:
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)MSSQL聽(tīng)Error聽(tīng)I(yíng)nfo:FOR聽(tīng)UPDATE聽(tīng)clause聽(tīng)allowed聽(tīng)only聽(tīng)for聽(tīng)DECLARE聽(tīng)CURSOR聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)HSQLDB聽(tīng)Error聽(tīng)I(yíng)nfo:FOR聽(tīng)in聽(tīng)statement聽(tīng)[SELECT聽(tīng)*聽(tīng)FROM聽(tīng)ACTIVEMQ_LOCK聽(tīng)FOR聽(tīng)UPDATE]
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)see聽(tīng)http://www.nabble.com/ActiveMQ-JDBC-Persistence-with-SQL-Server-tf2022248.html#a5560296
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)-->
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</amq:persistenceAdapter>
璇鋒敞鎰廙SSQL(2000/2005)鍜孒SQL鐢變簬涓嶆敮鎸乕SELECT聽(tīng) * ACTIVEMQ_LOCK FOR UPDATE ]
璇硶,鍥犳涓嶈兘浣跨敤榛樿鐨剈serDatabaseLock="true",鍙兘璁劇疆鎴恥seDatabaseLock="false"
鏃跺湪spring閲岄潰閰嶇疆浜?jiǎn)澶氫釜鏁版嵁婧?br />
1.SpringSide 浣跨敤鍐呭祵鐨凥SQL聽(tīng)<!--聽(tīng)The聽(tīng)HSQL聽(tīng)Datasource聽(tīng)that聽(tīng)will聽(tīng)be聽(tīng)used聽(tīng)by聽(tīng)the聽(tīng)Broker聽(tīng)-->
聽(tīng)聽(tīng)聽(tīng)聽(tīng)<bean聽(tīng)id="hsql-ds"聽(tīng)class="org.apache.commons.dbcp.BasicDataSource"聽(tīng)destroy-method="close">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="driverClassName">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>org.hsqldb.jdbcDriver</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="url">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<!--springside聽(tīng)use聽(tīng)HSQL,table聽(tīng)info聽(tīng)see聽(tīng)hsql/activemq.script-->
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>jdbc:hsqldb:res:hsql/activemq</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="username">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>sa</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="password">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value></value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="poolPreparedStatements">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>true</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)</bean>
2.MySql
聽(tīng)<!--聽(tīng)MySql聽(tīng)DataSource聽(tīng)Sample聽(tīng)Setup聽(tīng)-->
聽(tīng)聽(tīng)聽(tīng)聽(tīng)<bean聽(tīng)id="mysql-ds"聽(tīng)class="org.apache.commons.dbcp.BasicDataSource"聽(tīng)destroy-method="close">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="driverClassName">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>com.mysql.jdbc.Driver</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="url">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>jdbc:mysql://localhost/myproject?relaxAutoCommit=true</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="username">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>activemq</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="password">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>activemq</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)</bean>
3.MSSQL
<!--聽(tīng)The聽(tīng)MSSQL聽(tīng)Datasource聽(tīng)Sample聽(tīng)Setup聽(tīng)-->
聽(tīng)聽(tīng)聽(tīng)聽(tīng)<bean聽(tīng)id="mssql-ds"聽(tīng)class="org.apache.commons.dbcp.BasicDataSource"聽(tīng)destroy-method="close">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="driverClassName">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>net.sourceforge.jtds.jdbc.Driver</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="url">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>jdbc:jtds:sqlserver://127.0.0.1:1433/YourDataBase</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="username">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>yourusername</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="password">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>youruserpassword</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="poolPreparedStatements">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<value>true</value>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)</bean>聽(tīng)聽(tīng)聽(tīng)聽(tīng)
]]>
聽(tīng)聽(tīng)聽(tīng)聽(tīng) 浣滆咃細(xì)cctvx1
聽(tīng)聽(tīng)聽(tīng)聽(tīng) 姝ゆ枃妗d粎閫傜敤浜庤鏄庝嬌鐢?Jecncks 鍜?浣跨敤Spring 2.0(DefaultMessageListenerContainer)聽(tīng) 鍏呭綋MDP Container涔嬮棿鐨勫尯鍒?鍚屾椂
婕旂ずJecnks 鐨凷pring 2.0 鏂伴厤緗疄渚嬨?/p>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
聽(tīng) 鍦ˋpplicationContext.xml(Spring鐨勯厤緗枃浠?涓紩鍏ctiveMQ ResourceAdapter 鍜孞encks 鐨刋ML Scheam 閰嶇疆鏂囦歡),濡備笅:
聽(tīng)聽(tīng) ActiveMQ4.1 鍝嶅簲Spring 2.0鍙峰彫錛屾敮鎸佷簡(jiǎn)寮曞叆XML Schema namespace鐨勭畝鍗曢厤緗娉曪紝綆鍖栦簡(jiǎn)閰嶇疆鐨勮鍙ャ偮?/p>
聽(tīng) 鍦ˋpplicationContext.xml(Spring鐨勯厤緗枃浠?涓紩鍏ctiveMQ鐨刋ML Scheam 閰嶇疆鏂囦歡),濡備笅:
< beans
聽(tīng)聽(tīng) xmlns ="http://www.springframework.org/schema/beans" 聽(tīng)聽(tīng)聽(tīng)xmlns:amq ="http://activemq.org/config/1.0" 聽(tīng)聽(tīng)聽(tīng)xmlns:ampra ="http://activemq.org/ra/1.0" 聽(tīng)聽(tīng)聽(tīng)xmlns:jencks ="http://jencks.org/1.3" 聽(tīng)聽(tīng)聽(tīng)xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
聽(tīng)聽(tīng)xsi:schemaLocation ="http://www.springframework.org/schema/beans聽(tīng)http://www.springframework.org/schema/beans/spring-beans.xsd
聽(tīng)聽(tīng)http://activemq.org/config/1.0聽(tīng)http://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4.1-incubator-SNAPSHOT.xsd
聽(tīng)聽(tīng)http://activemq.org/ra/1.0聽(tīng)http://people.apache.org/repository/org.apache.activemq/xsds/activemq-ra-4.1-incubator-SNAPSHOT.xsd
聽(tīng)聽(tīng)http://jencks.org/1.3聽(tīng)http://repository.codehaus.org/org/jencks/jencks/1.3/jencks-1.3.xsd" >
鈥?/p>
鐢變簬ActiveMQ RA鍜孞encks聽(tīng)閭d釜XSD 浠嶇劧鏈夐儴鍒嗛敊璇紝鍥犳浣跨敤鐨勬槸鑷淇敼榪囩殑XSD銆?鏄痻s:any鍏冪礌寮曡搗鐨勯敊璇?
鍏堝湪ClassPath鏍圭洰褰曟斁涓涓慨鏀硅繃鐨刟ctivemq-ra-4.1-incubator-SNAPSHOT.xsd鍜宩encks-1.3.xsd銆?/p>
鍚屾牱淇敼 ClassPath 涓嬮潰META-INF\spring.schemas 澧炲姞鍐呭濡備笅銆傝繖涓猻pring.schemas鏄痵pring鑷畾涔塻cheam鐨勯厤緗枃浠?璇鋒敞鎰?http:\://"閮ㄥ垎鍐欐硶
http\://people.apache.org/repository/org.apache.activemq/xsds/activemq-ra-4.1-incubator-SNAPSHOT.xsd=/activemq-ra-4.1-incubator-SNAPSHOT.xsd
http\://repository.codehaus.org/org/jencks/jencks/1.3/jencks-1.3.xsd=/jencks-1.3.xsd
鈥?/p>
1.聽(tīng)閰嶇疆ActiveMQ Broker聽(tīng) 鍙傝 ActiveMQ+Spring鈥?/p>
2.聽(tīng)閰嶇疆ActiveMQ Resource Adapter
<amqra:managedConnectionFactory id="jmsManagedConnectionFactory" resourceAdapter="#resourceAdapter"/><amqra:resourceAdapter id="resourceAdapter" serverUrl="vm://localhost" />
鈥?/p>
3.聽(tīng)閰嶇疆Jencks 鍩虹閰嶇疆
聽(tīng)聽(tīng) 鍏蜂綋鐨勯厤緗彲浠ュ弬瑙丣encks鐨刋SD
聽(tīng)聽(tīng)1<!-- 聽(tīng)jencks聽(tīng)PoolFactory聽(tīng)config -->
2< jencks:singlePoolFactory聽(tīng) id ="poolingSupport" 聽(tīng)maxSize ="16" 聽(tīng)minSize ="5" 聽(tīng)blockingTimeoutMilliseconds ="60" 聽(tīng)idleTimeoutMinutes ="60" 聽(tīng)matchOne ="true" 聽(tīng)matchAll ="true" 聽(tīng)selectOneAssumeMatch ="true" 聽(tīng) /> 聽(tīng) <!-- 聽(tīng)jencks聽(tīng)XATransactionFactory聽(tīng) -->
3< jencks:xATransactionFactory聽(tīng) id ="transactionSupport" 聽(tīng)useTransactionCaching ="true" 聽(tīng)useThreadCaching ="true" 聽(tīng) /> 聽(tīng)聽(tīng)
4<!-- 聽(tīng)jencks聽(tīng)ConnectionManagerFactory聽(tīng) -->
5< jencks:connectionManagerFactory聽(tīng) id ="connectionManager" 聽(tīng)containerManagedSecurity ="false" 聽(tīng)聽(tīng)poolingSupport ="#poolingSupport" 聽(tīng)transactionSupport ="#transactionSupport" 聽(tīng) /> 聽(tīng) <!-- 聽(tīng)jencks聽(tīng)TransactionContextManagerFactory聽(tīng) -->
6< jencks:transactionContextManagerFactory聽(tīng) id ="transactionContextManagerFactory" />
7![]()
鈥?/p>
4.聽(tīng)閰嶇疆緇橨msTemplate浣跨敤鐨刢onnectionFactory (涓昏鏄敓鎴愯?鍙戦佽?浣跨敤)
聽(tīng)聽(tīng) 榪欓噷娉ㄦ剰涓?鍦ㄩ厤緗甹msTemplate鐨勪嬌鐢ㄧ殑targetConnectionFactory灝辨槸浣跨敤jencks閰嶇疆鐨刢onnectionManager
<!-- 聽(tīng)spring聽(tīng)config聽(tīng)jms聽(tīng)with聽(tīng)jca -->
聽(tīng) < bean聽(tīng) id ="jmsManagerConnectionFactory" 聽(tīng)class ="org.springframework.jca.support.LocalConnectionFactoryBean" >
聽(tīng)聽(tīng) < property聽(tīng) name ="managedConnectionFactory" >
聽(tīng)聽(tīng)聽(tīng) < ref聽(tīng) local ="jmsManagedConnectionFactory" 聽(tīng) />
聽(tīng)聽(tīng) </ property >
聽(tīng)聽(tīng) < property聽(tīng) name ="connectionManager" >
聽(tīng)聽(tīng)聽(tīng) < ref聽(tīng) local ="connectionManager" 聽(tīng) />
聽(tīng)聽(tīng) </ property >
聽(tīng) </ bean >
聽(tīng)
聽(tīng) <!-- 聽(tīng)聽(tīng)Spring聽(tīng)JmsTemplate聽(tīng)config聽(tīng) -->
聽(tīng) < bean聽(tīng) id ="jmsTemplate" 聽(tīng)class ="org.springframework.jms.core.JmsTemplate" >
聽(tīng)聽(tīng) < property聽(tīng) name ="connectionFactory" >
聽(tīng)聽(tīng)聽(tīng) <!-- 聽(tīng)聽(tīng)lets聽(tīng)wrap聽(tīng)in聽(tīng)a聽(tīng)pool聽(tīng)to聽(tīng)avoid聽(tīng)creating聽(tīng)a聽(tīng)connection聽(tīng)per聽(tīng)send聽(tīng) -->
聽(tīng)聽(tīng)聽(tīng) < bean聽(tīng) class ="org.springframework.jms.connection.SingleConnectionFactory" >
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) < property聽(tīng) name ="targetConnectionFactory" 聽(tīng)ref ="jmsManagerConnectionFactory" 聽(tīng) />
聽(tīng)聽(tīng)聽(tīng) </ bean >
聽(tīng)聽(tīng) </ property >
聽(tīng)聽(tīng) <!-- 聽(tīng)custom聽(tīng)MessageConverter聽(tīng) -->
聽(tīng)聽(tīng) < property聽(tīng) name ="messageConverter" 聽(tīng)ref ="orderMessageConverter" 聽(tīng) />
聽(tīng) </ bean > 聽(tīng)
鈥?/p>
5*.聽(tīng)閰嶇疆Spring 2.0鐨凪essageListenerAdapter,淇濊瘉涓嶉渶瑕佺敤鎴峰疄鐜癕essageListener*
聽(tīng)聽(tīng) 瑙?span class="nobr">ActiveMQ+Spring鈥?/p>
聽(tīng)6.閰嶇疆Jecnks 鍏呭綋MDP鐨凜ontainer
聽(tīng) 灝辨槸鎶婁笂闈㈢殑MessageListenerAdapter閰嶇疆鍒癑encks閲岄潰,瀹屾垚鏁翠釜MDP鐨勯厤緗?/p>
聽(tīng)鈥?/pre><!--聽(tīng)Jencks聽(tīng)Container-->
聽(tīng)<jencks:jcaContainer>聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<jencks:bootstrapContext>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<jencks:bootstrapContextFactory聽(tīng)threadPoolSize="25"聽(tīng)/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</jencks:bootstrapContext>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<jencks:connectors>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<!--聽(tīng)use聽(tīng)jencks聽(tīng)container聽(tīng)(use聽(tīng)spring聽(tīng)MessageListenerAdapter)-->
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<jencks:connector聽(tīng)ref="messageListener">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<jencks:activationSpec>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<amqra:activationSpec聽(tīng)destination="org.apache.activemq.spring.Test.spring.embedded"聽(tīng)destinationType="javax.jms.Queue"聽(tīng)/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</jencks:activationSpec>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</jencks:connector>聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</jencks:connectors>聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<jencks:resourceAdapter>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<amqra:resourceAdapter聽(tīng)serverUrl="vm://localhost"聽(tīng)/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</jencks:resourceAdapter>
聽(tīng)</jencks:jcaContainer>
聽(tīng)聽(tīng) Spring 2.0鏈韓浣跨敤DefaultMessageListenerContainer 鍙互鍏呭綋MDP涓殑Container瑙掕壊錛屼絾鏄壌浜嶫encks鏄浜嶫CA鏍囧噯,瀹冧笉浠呬粎鑳藉鎻愪緵jms鐨刯ca鏁村悎,鍖呮嫭鍏朵粬璧勬簮姣斿jdbc閮藉彲浠ュ仛鍒癹ca綆$悊
鎵浠?鍚屾椂瀹屾垚浜?jiǎn)杩欎釜ActiveMQ+Spring+Jencks 閰嶇疆婕旂ず,鏇村鐨勯拡瀵圭敓浜х郴緇熺殑JCA鐗規(guī)у睍紺?浼?xì)鍦ńE嶅悗鐨勫紑鍙戣鍒掕璁轟腑紜畾銆?/p>