Thus,
I've included the following XML snippet code in instance2 and instance3
respectively

INSTANCE2:

<sm:activationSpec>
  <sm:component>
   <bean class="org.apache.servicemix.wsn.spring.WSNSpringComponent">
    <property name="connectionFactory" ref="connectionFactory"/>
   </bean>
  </sm:component>
</sm:activationSpec>


<sm:activationSpec service="test:publisher" endpoint="endpoint">
  <sm:component>
   <bean class="org.apache.servicemix.wsn.spring.PublisherComponent">
    <property name="topic" value="receiveTopic"/>
   </bean>
  </sm:component>
</sm:activationSpec>

  

INSTANCE3

<sm:activationSpec>   
    <sm:component>
     <bean class="org.apache.servicemix.wsn.spring.WSNSpringComponent">
      <property name="requests">
       <list>
        <bean class="org.apache.servicemix.wsn.spring.SubscribeFactoryBean">
            <property name="consumer"
value="http://servicemix.apache.org/demo/trace/endpoint"/>
            <property name="topic" value="receiveTopic"/>
        </bean>
       </list>
      </property>
      <property name="connectionFactory" ref="connectionFactory"/>
     </bean>
  
    </sm:component>
   </sm:activationSpec> 

   <sm:activationSpec componentName="trace" service="my:trace"
endpoint="endpoint">
     <sm:component>
      <bean class="org.apache.servicemix.components.util.TraceComponent" />
     </sm:component>
    </sm:activationSpec>

But the same following error occurs:

Caught: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'jbi' defined in file
[/home/martina/SERVICEMIX/apache-servicemix-3.1.2/examples/ws-notification/instance2/servicemix2.xml]:
Invocation of init method failed; nested exception is
javax.jbi.JBIException: Error calling init
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'jbi' defined in file
[/home/martina/SERVICEMIX/apache-servicemix-3.1.2/examples/ws-notification/instance2/servicemix2.xml]:
Invocation of init method failed; nested exception is
javax.jbi.JBIException: Error calling init
Caused by: javax.jbi.JBIException: Error calling init
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:149)
        at
org.apache.servicemix.jbi.framework.ComponentMBeanImpl.init(ComponentMBeanImpl.java:201)
        at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:1114)
        at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:1074)
        at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:1031)
        at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:979)
        at
org.apache.servicemix.jbi.container.SpringJBIContainer.afterPropertiesSet(SpringJBIContainer.java:65)
........

I do wrong something?
  :( 
Thanks
Martina 




martymusk wrote:
> 
> Hy Bruce,
> I've tried to do this, but it don't work exactly. 
> Can you post me an example?
> In particular, how instance2 publish "copia" and how instance3 receive
> "copia"?
> 
> Thank you for availability!!!
> 
> Martina
> 
> bsnyder wrote:
>> 
>> On Dec 7, 2007 7:22 AM, martymusk <[EMAIL PROTECTED]> wrote:
>>>
>>> Thanks Bruce,
>>> it's clear what you mean! But I want instance2 publish copy of received
>>> message, without trigger of QuartzComponent.
>>> In particular, the snippet code concern to message's copy is the
>>> following:
>>>
>>>              log.info("Copia del messaggio...");
>>>                 try{
>>>               NormalizedMessage copia =
>>> (NormalizedMessage)message.clone();
>>>                 log.info("Il messaggio รจ stato copiato!");
>>>                 log.info("Body is: " +
>>> sourceTransformer.toString(copia.getContent()));
>>>                 }catch (CloneNotSupportedException e ){
>>>                 e.printStackTrace();
>>>               }
>>>                  catch(TransformerException e){
>>>                   e.printStackTrace();
>>>                  }
>>>
>>> where method clone() is implemented in NormalizedMessageImpl and
>>> NormalizedMessage interface extends Cloneable.
>> 
>> I'm not sure what you mean by showing the code snippet above.
>> 
>>> Now, instance2 has to publish this "copia" to "receiveTopic". I've to
>>> employ
>>> Quartz Component?
>> 
>> No, the Quartz component is not required to do this. If you're
>> sticking with the lightweight components (the one's used in the
>> ws-notification example) then you could use the publisher to send the
>> message to the receiveTopic exactly the way that way it is done in the
>> instance3/servicemix3.xml.
>> 
>> Bruce
>> -- 
>> perl -e 'print
>> unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
>> );'
>> 
>> Apache ActiveMQ - http://activemq.org/
>> Apache Camel - http://activemq.org/camel/
>> Apache ServiceMix - http://servicemix.org/
>> Apache Geronimo - http://geronimo.apache.org/
>> 
>> Blog: http://bruceblog.org/
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Servicemix-in-eclipse-tf4955962s12049.html#a14216434
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to