that problem always happen in my test.
In my test, they are only deployed, and there is no any other services.
there is only 12 components are deployed. so i think there is no load.
5 components, eip-bean1-sa-1.0-SNAPSHOT.jar ....
eip-bean5-sa-1.0-SNAPSHOT.jar
1 component, eip-http-sa-1.0-SNAPPSHOT.jar
1 component, eip-sa-1.0-SNAPSHOT.jar
4 components, servicemix-bean, servicemix-eip, servicemix-http,
servicemix-shared.
And, test beans are implemented such as below.
public class RoutingSlipInOutBean1 implements MessageExchangeListener {
@Resource
private DeliveryChannel channel;
public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
System.out.println("exchange received at Bean1");
try{
Thread.sleep(5000);
}
catch (Exception e){}
NormalizedMessage nm = exchange.getMessage("in");
exchange.setMessage(nm,"out");
System.out.println("sending exchange to Bean2");
channel.send(exchange);
}
else if (exchange.getStatus() == ExchangeStatus.DONE)
{
System.out.println("Bean 1 : DONE. ");
}
else if (exchange.getStatus() == ExchangeStatus.ERROR)
{
System.out.println("Bean 1 : ERROR");
}
}
}
gnodet wrote:
>
> We have unit tests demonstrating the use of transactions over JCA or SEDA
> flow using the EIP routing slip. Does this problem always happen, or only
> when under load?
>
> On 8/7/07, uniker80 <[EMAIL PROTECTED]> wrote:
>>
>> i'm trying to test SM transaction, and i deployed services using http and
>> EIP
>> as below.
>>
>> http(InOut) <---> EIP (RountSlip (bean1->bean2->bean3->bean4->bean5) )
>>
>> i've configured the JBI Container to use JCA Flow (persistent and
>> autoEnlistInTransaction set to true)
>>
>> but there is exceptions
>> ------------------------------
>> exchange received at Bean1
>> sending exchange to Bean2
>> exchange received at Bean2
>> sending exchange to Bean3
>> ERROR - EIPComponent - Error processing exchange InOut[
>> id: ID:CJHCOM-3504-1186463609203-3:17
>> status: Active
>> role: consumer
>> service:
>> {http://setest.ssu.ac.kr}eip-bean-routingslip-inout-bean-service2
>> endpoint: eip-bean-routingslip-inout-bean-endpoint2
>> in: <?xml version="1.0" encoding="UTF-8"?><ping
>> xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
>> <pingRequest>
>> <message xmlns="http://soap">hel lo</message>
>> </pingRequest>
>> </ping>
>> out: <?xml version="1.0" encoding="UTF-8"?><ping
>> xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
>> <pingRequest>
>> <message xmlns="http://soap">hel lo</message>
>> </pingRequest>
>> </ping>
>> ]
>> javax.jbi.messaging.MessagingException: java.lang.IllegalStateException:
>> the
>> transaction context set in the messageExchange is not bound to the
>> current
>> thread
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.autoEnlistInTxDeliveryChannelImpl.java:771)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSendDeliveryChannelImpl.java:349)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendDeliveryChannelImpl.java:417)
>> at
>> org.apache.servicemix.common.EndpointDeliveryChannel.sendEndpointDeliveryChannel.java:79)
>> at
>> org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.java:67)
>> at
>> org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndpoint.java:78)
>> at
>> org.apache.servicemix.eip.patterns.StaticRoutingSlip.processAsync(StaticRoutingSlip.java:228)
>> at
>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:160)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcessAsyncBaseLifeCycle.java:489)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeAsyncBaseLifeCycle.java:463)
>> at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
>> at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
>> at
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:515)
>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:129)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:121)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
>> at
>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:695)
>> at
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
>> at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>>
>> at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>> at java.lang.Thread.run(Thread.java:619)
>> Caused by: java.lang.IllegalStateException: the transaction context set
>> in
>> the messageExchange is not bound to the curre
>> nt thread
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.autoEnlistInTx(DeliveryChannelImpl.java:764)
>> ... 21 more
>> exchange received at Bean3
>> sending exchange to Bean4
>> ERROR - EIPComponent - Error processing exchange InOut[
>> id: ID:CJHCOM-3504-1186463609203-3:18
>> status: Active
>> role: consumer
>> service:
>> {http://setest.ssu.ac.kr}eip-bean-routingslip-inout-bean-service3
>> endpoint: eip-bean-routingslip-inout-bean-endpoint3
>> in: <?xml version="1.0" encoding="UTF-8"?><ping
>> xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
>> <pingRequest>
>> <message xmlns="http://soap">hel lo</message>
>> </pingRequest>
>> </ping>
>> out: <?xml version="1.0" encoding="UTF-8"?><ping
>> xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
>> <pingRequest>
>> <message xmlns="http://soap">hel lo</message>
>> </pingRequest>
>> </ping>
>> ]
>> java.lang.IllegalStateException: component is not owner
>> at
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(MessageExchangeImpl.java:210)
>> at
>> org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndpoint.java:77)
>> at
>> org.apache.servicemix.eip.patterns.StaticRoutingSlip.processAsync(StaticRoutingSlip.java:228)
>> at
>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:160)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463)
>> at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
>> at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
>> at
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:515)
>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:129)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:121)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
>> at
>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:695)
>> at
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
>> at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>>
>> at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>> at java.lang.Thread.run(Thread.java:619)
>> exchange received at Bean4
>> sending exchange to Bean5
>> ERROR - EIPComponent - Error processing exchange InOut[
>> id: ID:CJHCOM-3504-1186463609203-3:19
>> status: Active
>> role: consumer
>> service:
>> {http://setest.ssu.ac.kr}eip-bean-routingslip-inout-bean-service4
>> endpoint: eip-bean-routingslip-inout-bean-endpoint4
>> in: <?xml version="1.0" encoding="UTF-8"?><ping
>> xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
>> <pingRequest>
>> <message xmlns="http://soap">hel lo</message>
>> </pingRequest>
>> </ping>
>> out: <?xml version="1.0" encoding="UTF-8"?><ping
>> xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
>> <pingRequest>
>> <message xmlns="http://soap">hel lo</message>
>> </pingRequest>
>> </ping>
>> ]
>> java.lang.IllegalStateException: component is not owner
>> at
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(MessageExchangeImpl.java:210)
>> at
>> org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndpoint.java:77)
>> at
>> org.apache.servicemix.eip.patterns.StaticRoutingSlip.processAsync(StaticRoutingSlip.java:228)
>> at
>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:160)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463)
>> at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
>> at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
>> at
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:515)
>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:129)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:121)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
>> at
>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:695)
>> at
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
>> at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>>
>> at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>> at java.lang.Thread.run(Thread.java:619)
>> exchange received at Bean5
>> sending exchange back to Consumer
>> ERROR - EIPComponent - Error processing exchange InOut[
>> id: ID:CJHCOM-3504-1186463609203-3:20
>> status: Active
>> role: consumer
>> service:
>> {http://setest.ssu.ac.kr}eip-bean-routingslip-inout-bean-service5
>> endpoint: eip-bean-routingslip-inout-bean-endpoint5
>> in: <?xml version="1.0" encoding="UTF-8"?><ping
>> xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
>> <pingRequest>
>> <message xmlns="http://soap">hel lo</message>
>> </pingRequest>
>> </ping>
>> out: <?xml version="1.0" encoding="UTF-8"?><ping
>> xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
>> <pingRequest>
>> <message xmlns="http://soap">hel lo</message>
>> </pingRequest>
>> </ping>
>> ]
>> javax.jbi.messaging.MessagingException: java.lang.IllegalStateException:
>> the
>> transaction context set in the messageExcha
>> nge is not bound to the current thread
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.autoEnlistInTx(DeliveryChannelImpl.java:771)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:349)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:417)
>> at
>> org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryChannel.java:79)
>> at
>> org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.java:67)
>> at
>> org.apache.servicemix.eip.patterns.StaticRoutingSlip.processAsync(StaticRoutingSlip.java:210)
>> at
>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:160)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463)
>> at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
>> at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
>> at
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:515)
>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:129)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:121)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
>> at
>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:695)
>> at
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
>> at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>>
>> at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>> at java.lang.Thread.run(Thread.java:619)
>> Caused by: java.lang.IllegalStateException: the transaction context set
>> in
>> the messageExchange is not bound to the curre
>> nt thread
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.autoEnlistInTx(DeliveryChannelImpl.java:764)
>> ... 20 more
>> ----------------------------------------------------------
>>
>> is there any problem or mistakes?
>> why the
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/exception-in-transaction-tf4228279s12049.html#a12028872
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Principal Engineer, IONA
> Blog: http://gnodet.blogspot.com/
>
>
--
View this message in context:
http://www.nabble.com/exception-in-transaction-tf4228279s12049.html#a12029907
Sent from the ServiceMix - User mailing list archive at Nabble.com.