You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Mats Norén <ma...@alma.nu> on 2006/09/21 15:28:20 UTC

Problem with JMSFlow and subscriptions.

When running a testcase from the config below I get an 
IllegalStateException stating that the ActiveMQSession is closed.

I had to goals with this config, first I want to use the JMSFlow to be 
able to cluster a pool of servicemix-instances. Secondly, I wanted to be 
able to subscribe to messages received on the JMSReceiver-component.

Everything worked fine until I added the subscription-nodes.

Is this a known problem or is it my configuration?


/Regards Mats

<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
	   xmlns:foo="http://skl.se/servicemix/">

   <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean" 
singleton="true">
     <property name="config" value="classpath:broker.xml"/>
   </bean>

   <!-- the JBI container -->
   <sm:container id="jbi" depends-on="broker" embedded="true"
   				flowName="jms?brokerURL=tcp://localhost:61626">
     <sm:activationSpecs>

       <sm:activationSpec componentName="myJmsSender" 
service="foo:myJmsSender">
         <sm:component><bean 
class="org.apache.servicemix.components.jms.JmsSenderComponent">
           <property name="template">
             <bean class="org.springframework.jms.core.JmsTemplate">
               <property name="connectionFactory">
                 <ref local="jmsFactory"/>
               </property>
               <property name="defaultDestinationName" 
value="test.org.apache.servicemix.example.1"/>
               <property name="pubSubDomain" value="true"/>
             </bean>
           </property>
         </bean></sm:component>
       </sm:activationSpec>

       <sm:activationSpec componentName="myJmsReceiver" 
service="foo:myJmsReceiver" destinationService="foo:receiver">
         <sm:component><bean 
class="org.apache.servicemix.components.jms.JmsReceiverComponent">
           <property name="template">
             <bean class="org.springframework.jms.core.JmsTemplate">
               <property name="connectionFactory">
                 <ref local="jmsFactory"/>
               </property>
               <property name="defaultDestinationName" 
value="test.org.apache.servicemix.example.1"/>
               <property name="pubSubDomain" value="true"/>
             </bean>
           </property>
         </bean></sm:component>
       </sm:activationSpec>

       <sm:activationSpec componentName="receiver" service="foo:receiver">
         <sm:component><bean 
class="org.apache.servicemix.tck.ReceiverComponent"/></sm:component>
       </sm:activationSpec>


       <!-- just to test that we are sending messages, lets trace the 
messages we receive -->
       <sm:activationSpec componentName="jmsTrace" 
service="foo:jmsTrace" failIfNoDestinationEndpoint="false">
         <sm:component><bean 
class="org.apache.servicemix.components.jms.JmsReceiverComponent">
           <property name="template">
             <bean class="org.springframework.jms.core.JmsTemplate">
               <property name="connectionFactory">
                 <ref local="jmsFactory"/>
               </property>
               <property name="defaultDestinationName" 
value="test.org.apache.servicemix.example.1"/>
               <property name="pubSubDomain" value="true"/>
             </bean>
           </property>
         </bean></sm:component>
       </sm:activationSpec>

       <!--
       <sm:activationSpec componentName="jmsTrace" service="foo:trace">
         <sm:component><bean 
class="org.apache.servicemix.components.util.TraceComponent"/></sm:component>
       </sm:activationSpec>
       -->

       <sm:activationSpec componentName="trace" service="foo:trace">
         <sm:component><bean 
class="org.apache.servicemix.components.groovy.GroovyComponent">
           <property name="disableOutput" value="true"/>
           <property name="scriptText">
             <value>
               <![CDATA[
log.info "VIA JMS $inMessage with body: $inMessage.bodyText"
               ]]>
             </value>
           </property>
         </bean></sm:component>
             <sm:subscriptions>
           <sm:subscriptionSpec service="foo:jmsTrace" />
         </sm:subscriptions>
       </sm:activationSpec>
     </sm:activationSpecs>
   </sm:container>

   <bean id="client" 
class="org.apache.servicemix.client.DefaultServiceMixClient">
     <constructor-arg ref="jbi"/>
   </bean>

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

</beans>





2006-09-21 15:00:06,684 [Thread-6       ] DEBUG JMSFlow 
        - Called Flow send
2006-09-21 15:00:06,685 [Thread-6       ] ERROR JMSFlow 
        - Failed to send exchange: InOnly[
   id: ID:sheriff-33494-1158843602191-7:0
   status: Done
   role: consumer
   service: {http://skl.se/servicemix/}receiver
   endpoint: receiver
   in: <?xml version="1.0" encoding="UTF-8"?><person>
   <name>James</name>
   <email>james@nowhere.com</email>
   <accountant>
     <email>foo@bar.com</email>
   </accountant>
   <attachments>example.xml</attachments>
</person>
] internal JMS Network
javax.jms.IllegalStateException: The Session is closed
	at 
org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:577)
	at 
org.apache.activemq.ActiveMQSession.createQueue(ActiveMQSession.java:932)
	at 
org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doRouting(JMSFlow.java:499)
	at org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doSend(JMSFlow.java:460)
	at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
	at 
org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
	at 
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
	at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
	at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
	at 
org.apache.servicemix.components.util.PojoSupport.done(PojoSupport.java:224)
	at 
org.apache.servicemix.tck.ReceiverComponent.onMessageExchange(ReceiverComponent.java:50)
	at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
	at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
	at 
org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.access$301(JMSFlow.java:73)
	at org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow$5.run(JMSFlow.java:534)
	at 
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown 
Source)
	at java.lang.Thread.run(Thread.java:595)
2006-09-21 15:00:06,694 [Thread-6       ] DEBUG DeliveryChannelImpl 
        - Exception processing: ID:sheriff-33494-1158843602191-7:0 in 
DeliveryChannel{receiver}
2006-09-21 15:00:06,694 [Thread-6       ] ERROR JMSFlow 
        - Caught an exception routing ExchangePacket:
javax.jbi.messaging.MessagingException: javax.jms.IllegalStateException: 
The Session is closed
	at 
org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doRouting(JMSFlow.java:504)
	at org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doSend(JMSFlow.java:460)
	at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
	at 
org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
	at 
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
	at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
	at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
	at 
org.apache.servicemix.components.util.PojoSupport.done(PojoSupport.java:224)
	at 
org.apache.servicemix.tck.ReceiverComponent.onMessageExchange(ReceiverComponent.java:50)
	at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
	at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
	at 
org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.access$301(JMSFlow.java:73)
	at org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow$5.run(JMSFlow.java:534)
	at 
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown 
Source)
	at java.lang.Thread.run(Thread.java:595)
Caused by: javax.jms.IllegalStateException: The Session is closed
	at 
org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:577)
	at 
org.apache.activemq.ActiveMQSession.createQueue(ActiveMQSession.java:932)
	at 
org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doRouting(JMSFlow.java:499)
	... 15 more

Re: Problem with JMSFlow and subscriptions.

Posted by Mats Norén <ma...@alma.nu>.
Guillaume Nodet wrote:
> The exception seems weird as the session is only
> closed when JMS flow is stopped.
> Does this happen in a junit test case ?
> If yes, it may be because your test case shut down the
> jbi container before all exchanges are processed.

Ok, that could explain it.

I'm extending TestSupport.
I've just noticed that the exception doesn't occur every time I run it 
so my guess is that you're right about the testcase closing the container.

> 
> On 9/21/06, Mats Norén <ma...@alma.nu> wrote:
> 
>> When running a testcase from the config below I get an
>> IllegalStateException stating that the ActiveMQSession is closed.
>>
>> I had to goals with this config, first I want to use the JMSFlow to be
>> able to cluster a pool of servicemix-instances. Secondly, I wanted to be
>> able to subscribe to messages received on the JMSReceiver-component.
>>
>> Everything worked fine until I added the subscription-nodes.
>>
>> Is this a known problem or is it my configuration?
>>
>>
>> /Regards Mats
>>
>> <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
>>            xmlns:foo="http://skl.se/servicemix/">
>>
>>    <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean"
>> singleton="true">
>>      <property name="config" value="classpath:broker.xml"/>
>>    </bean>
>>
>>    <!-- the JBI container -->
>>    <sm:container id="jbi" depends-on="broker" embedded="true"
>>                                 
>> flowName="jms?brokerURL=tcp://localhost:61626">
>>      <sm:activationSpecs>
>>
>>        <sm:activationSpec componentName="myJmsSender"
>> service="foo:myJmsSender">
>>          <sm:component><bean
>> class="org.apache.servicemix.components.jms.JmsSenderComponent">
>>            <property name="template">
>>              <bean class="org.springframework.jms.core.JmsTemplate">
>>                <property name="connectionFactory">
>>                  <ref local="jmsFactory"/>
>>                </property>
>>                <property name="defaultDestinationName"
>> value="test.org.apache.servicemix.example.1"/>
>>                <property name="pubSubDomain" value="true"/>
>>              </bean>
>>            </property>
>>          </bean></sm:component>
>>        </sm:activationSpec>
>>
>>        <sm:activationSpec componentName="myJmsReceiver"
>> service="foo:myJmsReceiver" destinationService="foo:receiver">
>>          <sm:component><bean
>> class="org.apache.servicemix.components.jms.JmsReceiverComponent">
>>            <property name="template">
>>              <bean class="org.springframework.jms.core.JmsTemplate">
>>                <property name="connectionFactory">
>>                  <ref local="jmsFactory"/>
>>                </property>
>>                <property name="defaultDestinationName"
>> value="test.org.apache.servicemix.example.1"/>
>>                <property name="pubSubDomain" value="true"/>
>>              </bean>
>>            </property>
>>          </bean></sm:component>
>>        </sm:activationSpec>
>>
>>        <sm:activationSpec componentName="receiver" 
>> service="foo:receiver">
>>          <sm:component><bean
>> class="org.apache.servicemix.tck.ReceiverComponent"/></sm:component>
>>        </sm:activationSpec>
>>
>>
>>        <!-- just to test that we are sending messages, lets trace the
>> messages we receive -->
>>        <sm:activationSpec componentName="jmsTrace"
>> service="foo:jmsTrace" failIfNoDestinationEndpoint="false">
>>          <sm:component><bean
>> class="org.apache.servicemix.components.jms.JmsReceiverComponent">
>>            <property name="template">
>>              <bean class="org.springframework.jms.core.JmsTemplate">
>>                <property name="connectionFactory">
>>                  <ref local="jmsFactory"/>
>>                </property>
>>                <property name="defaultDestinationName"
>> value="test.org.apache.servicemix.example.1"/>
>>                <property name="pubSubDomain" value="true"/>
>>              </bean>
>>            </property>
>>          </bean></sm:component>
>>        </sm:activationSpec>
>>
>>        <!--
>>        <sm:activationSpec componentName="jmsTrace" service="foo:trace">
>>          <sm:component><bean
>> class="org.apache.servicemix.components.util.TraceComponent"/></sm:component> 
>>
>>        </sm:activationSpec>
>>        -->
>>
>>        <sm:activationSpec componentName="trace" service="foo:trace">
>>          <sm:component><bean
>> class="org.apache.servicemix.components.groovy.GroovyComponent">
>>            <property name="disableOutput" value="true"/>
>>            <property name="scriptText">
>>              <value>
>>                <![CDATA[
>> log.info "VIA JMS $inMessage with body: $inMessage.bodyText"
>>                ]]>
>>              </value>
>>            </property>
>>          </bean></sm:component>
>>              <sm:subscriptions>
>>            <sm:subscriptionSpec service="foo:jmsTrace" />
>>          </sm:subscriptions>
>>        </sm:activationSpec>
>>      </sm:activationSpecs>
>>    </sm:container>
>>
>>    <bean id="client"
>> class="org.apache.servicemix.client.DefaultServiceMixClient">
>>      <constructor-arg ref="jbi"/>
>>    </bean>
>>
>>    <bean id="jmsFactory"
>> class="org.apache.activemq.pool.PooledConnectionFactory">
>>      <property name="connectionFactory">
>>        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>>          <property name="brokerURL" value="tcp://localhost:61626" />
>>        </bean>
>>      </property>
>>    </bean>
>>
>> </beans>
>>
>>
>>
>>
>>
>> 2006-09-21 15:00:06,684 [Thread-6       ] DEBUG JMSFlow
>>         - Called Flow send
>> 2006-09-21 15:00:06,685 [Thread-6       ] ERROR JMSFlow
>>         - Failed to send exchange: InOnly[
>>    id: ID:sheriff-33494-1158843602191-7:0
>>    status: Done
>>    role: consumer
>>    service: {http://skl.se/servicemix/}receiver
>>    endpoint: receiver
>>    in: <?xml version="1.0" encoding="UTF-8"?><person>
>>    <name>James</name>
>>    <email>james@nowhere.com</email>
>>    <accountant>
>>      <email>foo@bar.com</email>
>>    </accountant>
>>    <attachments>example.xml</attachments>
>> </person>
>> ] internal JMS Network
>> javax.jms.IllegalStateException: The Session is closed
>>         at
>> org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:577)
>>         at
>> org.apache.activemq.ActiveMQSession.createQueue(ActiveMQSession.java:932)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doRouting(JMSFlow.java:499) 
>>
>>         at 
>> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doSend(JMSFlow.java:460)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121) 
>>
>>         at
>> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298) 
>>
>>         at
>> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793) 
>>
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375) 
>>
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411) 
>>
>>         at
>> org.apache.servicemix.components.util.PojoSupport.done(PojoSupport.java:224) 
>>
>>         at
>> org.apache.servicemix.tck.ReceiverComponent.onMessageExchange(ReceiverComponent.java:50) 
>>
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624) 
>>
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169) 
>>
>>         at
>> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.access$301(JMSFlow.java:73) 
>>
>>         at 
>> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow$5.run(JMSFlow.java:534)
>>         at
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291) 
>>
>>         at 
>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> Source)
>>         at java.lang.Thread.run(Thread.java:595)
>> 2006-09-21 15:00:06,694 [Thread-6       ] DEBUG DeliveryChannelImpl
>>         - Exception processing: ID:sheriff-33494-1158843602191-7:0 in
>> DeliveryChannel{receiver}
>> 2006-09-21 15:00:06,694 [Thread-6       ] ERROR JMSFlow
>>         - Caught an exception routing ExchangePacket:
>> javax.jbi.messaging.MessagingException: javax.jms.IllegalStateException:
>> The Session is closed
>>         at
>> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doRouting(JMSFlow.java:504) 
>>
>>         at 
>> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doSend(JMSFlow.java:460)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121) 
>>
>>         at
>> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298) 
>>
>>         at
>> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793) 
>>
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375) 
>>
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411) 
>>
>>         at
>> org.apache.servicemix.components.util.PojoSupport.done(PojoSupport.java:224) 
>>
>>         at
>> org.apache.servicemix.tck.ReceiverComponent.onMessageExchange(ReceiverComponent.java:50) 
>>
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624) 
>>
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169) 
>>
>>         at
>> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.access$301(JMSFlow.java:73) 
>>
>>         at 
>> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow$5.run(JMSFlow.java:534)
>>         at
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291) 
>>
>>         at 
>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> Source)
>>         at java.lang.Thread.run(Thread.java:595)
>> Caused by: javax.jms.IllegalStateException: The Session is closed
>>         at
>> org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:577)
>>         at
>> org.apache.activemq.ActiveMQSession.createQueue(ActiveMQSession.java:932)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doRouting(JMSFlow.java:499) 
>>
>>         ... 15 more
>>
> 
> 


Re: Problem with JMSFlow and subscriptions.

Posted by Guillaume Nodet <gn...@gmail.com>.
The exception seems weird as the session is only
closed when JMS flow is stopped.
Does this happen in a junit test case ?
If yes, it may be because your test case shut down the
jbi container before all exchanges are processed.

On 9/21/06, Mats Norén <ma...@alma.nu> wrote:
> When running a testcase from the config below I get an
> IllegalStateException stating that the ActiveMQSession is closed.
>
> I had to goals with this config, first I want to use the JMSFlow to be
> able to cluster a pool of servicemix-instances. Secondly, I wanted to be
> able to subscribe to messages received on the JMSReceiver-component.
>
> Everything worked fine until I added the subscription-nodes.
>
> Is this a known problem or is it my configuration?
>
>
> /Regards Mats
>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
>            xmlns:foo="http://skl.se/servicemix/">
>
>    <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean"
> singleton="true">
>      <property name="config" value="classpath:broker.xml"/>
>    </bean>
>
>    <!-- the JBI container -->
>    <sm:container id="jbi" depends-on="broker" embedded="true"
>                                 flowName="jms?brokerURL=tcp://localhost:61626">
>      <sm:activationSpecs>
>
>        <sm:activationSpec componentName="myJmsSender"
> service="foo:myJmsSender">
>          <sm:component><bean
> class="org.apache.servicemix.components.jms.JmsSenderComponent">
>            <property name="template">
>              <bean class="org.springframework.jms.core.JmsTemplate">
>                <property name="connectionFactory">
>                  <ref local="jmsFactory"/>
>                </property>
>                <property name="defaultDestinationName"
> value="test.org.apache.servicemix.example.1"/>
>                <property name="pubSubDomain" value="true"/>
>              </bean>
>            </property>
>          </bean></sm:component>
>        </sm:activationSpec>
>
>        <sm:activationSpec componentName="myJmsReceiver"
> service="foo:myJmsReceiver" destinationService="foo:receiver">
>          <sm:component><bean
> class="org.apache.servicemix.components.jms.JmsReceiverComponent">
>            <property name="template">
>              <bean class="org.springframework.jms.core.JmsTemplate">
>                <property name="connectionFactory">
>                  <ref local="jmsFactory"/>
>                </property>
>                <property name="defaultDestinationName"
> value="test.org.apache.servicemix.example.1"/>
>                <property name="pubSubDomain" value="true"/>
>              </bean>
>            </property>
>          </bean></sm:component>
>        </sm:activationSpec>
>
>        <sm:activationSpec componentName="receiver" service="foo:receiver">
>          <sm:component><bean
> class="org.apache.servicemix.tck.ReceiverComponent"/></sm:component>
>        </sm:activationSpec>
>
>
>        <!-- just to test that we are sending messages, lets trace the
> messages we receive -->
>        <sm:activationSpec componentName="jmsTrace"
> service="foo:jmsTrace" failIfNoDestinationEndpoint="false">
>          <sm:component><bean
> class="org.apache.servicemix.components.jms.JmsReceiverComponent">
>            <property name="template">
>              <bean class="org.springframework.jms.core.JmsTemplate">
>                <property name="connectionFactory">
>                  <ref local="jmsFactory"/>
>                </property>
>                <property name="defaultDestinationName"
> value="test.org.apache.servicemix.example.1"/>
>                <property name="pubSubDomain" value="true"/>
>              </bean>
>            </property>
>          </bean></sm:component>
>        </sm:activationSpec>
>
>        <!--
>        <sm:activationSpec componentName="jmsTrace" service="foo:trace">
>          <sm:component><bean
> class="org.apache.servicemix.components.util.TraceComponent"/></sm:component>
>        </sm:activationSpec>
>        -->
>
>        <sm:activationSpec componentName="trace" service="foo:trace">
>          <sm:component><bean
> class="org.apache.servicemix.components.groovy.GroovyComponent">
>            <property name="disableOutput" value="true"/>
>            <property name="scriptText">
>              <value>
>                <![CDATA[
> log.info "VIA JMS $inMessage with body: $inMessage.bodyText"
>                ]]>
>              </value>
>            </property>
>          </bean></sm:component>
>              <sm:subscriptions>
>            <sm:subscriptionSpec service="foo:jmsTrace" />
>          </sm:subscriptions>
>        </sm:activationSpec>
>      </sm:activationSpecs>
>    </sm:container>
>
>    <bean id="client"
> class="org.apache.servicemix.client.DefaultServiceMixClient">
>      <constructor-arg ref="jbi"/>
>    </bean>
>
>    <bean id="jmsFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
>      <property name="connectionFactory">
>        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>          <property name="brokerURL" value="tcp://localhost:61626" />
>        </bean>
>      </property>
>    </bean>
>
> </beans>
>
>
>
>
>
> 2006-09-21 15:00:06,684 [Thread-6       ] DEBUG JMSFlow
>         - Called Flow send
> 2006-09-21 15:00:06,685 [Thread-6       ] ERROR JMSFlow
>         - Failed to send exchange: InOnly[
>    id: ID:sheriff-33494-1158843602191-7:0
>    status: Done
>    role: consumer
>    service: {http://skl.se/servicemix/}receiver
>    endpoint: receiver
>    in: <?xml version="1.0" encoding="UTF-8"?><person>
>    <name>James</name>
>    <email>james@nowhere.com</email>
>    <accountant>
>      <email>foo@bar.com</email>
>    </accountant>
>    <attachments>example.xml</attachments>
> </person>
> ] internal JMS Network
> javax.jms.IllegalStateException: The Session is closed
>         at
> org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:577)
>         at
> org.apache.activemq.ActiveMQSession.createQueue(ActiveMQSession.java:932)
>         at
> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doRouting(JMSFlow.java:499)
>         at org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doSend(JMSFlow.java:460)
>         at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
>         at
> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
>         at
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
>         at
> org.apache.servicemix.components.util.PojoSupport.done(PojoSupport.java:224)
>         at
> org.apache.servicemix.tck.ReceiverComponent.onMessageExchange(ReceiverComponent.java:50)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>         at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
>         at
> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.access$301(JMSFlow.java:73)
>         at org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow$5.run(JMSFlow.java:534)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Thread.java:595)
> 2006-09-21 15:00:06,694 [Thread-6       ] DEBUG DeliveryChannelImpl
>         - Exception processing: ID:sheriff-33494-1158843602191-7:0 in
> DeliveryChannel{receiver}
> 2006-09-21 15:00:06,694 [Thread-6       ] ERROR JMSFlow
>         - Caught an exception routing ExchangePacket:
> javax.jbi.messaging.MessagingException: javax.jms.IllegalStateException:
> The Session is closed
>         at
> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doRouting(JMSFlow.java:504)
>         at org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doSend(JMSFlow.java:460)
>         at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
>         at
> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
>         at
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
>         at
> org.apache.servicemix.components.util.PojoSupport.done(PojoSupport.java:224)
>         at
> org.apache.servicemix.tck.ReceiverComponent.onMessageExchange(ReceiverComponent.java:50)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>         at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
>         at
> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.access$301(JMSFlow.java:73)
>         at org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow$5.run(JMSFlow.java:534)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.jms.IllegalStateException: The Session is closed
>         at
> org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:577)
>         at
> org.apache.activemq.ActiveMQSession.createQueue(ActiveMQSession.java:932)
>         at
> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.doRouting(JMSFlow.java:499)
>         ... 15 more
>


-- 
Cheers,
Guillaume Nodet