我试图把Camel与Web Sphere结合起来。 除了一件事外,它正在对所有人进行罚款。
The scenario looks like: JMS (WMQ) -> routing/transformation -> BEAN (which does a JPA (OpenJPA1.2/DB2) commit).
为了能够向西非经货联盟交易经理和红read进行插播,我把工作经理插入 came:
<!-- Selected parts of the spring config -->
<tx:jta-transaction-manager/>
<bean id="wasTaskExecutor"
class="org.springframework.scheduling.commonj.WorkManagerTaskExecutor">
<property name="workManagerName" value="wm/default" />
</bean>
<bean id="camelTransactionRequired" class="org.apache.camel.spring.spi.SpringTransactionPolicy" depends-on="transactionManager">
<property name="transactionManager" ref="transactionManager"/>
<property name="propagationBehaviorName" value="PROPAGATION_REQUIRED"/>
</bean>
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="taskExecutor" ref="wasTaskExecutor"/>
<property name="transacted" value="true"/>
<property name="transactionManager" ref="transactionManager"/>
</bean>
Then a route, something like:
from("jms:queue:MY.QUEUE")
.transacted("camelTransactionRequired")
.log(..)
.bean(storeJPA);
这是TaskExecutor bean,在应用过程中使用一个单独的春季信息听众(美术家、世界穆斯林联合会)以及预期行为。
当部署/启动时,可以以这种方式处理电文(第1条原线以下),然后开始hang。
[5/12/12 22:14:55:890 CEST]00055 系统 Out O INFO LineFromBackend - 信从问讯引到电箱
[5/12/12 22:27:00:638 CEST] 00000031 ThreadMonitor W WSVR0605W: Thread "Default : 1" (0000001e) has been active for 739306 milliseconds and may be hung. There is/are 1 thread(s) in total in the server that may be hung. at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:196) at com.ibm.ws.util.BoundedBuffer.waitPut_(BoundedBuffer.java:214) at com.ibm.ws.util.BoundedBuffer.put(BoundedBuffer.java:324) at com.ibm.ws.util.ThreadPool.execute(ThreadPool.java:1296) at com.ibm.ws.util.ThreadPool.execute(ThreadPool.java:1100) at com.ibm.ws.asynchbeans.WorkItemImpl$PoolExecuteProxy.run(WorkItemImpl.java:198) at com.ibm.ws.asynchbeans.WorkItemImpl.executeOnPool(WorkItemImpl.java:219) at com.ibm.ws.asynchbeans.WorkManagerImpl.queueWorkItemForDispatch(WorkManagerImpl.java:433) at com.ibm.ws.asynchbeans.WorkManagerImpl.schedule(WorkManagerImpl.java:1074) at com.ibm.ws.asynchbeans.WorkManagerImpl.schedule(WorkManagerImpl.java:846) at org.springframework.scheduling.commonj.WorkManagerTaskExecutor.execute(WorkManagerTaskExecutor.java:154) at org.springframework.jms.listener.DefaultMessageListenerContainer.doRescheduleTask(DefaultMessageListenerContainer.java:669) at org.springframework.jms.listener.AbstractJmsListeningContainer.resumePausedTasks(AbstractJmsListeningContainer.java:536) at org.springframework.jms.listener.AbstractJmsListeningContainer.doStart(AbstractJmsListeningContainer.java:285) at org.springframework.jms.listener.AbstractJmsListeningContainer.start(AbstractJmsListeningContainer.java:263) at org.springframework.jms.listener.DefaultMessageListenerContainer.start(DefaultMessageListenerContainer.java:555) at org.apache.camel.component.jms.JmsConsumer.startListenerContainer(JmsConsumer.java:84)
是否有任何人看到这一点?