Hi,

My comment inline
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

On 2012-12-12, at 下午2:03, Tanvi wrote:

> Hi Freeman,
> 
> Thanks for your reply :)
> 
> I have an independent project (JAR) of VOs which is added as a dependency in
> POM of each of SU. Since each SU has set of JBIs, which use this VO JAR, VO
> project is a part of each of zip built for an SU.
> 
> As per your suggestion, I performed below steps:
> 1. Changed VO packaging from JAR to bundle
> 2. Installed VO bundle independently in SMX-4
> 3. Added symbolic name of VO bundle in classpath of each of SU.
> 
> with this I could remove the class cast exception. :)
> 
> My next query is, similar to this VO jar, I have some of the other projects
> like DAO layer, Delegate layer, UTIL layer which are shared across SUs i.e.
> each SU pom.xml has dependency of these projects. 
> 
> - I did not get any such classloader problem for other JARs, what could be
> the reason? Is it because, I am using IOC for injecting these classes and
> not class cast scenario?

The CCE only happens when same class loaded by different classloaders, other 
classes from DAO/UTIL may not run into this situation with your user case ,  
but it doesn't mean it's OK for all cases, you should never embed dependency 
libs in your SA 

> - Is it advisable to have all these shared JARs installed as a separate
> bundles in OSGI container and entry to be added in classpath for all of
> these?
Yeah, this is the way to go.
> 
> Please help.
> 
> Thanks in advance,
> 
> Regards,
> Tanvi
> 
> 
> 
> 
> --
> View this message in context: 
> http://servicemix.396122.n5.nabble.com/Class-cast-exception-while-sending-message-from-JBI-to-other-using-NMR-tp5715233p5715240.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to