Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Information Provided
-
3.14.2
-
None
-
None
-
java 11, karaf 4.3.6
-
Unknown
Description
I want to generate UUID. But uuidGenerator gets the same result every times.
<?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd "> <bean id="uuidGenerator" scope="prototype" class="java.util.UUID" factory-method="randomUUID"/> <camelContext id="example" xmlns="http://camel.apache.org/schema/blueprint"> <route> <from uri="timer:foo?period=1000"/> <setHeader name="UUID"> <simple>${bean:uuidGenerator.toString}</simple> </setHeader> <log message="UUID: ${headers.UUID}"/> </route> </camelContext> </blueprint>