you need to set the Exchange status to DONE.

Praveen K wrote:
> 
> Hi,
> I am facing a problem while running my Service Assembly on Servicemix
> running on Jboss. Entire Servicemix hangs when I send request to this
> component (through a queue).
> The component that is causing problem is a SE that we have developed. This
> SE (com-jms-bulk-se service engine) is written similar to servicemix-jms
> Service engine. This component listens for a jms message and then sends it
> to an EIP component.
> In the log file it is seems like it is getting stuck at
> channel.sendSync(exchange) method call.  All the subsequent requests are
> getting stuck at the same place. 
> 
> The strange this is that this code has been working perfectly in
> standalone servicemix component for about a month. But when we deploy it
> on SM running on Jboss we get this issue.  The same SA has an http
> endpoint. Even the requests sent to that endpoint doesn't return. That
> request also gets stuck at
> "[org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow] Called Flow send"
> line. I have provided the log below.
> 
> Can someone pls help us in identifying this issue.
> 
> 
> Here is the code snippet from where it is invoked
> <code>
>       public void onMessage(final String messages) {
>               try {
>                       if (log.isDebugEnabled()) {
>                               log.debug("Received jms messages " + messages);
>                       }
>                       MessageExchange exchange = toNMS(messages);
>                       if (!channel.sendSync(exchange)) {
>                               throw new IllegalStateException("Exchange has 
> been aborted");
>                       }
>                       if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
>                               log.debug("Channel still active. Setting status 
> to DONE");
>                               exchange.setStatus(ExchangeStatus.DONE);
>                               channel.send(exchange);
>                               log.debug("Channel status set to DONE");
>                       }
>               } catch (Throwable e) {
>                       log.error("Error while handling jms message", e);
>               }
>               log.debug("Exiting onMessage");
>       }
> </code>
> 
> Following is the debug log -
> 
> 
> 2007-08-01 19:58:13,664 DEBUG [org.apache.servicemix.jms.JmsComponent]
> Service unit started
> 2007-08-01 19:58:13,663 INFO 
> [org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle] Starting
> service unit: iq-bulk-jms-su
> 2007-08-01 19:58:13,665 DEBUG
> [org.apache.servicemix.jms.bulk.JmsBulkComponent] Starting service unit
> 2007-08-01 19:58:13,804 DEBUG
> [org.apache.servicemix.jms.bulk.JmsBulkProcessor] Polling messages
> 2007-08-01 19:58:13,861 DEBUG [org.jboss.mx.loading.RepositoryClassLoader]
> setRepository,
> [EMAIL PROTECTED],
> [EMAIL PROTECTED]
> url=null ,addedOrder=0}
> 2007-08-01 19:58:14,636 DEBUG
> [org.apache.servicemix.jms.bulk.JmsBulkProcessor] Message count 1
> 2007-08-01 19:58:14,710 DEBUG
> [org.apache.servicemix.jms.bulk.JmsBulkProcessor] Message count 2
> 2007-08-01 19:58:14,711 DEBUG
> [org.apache.servicemix.jms.bulk.JmsBulkProcessor] Run called
> 2007-08-01 19:58:14,712 DEBUG
> [org.apache.servicemix.jms.bulk.JmsBulkProcessor] Messaged will be now be
> flushed
> 2007-08-01 19:58:14,712 DEBUG
> [org.apache.servicemix.jms.bulk.JmsBulkProcessor] Received jms messages
> <messages>....</messages>
> 2007-08-01 19:58:14,878 DEBUG
> [org.apache.servicemix.jbi.messaging.DeliveryChannelImpl] SendSync
> ID:uspsvm16-45553-1186012377034-20:0 in DeliveryChannel{com-jms-bulk-se}
> 2007-08-01 19:58:14,902 DEBUG
> [org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow] Called Flow send
> 2007-08-01 19:58:15,024 DEBUG
> [org.apache.servicemix.jbi.messaging.DeliveryChannelImpl] Waiting for
> exchange ID:uspsvm16-45553-1186012377034-20:0 (a4b9da) to be answered in
> DeliveryChannel{com-jms-bulk-se} from sendSync
> 2007-08-01 19:58:15,313 DEBUG
> [org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue]
> [EMAIL PROTECTED] dequeued
> exchange: InOnly[
>   id: ID:uspsvm16-45553-1186012377034-20:0
>   status: Active
>   role: provider
>   service: {http://www.com.com/iq}eipalertpipe
>   endpoint: endpoint
>   in: <?xml version="1.0" encoding="UTF-8"?><messages>...
> ]
> 2007-08-01 19:58:15,315 DEBUG [org.apache.servicemix.eip.EIPComponent]
> Received exchange: status: Active, role: provider
> 2007-08-01 19:58:15,316 DEBUG [org.apache.servicemix.eip.EIPComponent]
> Retrieved correlation id: null
> 2007-08-01 19:58:15,320 DEBUG
> [org.apache.servicemix.store.memory.MemoryStore] Storing object with id:
> ID:uspsvm16-45553-1186012377034-20:0
> 2007-08-01 19:58:15,327 DEBUG [org.apache.servicemix.eip.EIPComponent]
> Created correlation id: ID:uspsvm16-45553-1186012377034-14:0
> 2007-08-01 19:58:15,329 DEBUG
> [org.apache.servicemix.jbi.messaging.DeliveryChannelImpl] Send
> ID:uspsvm16-45553-1186012377034-14:0 in DeliveryChannel{servicemix-eip}
> 2007-08-01 19:58:15,329 DEBUG
> [org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow] Called Flow send
> 
> 
> 
> 
> 
> 2007-08-01 20:09:20,601 DEBUG [org.jboss.mx.loading.RepositoryClassLoader]
> setRepository,
> [EMAIL PROTECTED],
> [EMAIL PROTECTED]
> url=null ,addedOrder=0}
> 2007-08-01 20:09:20,954 DEBUG
> [org.apache.servicemix.http.jetty.JettyContextManager] Dispatching job:
> [EMAIL PROTECTED],io=0,w=true,b=0|0]
> 2007-08-01 20:09:21,163 DEBUG
> [org.apache.servicemix.http.processors.ConsumerProcessor] Receiving HTTP
> request: POST /ProductService/iq/ HTTP/1.1
> User-Agent: Jakarta Commons-HttpClient/3.0
> Host: uspsvm16.eng.com.com:8192
> Content-Length: 927
> 
> 
> 2007-08-01 20:09:22,466 DEBUG [org.jboss.mx.loading.RepositoryClassLoader]
> setRepository,
> [EMAIL PROTECTED],
> [EMAIL PROTECTED]
> url=null ,addedOrder=0}
> 2007-08-01 20:09:22,676 DEBUG [org.jboss.mx.loading.RepositoryClassLoader]
> setRepository,
> [EMAIL PROTECTED],
> [EMAIL PROTECTED]
> url=null ,addedOrder=0}
> 2007-08-01 20:09:22,722 DEBUG [org.apache.servicemix.http.HttpComponent]
> Created correlation id: ID:uspsvm16-45553-1186012377034-12:0
> 2007-08-01 20:09:22,723 DEBUG
> [org.apache.servicemix.jbi.messaging.DeliveryChannelImpl] Send
> ID:uspsvm16-45553-1186012377034-12:0 in DeliveryChannel{servicemix-http}
> 2007-08-01 20:09:22,744 DEBUG
> [org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow] Called Flow send
> 
> Thanks,
> Praveen
> 

-- 
View this message in context: 
http://www.nabble.com/servicemix-on-Jboss-hangs-entire-servicemix.-tf4203764s12049.html#a11989360
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to