You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Andrè <mo...@web.de> on 2011/06/16 18:12:24 UTC

trigger direct:start route

i want to fire that route in the camel-context.xml for testing purposes , i
thought that the direct component would do that by himself but, it doesnt
looks like...
 <route>
    	<from uri="direct:start"/>
    	<log message="direct request generated"/>
       <bean ref="xacmlRequest" method="genRequest" />
       <log message="direct did it"/>
        <to uri="activemq:topic:xacml.authzRequests"/>
    </route>  
   <route>
        <from uri="activemq:topic:xacml.authzRequests"/>
        <log message="request consumed hopefully"/>
        <to uri="bean:pdp"/>
    </route>
is there command which have to add to the camel-context ?

--
View this message in context: http://camel.465427.n5.nabble.com/trigger-direct-start-route-tp4495731p4495731.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: trigger direct:start route

Posted by boday <be...@initekconsulting.com>.
here is an example...

https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/component/direct/DirectQueueTest.java


Andrè wrote:
> 
> i want to fire that route in the camel-context.xml for testing purposes ,
> i thought that the direct component would do that by himself but, it
> doesnt looks like...
>  <route>
>     	<from uri="direct:start"/>
>     	<log message="direct request generated"/>
>        <bean ref="xacmlRequest" method="genRequest" />
>        <log message="direct did it"/>
>         <to uri="activemq:topic:xacml.authzRequests"/>
>     </route>  
>    <route>
>         <from uri="activemq:topic:xacml.authzRequests"/>
>         <log message="request consumed hopefully"/>
>         <to uri="bean:pdp"/>
>     </route>
> is there command which have to add to the camel-context ?
> 


-----
Ben O'Day
IT Consultant -http://consulting-notes.com

--
View this message in context: http://camel.465427.n5.nabble.com/trigger-direct-start-route-tp4495731p4495807.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: trigger direct:start route

Posted by Claus Straube <cl...@catify.com>.
As I wrote yesterday: Create a test class, extend 
CamelSpringTestSupport, create a test method and call 
template.sendBody("direct://start", "foo").


On 16.06.2011 18:12, Andrè wrote:
> i want to fire that route in the camel-context.xml for testing purposes , i
> thought that the direct component would do that by himself but, it doesnt
> looks like...
>   <route>
>      	<from uri="direct:start"/>
>      	<log message="direct request generated"/>
>         <bean ref="xacmlRequest" method="genRequest" />
>         <log message="direct did it"/>
>          <to uri="activemq:topic:xacml.authzRequests"/>
>      </route>
>     <route>
>          <from uri="activemq:topic:xacml.authzRequests"/>
>          <log message="request consumed hopefully"/>
>          <to uri="bean:pdp"/>
>      </route>
> is there command which have to add to the camel-context ?
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/trigger-direct-start-route-tp4495731p4495731.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


-- 
claus straube
__________________________________________

phone    +49-89-38157419
mobile   +49-176-49673717
web      http://www.catify.com
office   5. floor, heßstr. 56, 80798 munich
__________________________________________


Re: trigger direct:start route

Posted by Taariq Levack <ta...@gmail.com>.
Hi
Now you have a consumer from "start", your test class will produce a message for that consumer, like this example;

http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java

    
On 16 Jun 2011, at 6:12 PM, Andrè <mo...@web.de> wrote:

> i want to fire that route in the camel-context.xml for testing purposes , i
> thought that the direct component would do that by himself but, it doesnt
> looks like...
> <route>
>        <from uri="direct:start"/>
>        <log message="direct request generated"/>
>       <bean ref="xacmlRequest" method="genRequest" />
>       <log message="direct did it"/>
>        <to uri="activemq:topic:xacml.authzRequests"/>
>    </route>  
>   <route>
>        <from uri="activemq:topic:xacml.authzRequests"/>
>        <log message="request consumed hopefully"/>
>        <to uri="bean:pdp"/>
>    </route>
> is there command which have to add to the camel-context ?
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/trigger-direct-start-route-tp4495731p4495731.html
> Sent from the Camel - Users mailing list archive at Nabble.com.