But if I want to configure the component per camel context, as you know there could be more than one camel context per JVM.
I just introduced a property configuration per camel context in the Camel 2.0, so you want to configure the cachedOutputStream of Camel , you can do it like this.
With the java code
Map<String, String> properties = new HashMap<String, String>();
properties.put(CachedOutputStream.THRESHOLD, "1000");
properties.put(CachedOutputStream.TEMP_DIR, "/tmp/camel");
camelContext..setProperties(properties);
With Spring configuration
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<properties>
<property key="CamelCachedOutputStreamThreshold" value="10000"/>
</properties>
<property key="CamelCachedOutputStreamOutputDirectory" value="/tmp/camel"/>
</properties>
<property key="the key of properties" value="the value as string"/>
</properties>
...
<camelContext>
I want to know how class loading happens in servicemix in details can you get me some reference. I got into a problem like , with jars in smx/lib my application performs better than having jar's as shared lib, why it so
ReplyDeleteservicemix 3's classloader is like the classical application server's classloader, SMX/lib's jars can be saw from all the SA, and the shared lib jars can be saw by the SA which holds the reference of the shared lib.
ReplyDeleteIf you have some jars which may introduce some conflict with other SA, you'd better to use shared lib instead of the copy the jars to SMX/lib.
For ServiceMix4, we are using OSGi, that is another story of classloader :)
Wow what a nice post.I am felling glad about this post.Can you more share with me.I have many ideas about it.
ReplyDeleteThanks for more sharing.....
zvnproperties
Just a tip, to access the property in a just use: ${property.PROPERTY_NAME}
ReplyDelete