You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by gnanda <gi...@phaseforward.com> on 2010/04/20 15:58:43 UTC

smx4 javax.transaction.InvalidTransactionException:

Hi , 
I am using apache-servicemix-4.0.0. My flow is jms consumer->eip(pipeline) 
eip pipeline has a bean class as transformer and http provider as target. I
am starting a transaction in jms consumer. here is my xbean.xml files 


        <jms:endpoint id="eipjmsconsumer" 
                service="ec:jms" 
                endpoint="jms" 
                targetService="ec:eip" 
                targetEndpoint="eip" 
                role="consumer" 
                processorName="jca" 
                defaultMep="http://www.w3.org/2004/08/wsdl/in-only" 
                connectionFactory="#connectionFactory"               
synchronous="true" 
                resourceAdapter="#amqResourceAdapter" 
                bootstrapContext="#bootstrapContext" 
                rollbackOnError="true"> 
                <jms:activationSpec> 
                        <amqra:activationSpec destination="epq1" 
                                destinationType="javax.jms.Queue"
maximumRedeliveries="2" 
                                initialRedeliveryDelay="10000"
useExponentialBackOff="false" /> 
                </jms:activationSpec> 
        </jms:endpoint> 
        <bean id="bootstrapContext"
class="org.jencks.factory.BootstrapContextFactoryBean"> 
                <property name="threadPoolSize" value="15" /> 
                 <property name="transactionManager"
ref="transactionManager"/> 
                
        </bean> 

        <amqra:resourceAdapter id="amqResourceAdapter" 
                serverUrl="tcp://localhost:61616" /> 


        <bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory"> 
                <property name="brokerURL" value="tcp://localhost:61616" /> 

        </bean> 
        <bean id="transactionManager"
class="org.apache.geronimo.transaction.manager.GeronimoTransactionManager"></bean> 
                <!--amq works 
        <amq:connectionFactory id="connectionFactory" 
                brokerURL="tcp://localhost:61616" /> 


                JMS ConnectionFactory from JNDI - <bean
id="connectionFactory" 
                class="org.springframework.jndi.JndiObjectFactoryBean">
<property 
                name="jndiName" value="ConnectionFactory" /> </bean> 
        --> 

</beans> 

<eip:pipeline service="ec:eip" endpoint="eip"> 
    <eip:transformer> 
      <eip:exchange-target service="ec:bean" /> 
    </eip:transformer> 
    <eip:target> 
      <eip:exchange-target service="ec:http" /> 
    </eip:target> 
  </eip:pipeline> 


<bean:endpoint service="ec:bean" endpoint="bean" bean="#myBean"/> 

  <bean id="myBean" class="com.pf.eipconsumer.RouterBean"/> 

</beans> 
<http:endpoint service="ec:http" 
                 endpoint="http" 
                 role="provider" 
                 locationURI="http://localhost/orderapp/OrderProcess1" 
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out" 
                  />             

</beans> 

here is my bean class file. In this class file I am parsing soap header to
set the http location URI at run time 
public class RouterBean implements MessageExchangeListener { 

        @Resource 
        private DeliveryChannel channel; 
        private static final org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory 
                        .getLog(RouterBean.class); 

        public void onMessageExchange(MessageExchange exchange) 
                        throws MessagingException { 
                log.info("Received exchange: " + exchange); 
                log.info("Received exchange status: " +
exchange.getStatus()); 
                log.info("Received exchange:properties"); 
                Iterator<String> iterator2 =
exchange.getPropertyNames().iterator(); 
                while (iterator2.hasNext()) { 

                        String propName2 = iterator2.next(); 
                        log.info("inside iterator,propName:" + propName2 +
":" 
                                        + exchange.getProperty(propName2)); 
                } 
                String body = null; 
                try { 
                        if (exchange.getStatus() == ExchangeStatus.ACTIVE) { 
                                NormalizedMessage message =
exchange.getMessage("in"); 
                                Source content = message.getContent(); 
                                log.info("content is:" + content); 
                                body = (new
SourceTransformer()).toString(content); 
                                log.info("eipConsumer:input message body
is:" + body); 
                                message.setContent(new StringSource(body)); 
                                exchange.setMessage(message, "out"); 
                                String uri = getURIFromMessage(body); 
    log.info("uri is:"+uri); 
    
    boolean useDynamicUri = true; 
    if (useDynamicUri) { 
     exchange.getMessage("out").setProperty( 
                                      JbiConstants.HTTP_DESTINATION_URI, 
                                      uri); 
                  } 
                                
                                boolean good = channel.sendSync(exchange); 
                                log.info("channel send done"); 
                                
                        
                        //else if(exchange.getStatus() ==
ExchangeStatus.DONE){ 
                        if(good){ 
                                log.info("inside DONE block"); 
                                exchange.setStatus(ExchangeStatus.DONE); 
                                channel.send(exchange); 
                        } 
                        //else if(exchange.getStatus() ==
ExchangeStatus.ERROR){ 
                else{ 
                                log.info("inside ERROR block"); 
                                //Exception ex = new Exception ("ERROR:Fault
occurred"+faultbody); 
                                Exception ex = new Exception ("ERROR:Fault
occurred"); 
                                exchange.setError(ex); 
                                exchange.setStatus(ExchangeStatus.ERROR); 
                                channel.send(exchange); 
                        } 
                } 

                } catch (TransformerException e) { 
                        // TODO Auto-generated catch block 
                        e.printStackTrace(); 
                        log.error("error:", e); 
                } finally { 

                        // exchange.setStatus(ExchangeStatus.DONE); 
                        // channel.send(exchange); 
                } 
        } 

I am getting exception as below. Please suggest what am I doing wrong here 

2010-04-19 22:14:37,078| 22:14:37,078 | INFO  | x-bean-thread-12 |
RouterBean                       | com.pf.eipconsumer.RouterBean      66 |
uri is:http://LPF004689/orderapp/OrderProcess
2010-04-19 22:14:37,078| 22:14:37,078 | ERROR | mix-eip-thread-5 |
EIPComponent                     | icemix.common.AsyncBaseLifeCycle  480 |
Error processing exchange
org.apache.servicemix.jbi.runtime.impl.InOnlyImpl@8d1aa8 
javax.jbi.messaging.MessagingException:
javax.transaction.InvalidTransactionException: Specified transaction is
already associated with another thread        at
org.apache.servicemix.common.EndpointDeliveryChannel.resumeTx(EndpointDeliveryChannel.java:137) 
        at
org.apache.servicemix.common.EndpointDeliveryChannel.sendSync(EndpointDeliveryChannel.java:118) 
        at
org.apache.servicemix.common.endpoints.SimpleEndpoint.sendSync(SimpleEndpoint.java:74) 
        at
org.apache.servicemix.eip.patterns.Pipeline.processSync(Pipeline.java:246) 
        at
org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:183) 
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627) 
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581) 
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478) 
        at
org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347) 
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
        at java.lang.Thread.run(Thread.java:619) 
Caused by: javax.transaction.InvalidTransactionException: Specified
transaction is already associated with another thread 
        at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.associate(TransactionManagerImpl.java:114) 
        at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.resume(TransactionManagerImpl.java:183) 
        at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source) 
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
        at java.lang.reflect.Method.invoke(Method.java:597) 
        at
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:64) 
        at
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:78) 
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
        at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 
        at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
        at
org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) 
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
        at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 
        at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 
        at $Proxy23.resume(Unknown Source) 
        at
org.apache.servicemix.common.EndpointDeliveryChannel.resumeTx(EndpointDeliveryChannel.java:135) 
        ... 11 more 
2010-04-19 22:14:37,078| 22:14:37,078 | ERROR | ix-http-thread-8 |
HttpComponent                    | icemix.common.AsyncBaseLifeCycle  509 |
Transaction is still active after exchange processing. Trying to rollback
transaction. 
2010-04-19 22:14:37,078| 22:14:37,078 | ERROR | pool-6-thread-2  |
JcaConsumerProcessor             | mix.jms.jca.JcaConsumerProcessor  117 |
Error while handling jms message 
javax.jbi.messaging.MessagingException:
javax.transaction.InvalidTransactionException: Specified transaction is
already associated with another thread 
        at
org.apache.servicemix.common.EndpointDeliveryChannel.resumeTx(EndpointDeliveryChannel.java:137) 
        at
org.apache.servicemix.common.EndpointDeliveryChannel.sendSync(EndpointDeliveryChannel.java:118) 
        at
org.apache.servicemix.jms.jca.JcaConsumerProcessor.onMessage(JcaConsumerProcessor.java:110) 
        at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:129) 
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:123) 
        at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:64) 
        at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:735) 
        at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:169) 
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:290) 
        at
org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32) 
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
        at java.lang.Thread.run(Thread.java:619) 
Caused by: javax.transaction.InvalidTransactionException: Specified
transaction is already associated with another thread 
        at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.associate(TransactionManagerImpl.java:114) 
        at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.resume(TransactionManagerImpl.java:183) 
        at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source) 
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
        at java.lang.reflect.Method.invoke(Method.java:597) 
        at
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:64) 
        at
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:78) 
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
        at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 
        at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
        at
org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) 
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
        at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 
        at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 
        at $Proxy23.resume(Unknown Source) 
        at
org.apache.servicemix.common.EndpointDeliveryChannel.resumeTx(EndpointDeliveryChannel.java:135) 
        ... 12 more 




-- 
View this message in context: http://old.nabble.com/smx4-javax.transaction.InvalidTransactionException%3A-tp28287860p28287860.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: smx4 javax.transaction.InvalidTransactionException:

Posted by gnanda <gi...@phaseforward.com>.
I am still getting the InvalidTransactionException. I think I should try some
other way to write the transaformer java code (not extending
MessageExchangelIstener). I am looking around for any document available on
the web with no luck. If someone will point me with any document or sample
code will be very helpful
 


gnanda wrote:
> 
> I appreciate all your help. I will take out DONE/ERROR part fo code from
> the bean and check if that InvalidTransactionException  goes away
> 
> 
> iocanel wrote:
>> 
>> 
>> iocanel wrote:
>>> 
>>> I made a mistake. The bean will not be sent the DONE / ERROR exchange,
>>> these are handled by the endpoint itself. Sorry about that :-( 
>>> 
>>> I will have a look at your source and let you know...
>>> 
>> 
>> I checked your router bean and I still see that you are excpecting that
>> after doing channel.send(exchange), you expect that it will return you
>> the result.
>> 
>> It doesn't work that way.
>> After send() there is nothing more to do inside your pojo.
>> 
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/smx4-javax.transaction.InvalidTransactionException%3A-tp28287860p28358825.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: smx4 javax.transaction.InvalidTransactionException:

Posted by gnanda <gi...@phaseforward.com>.
I appreciate all your help. I will take out DONE/ERROR part fo code from the
bean and check if that InvalidTransactionException  goes away


iocanel wrote:
> 
> 
> iocanel wrote:
>> 
>> I made a mistake. The bean will not be sent the DONE / ERROR exchange,
>> these are handled by the endpoint itself. Sorry about that :-( 
>> 
>> I will have a look at your source and let you know...
>> 
> 
> I checked your router bean and I still see that you are excpecting that
> after doing channel.send(exchange), you expect that it will return you the
> result.
> 
> It doesn't work that way.
> After send() there is nothing more to do inside your pojo.
> 
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/smx4-javax.transaction.InvalidTransactionException%3A-tp28287860p28341526.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: smx4 javax.transaction.InvalidTransactionException:

Posted by iocanel <ca...@upstreamsystems.com>.

iocanel wrote:
> 
> I made a mistake. The bean will not be sent the DONE / ERROR exchange,
> these are handled by the endpoint itself. Sorry about that :-( 
> 
> I will have a look at your source and let you know...
> 

I checked your router bean and I still see that you are excpecting that
after doing channel.send(exchange), you expect that it will return you the
result.

It doesn't work that way.
After send() there is nothing more to do inside your pojo.





-----
Ioannis Canellos
-- 
View this message in context: http://old.nabble.com/smx4-javax.transaction.InvalidTransactionException%3A-tp28287860p28337645.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: smx4 javax.transaction.InvalidTransactionException:

Posted by iocanel <ca...@upstreamsystems.com>.
I made a mistake. The bean will not be sent the DONE / ERROR exchange, these
are handled by the endpoint itself. Sorry about that :-( 

I will have a look at your source and let you know...

-----
Ioannis Canellos
-- 
View this message in context: http://old.nabble.com/smx4-javax.transaction.InvalidTransactionException%3A-tp28287860p28337642.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: smx4 javax.transaction.InvalidTransactionException:

Posted by gnanda <gi...@phaseforward.com>.
This forum is my only hope, still fighting with the transaction issue. I have
attached the zip file with all the code that i have. I did exactly what you
suggested but the sendSync() never returned back. It just hang there, then I
changed it to send () method call . It comes back because it is an async
call.

Bean class never received any done or error message . 

Jut trying to understand could be there some other way to define this class
instead of extending from messageExchangeListener.  Transaction with
MessageExchangeListener class ever worked for anyone?

Here is little background of the usage of bean class, I am using it to parse
incoming soap message and set to HTTP_DESTINATION_URI so that at runtime I
can set location URI of httpconsumer. I know somehow i have to use recipient
list instead of pipeline to make this scenaro works. But for now I am just
trying to make sure transaction works with my bean class with fixed HTTP
location URI. then I will move to next



Here are my log 

010-04-22 15:57:52,308 | 15:57:52,308 | INFO  | x-bean-thread-21 |
RouterBean                       | com.pf.eipconsumer.RouterBean     126 |
channel send done
2010-04-22 15:57:52,340 | 15:57:52,340 | ERROR | x-http-thread-15 |
HttpComponent                    | icemix.common.AsyncBaseLifeCycle  509 |
Transaction is still active after exchange processing. Trying to rollback
transaction.
2010-04-22 15:57:52,340 | 15:57:52,340 | ERROR | mix-eip-thread-4 |
EIPComponent                     | icemix.common.AsyncBaseLifeCycle  480 |
Error processing exchange
org.apache.servicemix.jbi.runtime.impl.InOnlyImpl@1a07e15
javax.jbi.messaging.MessagingException:
javax.transaction.InvalidTransactionException: Specified transaction is
already associated with another thread
	at
org.apache.servicemix.common.EndpointDeliveryChannel.resumeTx(EndpointDeliveryChannel.java:137)
	at
org.apache.servicemix.common.EndpointDeliveryChannel.sendSync(EndpointDeliveryChannel.java:118)
	at
org.apache.servicemix.common.endpoints.SimpleEndpoint.sendSync(SimpleEndpoint.java:74)
	at
org.apache.servicemix.eip.patterns.Pipeline.processSync(Pipeline.java:246)
	at org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:183)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: javax.transaction.InvalidTransactionException: Specified
transaction is already associated with another thread
	at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.associate(TransactionManagerImpl.java:114)
	at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.resume(TransactionManagerImpl.java:183)
	at sun.reflect.GeneratedMethodAccessor189.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:64)
	at
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:78)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy23.resume(Unknown Source)
	at
org.apache.servicemix.common.EndpointDeliveryChannel.resumeTx(EndpointDeliveryChannel.java:135)
	... 11 more
2010-04-22 15:57:52,340 | 15:57:52,340 | ERROR | pool-5-thread-2  |
JcaConsumerProcessor             | mix.jms.jca.JcaConsumerProcessor  117 |
Error while handling jms message
java.lang.IllegalStateException: Cannot set rollback only, status is
STATUS_NO_TRANSACTION
	at
org.apache.geronimo.transaction.manager.TransactionImpl.setRollbackOnly(TransactionImpl.java:140)
	at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:236)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:64)
	at
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:78)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy23.setRollbackOnly(Unknown Source)
	at
org.apache.servicemix.jms.jca.JcaConsumerProcessor.process(JcaConsumerProcessor.java:133)
	at
org.apache.servicemix.jms.jca.JcaConsumerProcessor.onMessage(JcaConsumerProcessor.java:111)
	at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:129)
	at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:123)
	at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:64)
	at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:735)
	at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:169)
	at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:290)
	at
org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
2010-04-22 15:57:52,340 | 15:57:52,340 | WARN  | pool-5-thread-2  |
ServerSessionImpl:0              | he.activemq.ra.ServerSessionImpl  234 |
Local transaction had not been commited. Commiting now.
2010-04-22 15:57:52,340 | 15:57:52,340 | INFO  | pool-5-thread-2  |
ServerSessionImpl:0              | he.activemq.ra.ServerSessionImpl  177 |
Endpoint failed to process message. Reason: Endpoint after delivery
notification failure



iocanel wrote:
> 
> Hi granda,
> 
> I think that it should go like this:
> 
>                        public void onMessage(MessageExchange exchange)
> throws MessagingException {
>                        // Here is the part that handles the exchange
> received from Jms Consumer
>                        if (exchange instanceof InOut &&
> exchange.getStatus() == ExchangeStatus.ACTIVE) {
>                                 channel.sendSync(exchange);                     
>                         }
>                         //You receive the exchange from the Web Service
> with DONE status
>                          else if (exchange instanceof InOut &&
> exchange.getStatus() == ExchangeStatus.DONE) {                                                               
>                                  log.info("inside DONE block");
>                                  // You can also add here your fault
> auditing.
>                                 channel.send(exchange); 
>                         }
>                         //If the exhcange is with status ERROR
>                         else if (exchange.getStatus() ==
> ExchangeStatus.ERROR) { 
>                                 log.info("inside ERROR block"); 
>                                 channel.send(exchange); 
>                         }
>                         //In all other cases (which means not InOut
> Exchange, you should throw error 
>                         else throw new IllegalStateException();
> }
> 
> If this doesn't work for you (then I prolly missed something so please
> send me your assembly to further investigate.
> 
> Hope it helps.
> 
http://old.nabble.com/file/p28334196/eipconsumer.zip eipconsumer.zip 
-- 
View this message in context: http://old.nabble.com/smx4-javax.transaction.InvalidTransactionException%3A-tp28287860p28334196.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: smx4 javax.transaction.InvalidTransactionException:

Posted by iocanel <ca...@upstreamsystems.com>.
Hi granda,

I think that it should go like this:

                       public void onMessage(MessageExchange exchange)
throws MessagingException {
                       // Here is the part that handles the exchange
received from Jms Consumer
                       if (exchange instanceof InOut && exchange.getStatus()
== ExchangeStatus.ACTIVE) {
                                channel.sendSync(exchange);                     
                        }
                        //You receive the exchange from the Web Service with
DONE status
                         else if (exchange instanceof InOut &&
exchange.getStatus() == ExchangeStatus.DONE) {                                                               
                                 log.info("inside DONE block");
                                 // You can also add here your fault
auditing.
                                channel.send(exchange); 
                        }
                        //If the exhcange is with status ERROR
                        else if (exchange.getStatus() ==
ExchangeStatus.ERROR) { 
                                log.info("inside ERROR block"); 
                                channel.send(exchange); 
                        }
                        //In all other cases (which means not InOut
Exchange, you should throw error 
                        else throw new IllegalStateException();
}

If this doesn't work for you (then I prolly missed something so please send
me your assembly to further investigate.

Hope it helps.

-----
Ioannis Canellos
-- 
View this message in context: http://old.nabble.com/smx4-javax.transaction.InvalidTransactionException%3A-tp28287860p28325695.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: smx4 javax.transaction.InvalidTransactionException:

Posted by gnanda <gi...@phaseforward.com>.
I forgot to attach my java code in previous post. I am atatching it here

For convenience, I am putting my code snippet here 
	//Transaction txobj = tm.suspend();
				channel.sendSync(exchange);
				Fault fault = exchange.getFault();
				if(fault != null){
					log.info("fault occurred");
				}
				Exception error = exchange.getError();
				if(error != null){
					log.info("error occurred");
				}
				NormalizedMessage out = exchange.getMessage("out");
				if(out != null){
					log.info("out exists");
				}
				
			//tm.resume(txobj);
				log.info("channel send done");
			
			} else if (exchange.getStatus() == ExchangeStatus.DONE) {
				// if(good){
				log.info("inside DONE block");
				exchange.setStatus(ExchangeStatus.DONE);
				channel.send(exchange);
			} else if (exchange.getStatus() == ExchangeStatus.ERROR) {
				// else{
				log.info("inside ERROR block");
				// Exception ex = new Exception
				// ("ERROR:Fault occurred"+faultbody);
				Exception ex = new Exception("ERROR:Fault occurred");
				exchange.setError(ex);
				exchange.setStatus(ExchangeStatus.ERROR);
				channel.send(exchange);
			}



gnanda wrote:
> 
> I changed the code what I understood from your suggestion. I am still
> getting same Transactionexception as below. I am using sendSync here. The
> call is not coming back from sendSync , it is not executing the next line
> after sendSync() call. Since the call to external web service returns soap
> fault, I am expecting it withh return back and print "fault occurred"
> It is not returning from the sendSync call , instead it is raising
> "invalidTransactionException"
> 
> Please suggest
> 
> 2010-04-21 16:24:48,737 | 16:24:48,737 | ERROR | x-http-thread-14 |
> HttpComponent                    | icemix.common.AsyncBaseLifeCycle  480 |
> Error processing exchange
> org.apache.servicemix.jbi.runtime.impl.InOnlyImpl@1581385
> java.lang.Exception: Invalid status response: 500
> 	at
> org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:182)
> 	at org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:368)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:619)
> 2010-04-21 16:24:48,753 | 16:24:48,753 | WARN  | ix-eip-thread-14 |
> SimpleEndpoint                   | .common.endpoints.SimpleEndpoint   90 |
> SimpleEndpoint.fail called: 
> 2010-04-21 16:24:48,753 | 16:24:48,753 | ERROR | x-bean-thread-14 |
> BeanComponent                    | icemix.common.AsyncBaseLifeCycle  480 |
> Error processing exchange
> org.apache.servicemix.jbi.runtime.impl.InOutImpl@e59bd
> javax.jbi.messaging.MessagingException:
> javax.transaction.InvalidTransactionException: Specified transaction is
> already associated with another thread
> 	at
> org.apache.servicemix.common.EndpointDeliveryChannel.resumeTx(EndpointDeliveryChannel.java:137)
> 	at
> org.apache.servicemix.common.EndpointDeliveryChannel.sendSync(EndpointDeliveryChannel.java:118)
> 	at
> org.apache.servicemix.bean.BeanEndpoint$PojoChannel.sendSync(BeanEndpoint.java:638)
> 	at com.pf.eipconsumer.RouterBean.onMessageExchange(RouterBean.java:98)
> 	at
> org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:230)
> 	at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:217)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.transaction.InvalidTransactionException: Specified
> transaction is already associated with another thread
> 	at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.associate(TransactionManagerImpl.java:114)
> 	at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.resume(TransactionManagerImpl.java:183)
> 	at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at
> org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:64)
> 	at
> org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:78)
> 	at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> 	at
> org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
> 	at
> org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
> 	at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> 	at
> org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
> 	at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> 	at
> org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
> 	at
> org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
> 	at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> 	at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> 	at $Proxy24.resume(Unknown Source)
> 	at
> org.apache.servicemix.common.EndpointDeliveryChannel.resumeTx(EndpointDeliveryChannel.java:135)
> 	... 12 more
> 
> 
> 
> iocanel wrote:
>> 
>> Hi Granda,
>> 
>> before we get to the transactional part, I think that you have some
>> issues in your bean endpoint.
>> 
>> The bean endpoint has the "role" of transformer for your pipeline. That
>> means that it should handle InOut requests.
>> 
>> a) When you get an as ACTIVE exchange (The InOut with In message and no
>> OUT), you need to create the out message and send it to through the
>> delivery channel.
>> 
>> b) After doing so you will receive an exchange which will be either DONE
>> or ERROR. This exchange you will send again through the delivery channel
>> and it will reach your consumer.
>> 
>> You are doing part a correctly. However in part b you are resending the
>> original exchange instead of the response: 
>> 
>> 
>> 
>>>                 if(good){ 
>>>                                 log.info("inside DONE block"); 
>>>                                 exchange.setStatus(ExchangeStatus.DONE); 
>>>                                 channel.send(exchange); 
>>>                         } 
>>>                         //else if(exchange.getStatus() ==
>>> ExchangeStatus.ERROR){ 
>>>                 else{ 
>>>                                 log.info("inside ERROR block"); 
>>>                                 //Exception ex = new Exception
>>> ("ERROR:Fault occurred"+faultbody); 
>>>                                 Exception ex = new Exception
>>> ("ERROR:Fault occurred"); 
>>>                                 exchange.setError(ex); 
>>>                                
>>> exchange.setStatus(ExchangeStatus.ERROR); 
>>>                                 channel.send(exchange); 
>>>                         } 
>>> 
>> 
>> 
>> You need to implement this as indicated above. This is probably the
>> reason you have the error with the transaction.
>> 
>> 
>> 
> 
> 
http://old.nabble.com/file/p28323659/RouterBean.java RouterBean.java 
-- 
View this message in context: http://old.nabble.com/smx4-javax.transaction.InvalidTransactionException%3A-tp28287860p28323659.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: smx4 javax.transaction.InvalidTransactionException:

Posted by gnanda <gi...@phaseforward.com>.
I changed the code what I understood from your suggestion. I am still getting
same Transactionexception as below. I am using sendSync here. The call is
not coming back from sendSync , it is not executing the next line after
sendSync() call. Since the call to external web service returns soap fault,
I am expecting it withh return back and print "fault occurred"
It is not returning from the sendSync call , instead it is raising
"invalidTransactionException"

Please suggest

2010-04-21 16:24:48,737 | 16:24:48,737 | ERROR | x-http-thread-14 |
HttpComponent                    | icemix.common.AsyncBaseLifeCycle  480 |
Error processing exchange
org.apache.servicemix.jbi.runtime.impl.InOnlyImpl@1581385
java.lang.Exception: Invalid status response: 500
	at
org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:182)
	at org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:368)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
2010-04-21 16:24:48,753 | 16:24:48,753 | WARN  | ix-eip-thread-14 |
SimpleEndpoint                   | .common.endpoints.SimpleEndpoint   90 |
SimpleEndpoint.fail called: 
2010-04-21 16:24:48,753 | 16:24:48,753 | ERROR | x-bean-thread-14 |
BeanComponent                    | icemix.common.AsyncBaseLifeCycle  480 |
Error processing exchange
org.apache.servicemix.jbi.runtime.impl.InOutImpl@e59bd
javax.jbi.messaging.MessagingException:
javax.transaction.InvalidTransactionException: Specified transaction is
already associated with another thread
	at
org.apache.servicemix.common.EndpointDeliveryChannel.resumeTx(EndpointDeliveryChannel.java:137)
	at
org.apache.servicemix.common.EndpointDeliveryChannel.sendSync(EndpointDeliveryChannel.java:118)
	at
org.apache.servicemix.bean.BeanEndpoint$PojoChannel.sendSync(BeanEndpoint.java:638)
	at com.pf.eipconsumer.RouterBean.onMessageExchange(RouterBean.java:98)
	at
org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:230)
	at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:217)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: javax.transaction.InvalidTransactionException: Specified
transaction is already associated with another thread
	at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.associate(TransactionManagerImpl.java:114)
	at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.resume(TransactionManagerImpl.java:183)
	at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:64)
	at
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:78)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy24.resume(Unknown Source)
	at
org.apache.servicemix.common.EndpointDeliveryChannel.resumeTx(EndpointDeliveryChannel.java:135)
	... 12 more



iocanel wrote:
> 
> Hi Granda,
> 
> before we get to the transactional part, I think that you have some issues
> in your bean endpoint.
> 
> The bean endpoint has the "role" of transformer for your pipeline. That
> means that it should handle InOut requests.
> 
> a) When you get an as ACTIVE exchange (The InOut with In message and no
> OUT), you need to create the out message and send it to through the
> delivery channel.
> 
> b) After doing so you will receive an exchange which will be either DONE
> or ERROR. This exchange you will send again through the delivery channel
> and it will reach your consumer.
> 
> You are doing part a correctly. However in part b you are resending the
> original exchange instead of the response: 
> 
> 
> 
>>                 if(good){ 
>>                                 log.info("inside DONE block"); 
>>                                 exchange.setStatus(ExchangeStatus.DONE); 
>>                                 channel.send(exchange); 
>>                         } 
>>                         //else if(exchange.getStatus() ==
>> ExchangeStatus.ERROR){ 
>>                 else{ 
>>                                 log.info("inside ERROR block"); 
>>                                 //Exception ex = new Exception
>> ("ERROR:Fault occurred"+faultbody); 
>>                                 Exception ex = new Exception
>> ("ERROR:Fault occurred"); 
>>                                 exchange.setError(ex); 
>>                                 exchange.setStatus(ExchangeStatus.ERROR); 
>>                                 channel.send(exchange); 
>>                         } 
>> 
> 
> 
> You need to implement this as indicated above. This is probably the reason
> you have the error with the transaction.
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/smx4-javax.transaction.InvalidTransactionException%3A-tp28287860p28303367.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: smx4 javax.transaction.InvalidTransactionException:

Posted by iocanel <ca...@upstreamsystems.com>.
Hi Granda,

before we get to the transactional part, I think that you have some issues
in your bean endpoint.

The bean endpoint has the "role" of transformer for your pipeline. That
means that it should handle InOut requests.

a) When you get an as ACTIVE exchange (The InOut with In message and no
OUT), you need to create the out message and send it to through the delivery
channel.

b) After doing so you will receive an exchange which will be either DONE or
ERROR. This exchange you will send again through the delivery channel and it
will reach your consumer.

You are doing part a correctly. However in part b you are resending the
original exchange instead of the response: 



>                 if(good){ 
>                                 log.info("inside DONE block"); 
>                                 exchange.setStatus(ExchangeStatus.DONE); 
>                                 channel.send(exchange); 
>                         } 
>                         //else if(exchange.getStatus() ==
> ExchangeStatus.ERROR){ 
>                 else{ 
>                                 log.info("inside ERROR block"); 
>                                 //Exception ex = new Exception
> ("ERROR:Fault occurred"+faultbody); 
>                                 Exception ex = new Exception ("ERROR:Fault
> occurred"); 
>                                 exchange.setError(ex); 
>                                 exchange.setStatus(ExchangeStatus.ERROR); 
>                                 channel.send(exchange); 
>                         } 
> 


You need to implement this as indicated above. This is probably the reason
you have the error with the transaction.



-----
Ioannis Canellos
-- 
View this message in context: http://old.nabble.com/smx4-javax.transaction.InvalidTransactionException%3A-tp28287860p28287990.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.