English 中文(简体)
Web Sphere Camel JMS, Spring, TaskExecutor, haning Threads
原标题:WebSphere Camel JMS, spring, taskExecutor, haninging Threads

我试图把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)

是否有任何人看到这一点?

最佳回答

The thread is "hung" waiting to submit work to a full queue, and the work manager is configured to block rather than throw an error when the queue is full. To resolve the "hang", either increase the number of threads in the work manager thread pool, or change the queue full action to be "error" rather than "wait". Alternatively, investigate if the work items being submitted to the work manager are taking too long for some reason.

问题回答

暂无回答




相关问题
Recommended way to develop using Jetty and Eclipse

I am currently developing a J2EE application and I would like to use Jetty. I would like to have iot integrated with Eclipse, so I could debug the appliaction. I ve tried out couple of plugins (...

Call function periodically in Java

we need run one function periodically in Java web application . How to call function of some class periodically ? Is there any way that call function when some event occured like high load in server ...

Why make an EJB rather than a Web Service?

I would have thought that there is a lot of information out there on this, but I haven t found anything that really answers my question. What are the advantages of making an EJB rather than a web ...

Where should I put this configuration setting?

I m designing a fairly small web application which will run on a Sun application server (v9.1). It only has a few pages, no database of its own, and will retrieve/update data via web services. There s ...

JNDI Names -- Is Prefix "jdbc/" needed?

What s up with JNDI names? I m trying to get a javax.sql.DataSource using the new annotations feature of Java 5. It s not working for me, so I want to ask... I have a in my web.xml, inside of it is ...

hibernate interceptors : afterTransactionCompletion

I wrote a Hibernate interceptor : public class MyInterceptor extends EmptyInterceptor { private boolean isCanal=false; public boolean onSave(Object entity, Serializable arg1, Object[] arg2, String[]...

热门标签