camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baltej Singh <>
Subject RE: logging/incrementing simple counter
Date Thu, 29 Dec 2016 21:49:55 GMT
Following code works, but is there a better way to define the constant 1L in Spring DSL Camel

	<bean class="java.lang.Long" id="longOne">
		<constructor-arg index="0" value="1" />
	<bean class="java.lang.Long" id="execCount">
		<constructor-arg index="0" value="1" />

	<log id="_id1"   message="${bean:execCount?method=sum(${bean:execCount.longValue}, ${bean:longOne.longValue})}"

-----Original Message-----
From: Baltej Singh 
Sent: Thursday, December 29, 2016 12:08 PM
Subject: RE: logging/incrementing simple counter

Thanks Quin - worked like a charm!

What the recommended way to set the value on this bean?  
What are the advantages/disadvantages of using groovy VS ${bean:..} syntax?

View raw message