You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Gabriela Gheorghe <ga...@disi.unitn.it> on 2009/05/12 20:36:46 UTC

issue with bean endpoint resolver

Hi, 

 

I have a problem with some of the ServiceMix 3.3 Beans examples that pertain
to static SM configuration. I followed the code there closely, and there is
something wrong with the bean resolving. Basically what happens is this :

 

the following call returns a null endpoint:

 

ServiceEndpoint endpoint =
client.getContext().resolveEndpointReference(epr);

 

My guess it's because the deployment or of the namespaces (but I did try to
pay attention), or there is a problem with putting MBeanServer="#jmxServer".
Could you please tell me where I am going wrong?

 

 

Here's the data on the problem:

 

The stack trace starts like this:

 

javax.jbi.messaging.MessagingException (Could not find route for
exchange.):at
org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker
.java:297)

      at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.j
ava:894)

      at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChann
elImpl.java:395)

      at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannel
Impl.java:431)

      at
org.apache.servicemix.client.DefaultServiceMixClient.send(DefaultServiceMixC
lient.java:148)

 

I have a POJO bean that is deployed on SM 3.3 by using this call and
annotation combination: 

 

@Endpoint(name="cheese", targetNamespace="urn:test", serviceName="bBean")

public class BlockerBean implements MessageExchangeListener {...}

 

 

I chose a static configuration deployment using this (simplified) content
for servicemix.xml:

 

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:sm="http://servicemix.apache.org/config/1.0"

         xmlns:bean="http://servicemix.apache.org/bean/1.0"

         xmlns:enfer="urn:test">

 

  <!-- the JBI container -->

  <sm:container id="jbi" 

                rootDir="./data/smx" 

                MBeanServer="#jmxServer"

                installationDirPath="./hotdeploy"

                        monitorDeploymentDirectory="false"

                monitorInterval="1"

                transactionManager="#transactionManager"

                createJmxConnector="false"

                depends-on="jndi">

 

      

      <sm:listeners>

            <bean id="enfr" class="enfer.listener.MyListener"/>

      </sm:listeners>

 

 

    <sm:activationSpecs>

<sm:activationSpec>

        <sm:component>

          <bean:component>

            <bean:endpoints>

              <bean:endpoint service="enfer:bBean" endpoint="cheese"
bean="#bBean"/>

            </bean:endpoints>

          </bean:component>

        </sm:component>

      </sm:activationSpec>

 

 

    </sm:activationSpecs>

      

  </sm:container>

 

  <bean id="bBean" class="enfer.helperbeans.BBean"/>

  

</beans>

 

 

Thank you very much!

 

 

Best,
Gabriela