camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Straube <claus.stra...@catify.com>
Subject Re: what did i forgot? Bean integration through direct:start
Date Wed, 15 Jun 2011 13:54:56 GMT
As I wrote in the very first mail... This does NOT work:

    <route>
         <from uri="direct:start"/>
         <bean method="genRequest" ref="xacmlRequest">
             <log message="request generated"/>
             <to uri="activemq:topic:xacml.authzRequests"/>
         </bean>
     </route>


Try this:

    <route>
         <from uri="direct:start"/>
         <bean method="genRequest" ref="xacmlRequest"/>
	<log message="request generated"/>
         <to uri="activemq:topic:xacml.authzRequests"/>
     </route>

For me the second one works. The first not.



On 15.06.2011 15:38, Andrè wrote:
> thats the problem i´m sending nothing out of this class!!!
> it seems like camel doesnt knows/uses it, but i added the bean in
> camel-context
> i have reduced it ...
> So i just wanna send something out these class
> (which would be comparable to http://camel.apache.org/bean.html (beans as
> Endpoint))
> public class XacmlRequester {
> 	
> 	public String genRequest(){
> 			return "hello";
> 	}
> }
>     <route>
>          <from uri="direct:start"/>
>          <bean method="genRequest" ref="xacmlRequest">
>              <log message="request generated"/>
>              <to uri="activemq:topic:xacml.authzRequests"/>
>          </bean>
>      </route>
>
>   <bean class="de.tarent.abiege.camel.producer.XacmlRequester"
> id="xacmlRequest"/>
>
> i also tried this (this time without a route using the bean cause the
> annotation should do that)
> (which would be hopefully comparable to
> http://camel.apache.org/pojo-messaging-example.html pojo example  or
> http://camel.apache.org/pojo-producing.html pojo producing  )
> public class XacmlRequester {
> 	
> 	@Produce(uri = "activemq:topic:xacml.authzRequests")
> 	ProducerTemplate producer;
> 	
> 	public void genRequest(){
> 			producer.sendBody("hello");
> 	}
> }
> but nothing works
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/what-did-i-forgot-Bean-integration-through-direct-start-tp4490510p4491246.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
__________________________________________


Mime
View raw message