Thanks for your help but your use case didn't work anymore on my computer.

So I have downloaded the latest release version of SM to try and that's work well !

So I apologize for my mistake....

But, I have the exception the first time the timer message is sent... I assume it's because the destination component is not yet activated.

Cheers,

Pierre NOTEL
Bull R&D

//*******************************************
Guillaume Nodet wrote:
No idea why your configuration does not work.
I see that you send the quartz message to a drools router, so maybe
the problem is on this component...

Anyway i have succesfully run you use case with the following one:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0";     xmlns:jms="
http://servicemix.apache.org/jms/1.0";     xmlns:amq="
http://activemq.org/config/1.0";     xmlns:foo="
http://servicemix.apache.org/demo/";>
 <sm:container id="jbi" embedded="true" depends-on="broker">
   <sm:activationSpecs>
     <!-- Quartz timer -->
     <sm:activationSpec componentName="myTimer" service="foo:myTimer"
destinationService="foo:MyProvider">
       <sm:component>
         <bean  class="
org.apache.servicemix.components.quartz.QuartzComponent">
           <property name="triggers">
             <map>
               <entry>
                 <key>
                   <bean class="org.quartz.SimpleTrigger">
                     <property name="repeatInterval" value="5000" />
                     <property name="repeatCount" value="-1" />
                   </bean>
                 </key>
                 <bean class="org.quartz.JobDetail">
                   <property name="name"  value="job name" />
                   <property name="group"  value="job group" />
                   <property name="description"  value="" />
                 </bean>
               </entry>
             </map>
           </property>
         </bean>
       </sm:component>
     </sm:activationSpec>
     <!-- JMS SENDER - PROVIDER -->
     <sm:activationSpec componentName="MyProvider"
service="foo:MyProvider">
       <sm:component>
         <jms:component>
           <jms:endpoints>
             <jms:endpoint service="foo:MyProvider" endpoint="MyProvider"
role="provider"
defaultMep="http://www.w3.org/2004/08/wsdl/in-opt-out";
destinationStyle="topic"  jmsProviderDestinationName="
demo.org.servicemix.result"  connectionFactory="#connectionFactory"
defaultOperation="" />
           </jms:endpoints>
         </jms:component>
       </sm:component>
     </sm:activationSpec>
     <!-- JMS POLLER - CONSUMER -->
     <sm:activationSpec componentName="MyConsumer"
service="foo:MyConsumer">
       <sm:component>
         <jms:component>
           <jms:endpoints>
             <jms:endpoint
service="foo:MyConsumer"
endpoint="MyConsumer"
targetService="foo:myScreenOutput"
role="consumer"  defaultMep="http://www.w3.org/2004/08/wsdl/in-opt-out";
destinationStyle="topic"  jmsProviderDestinationName="
demo.org.servicemix.result"  connectionFactory="#connectionFactory"
defaultOperation="" />
           </jms:endpoints>
         </jms:component>
       </sm:component>
     </sm:activationSpec>
     <!-- Screen output -->
     <sm:activationSpec componentName="myScreenOutput"
service="foo:myScreenOutput">
       <sm:component>
         <bean class="
org.apache.servicemix.components.util.StreamWriterComponent" />
       </sm:component>
     </sm:activationSpec>
   </sm:activationSpecs>
 </sm:container>
 <!-- AMQ broker -->
 <amq:broker id="broker" persistent="false">
   <amq:transportConnectors>
     <amq:transportConnector uri="tcp://localhost:61616" />
   </amq:transportConnectors>
 </amq:broker>
 <!-- AMQ connection factory -->
 <bean id="connectionFactory" class="
org.apache.activemq.ActiveMQConnectionFactory">
   <property name="brokerURL" value="tcp://localhost:61616" />
 </bean>
</beans>


On 8/16/06, Pierre NOTEL <[EMAIL PROTECTED]> wrote:

Thanks for your answer.

You're right to jms role (consumer/provider). I change it but there is
always a problem.

If I replace the timer by a mail poller, all works well.

My problem comes from the timer component : I receive the following error
:

ERROR - JmsSpringComponent             - Error processing exchange
[EMAIL PROTECTED]
java.lang.NullPointerException
        at java.io.Writer.write(Writer.java:126)
        at
com.ctc.wstx.sw.BaseNsStreamWriter.doWriteStartTag(BaseNsStreamWriter.java
:493)
        at
com.ctc.wstx.sw.BaseNsStreamWriter.writeStartElement(
BaseNsStreamWriter.java:267)
        at
org.apache.servicemix.jbi.jaxp.XMLStreamHelper.writeStartElement(
XMLStreamHelper.java:109)
        at
org.apache.servicemix.jbi.jaxp.XMLStreamHelper.copy(XMLStreamHelper.java
:58)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeContents(
SoapWriter.java:198)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(
SoapWriter.java:113)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:82)
        at

org.apache.servicemix.jms.multiplexing.MultiplexingProviderProcessor.process
(MultiplexingProviderProcessor.java:177)
        at
org.apache.servicemix.common.BaseLifeCycle.processExchange(
BaseLifeCycle.java:390)
        at
org.apache.servicemix.common.BaseLifeCycle$2.run(BaseLifeCycle.java:247)
        at

edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask
(ThreadPoolExecutor.java:650)
        at

edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

My new xml config file is above.

Do you have an idea of the error origin ?

Pierre NOTEL
Bull R&D

//*******************************************************
<!-- JBI container -->
<sm:container spring:id="jbi" rootDir="./wdir" useMBeanServer="true"
        createMBeanServer="true" installationDirPath="./install"
        monitorInstallationDirectory="true" dumpStats="true"
        statsInterval="10" transactionManager="#transactionManager">
<sm:activationSpecs>

    <!-- ####################### My input timer ########################
-->
    <sm:activationSpec componentName="myTimer" service="foo:myTimer"
      destinationService="drools:myRouter">
        <sm:component>
       <bean  xmlns="http://xbean.org/schemas/spring/1.0";

class="org.apache.servicemix.components.quartz.QuartzComponent">
             <property name="triggers">
                <map>
                    <entry>
                        <key>
                            <bean class="org.quartz.SimpleTrigger">
                                   <property name="repeatInterval"
value="5000" />
                                   <property name="repeatCount"
value="-1" />
                            </bean>
                        </key>
                        <bean class="org.quartz.JobDetail">
                                   <property name="name"  value="job
name" />
                                   <property name="group"  value="job
group" />
<property name="description" value=""
/>
                        </bean>
                    </entry>
                </map>
             </property>
       </bean>
      </sm:component>
    </sm:activationSpec>

    <!-- JMS SENDER - PROVIDER -->
            <sm:activationSpec componentName="MyProvider"
service="foo:MyProvider">
                <sm:component>
                    <jms:component>
                        <jms:endpoints>
                            <jms:endpoint service="foo:MyProvider"
                                endpoint="MyProvider"
                                role="provider"

defaultMep="http://www.w3.org/2004/08/wsdl/in-opt-out";
                                destinationStyle="topic"

jmsProviderDestinationName="demo.org.servicemix.result"

jndiConnectionFactoryName="connectionFactory"
                                defaultOperation="" />
                        </jms:endpoints>
                    </jms:component>
                </sm:component>
            </sm:activationSpec>

            <!-- JMS POLLER - CONSUMER -->
            <sm:activationSpec componentName="MyConsumer"
service="foo:MyConsumer">
                <sm:component>
                    <jms:component>
                        <jms:endpoints>
                            <jms:endpoint service="foo:MyConsumer"
                                endpoint="MyConsumer"
                                targetService="foo:myScreenOutput"
                                role="consumer"

defaultMep="http://www.w3.org/2004/08/wsdl/in-opt-out";
                                destinationStyle="topic"

jmsProviderDestinationName="demo.org.servicemix.result"

jndiConnectionFactoryName="connectionFactory"
                                defaultOperation="" />
                        </jms:endpoints>
                    </jms:component>
                </sm:component>
            </sm:activationSpec>

    <!-- ####################### myScreenOutput ########################
-->
    <sm:activationSpec componentName="myScreenOutput"
service="foo:myScreenOutput">
        <sm:component>
       <bean  xmlns="http://xbean.org/schemas/spring/1.0";

class="org.apache.servicemix.components.util.StreamWriterComponent">
       </bean>
      </sm:component>
    </sm:activationSpec>

</sm:activationSpecs>
</sm:container>
</beans>

Reply via email to