Just a quick side note...

A gotcha that I encountered is that due to the nature of java classloaders 
(which I don't completely grok yet), the programmatic implementation of a 
service unit is be different from when the units are aggregated up into a 
service assembly.

The big difference is that, when doing a programmatic based test, all the 
units (assuming that there is more than a single service unit that is being 
tested) are running within a single area, whereas separate areas are created 
for each service unit when deployed via the service assembly (when placed in 
the 'deploy' directory)

This did cause me quite a bit of headaches as I was piggy-backing objects 
onto the NMR and ended up getting all sorts of classCastExceptions.

James

"Christian Schneider" 
<[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>I think you are right. For testing and getting started the unit tests
> are extremely helpful. I looked into some of the Jsr181 Tests and they
> give a good explanation and basis for starting. Perhaps the unit tests
> could also be referenced in the web documentation. So people can get
> started without building up the complete structure of service assembly
> and service unit. In any case it would be great if all examples would
> also have unit tests.
>
> Best regards
>
> Christian
>
>
> Guillaume Nodet schrieb:
>> I guess this is for testing purposes only, right ?
>> This is not a supported feature, unfortunately.
>> I would then recommend to write unit tests
>> and deploy your service unit programmatically
>> as shown in components unit tests:
>> http://svn.apache.org/repos/asf/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpConsumerTest.java
>>
>
>
> -- 
>
> Christian Schneider
> ---
> http://www.liquid-reality.de
>
> 



Reply via email to