On 8/23/07, dellekappa <[EMAIL PROTECTED]> wrote:
>
> Hi everybody,
> I had correctly configured servicemix-camel component inside servicemix, and
> I had created a new servicemix-camel-serviceunit as well, based on the
> corrensonding archetype.
> The problem is that if I configure my routes inside camel-context.xml it
> works fine, but if I try java based routing...nothing happens. It seems that
> my RouteBuilder class won't be read.
> I put my RouteBuilder class inside a package named codin.sismed:
>
> -------------------------------
> package codin.sismed;
>
> import org.apache.camel.Exchange;
> import org.apache.camel.Processor;
> import org.apache.camel.builder.RouteBuilder;
> import org.apache.camel.spring.Main;
>
> public class SismedRouter extends RouteBuilder {
>
>         public static void main(String[] args) {
>         new Main().run(args);
>     }
>
>     public void configure() {
>         System.out.println("Configuring routes");
>
> from("jbi:service:http://sismed/services/Anagrafica/AnagraficaJBI";).to("jbi:service:http://sismed/services/Anagrafica/Anagrafica_bb1";);
>         System.out.println("Routes configured");
>     }
> }
> -----------------------------
>
> and this is how appear my camel-context.xml
>
> -----------------------------
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!-- START SNIPPET: camel -->
> <beans xmlns="http://www.springframework.org/schema/beans";
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>        xsi:schemaLocation="http://www.springframework.org/schema/beans
>         http://www.springframework.org/schema/beans/spring-beans.xsd
>         http://activemq.apache.org/camel/schema/spring
>         http://activemq.apache.org/camel/schema/spring/camel-spring.xsd";>
>
>   <camelContext id="camel"
> xmlns="http://activemq.apache.org/camel/schema/spring";>
>         <package>codin.sismed</package>
>   </camelContext>
>
> </beans>
> <!-- END SNIPPET: camel -->
>
> ---------------------------
>
> the service-unit and the service-assembly compiles and deployes well...but
> no routes are created.
> Any suggestion?

Hmm - it should work. Are you sure your class is inside a jar on the
claspath? e.g. your jar is in the pom.xml of the camel-service-unit's
pom.xml so its added to the dependency list & classloader?

-- 
James
-------
http://macstrac.blogspot.com/

Reply via email to