You need to put the jar in the classpath for the web app then.
The easiest way to do that is to put it in the WEB-INF/lib folder
inside the app, which is not related to ServiceMix in anyway.
But if you do that, your classes should be available to all the classloaders
that ServiceMix will create.
Note that the <library/> stuff only works with trunk.

On 5/18/07, vinodhc <[EMAIL PROTECTED]> wrote:


Guillaume,
Ritesh is a colleague of mine.

I wanted to point out here that we are trying to do this in Servicemix
that
is deployed under JBoss using servicemix-web.war. Will this shared library
patch still work?

The reason I ask is because I believe the standalone version of Servicemix
3.1 has a new Classloader that requires our jars to be specified in a
configuration file - servicemix.conf.

This configuration file is not available to the servicemix version
deployed
under JBoss. So where does the classloader search for these shared
libraries?
Can you please guide us in implementing this shared library functionality
with Servicemix under JBoss.


Ritesh Samanpure wrote:
>
> Thanks for the reply Guillaume.
>
> I am able to include and load the jar along with the shared library. Now
> as per your note, I would set the classpath in my Service Unit using
> <library>xx</library>
>
> I have used it as <library>.</library> which makes this relative to the
> current SU. How can I now point it to look for a jar in the shared
> libraries ?
>
> Thanks,
> Ritesh
>
>
> gnodet wrote:
>>
>> There are different solutions to solve this problem:
>>   * put the needed classes in the container classloader (in
lib/optional
>> for
>> example),
>>   * serialize the object somehow (using xml ?)
>>   * use the new ability to reference Shared Libraries from Service
Units
>> (SM-918)
>>     by adding a <library>xx</library> tag to the <classpath/> element
in
>> your xbean.xml file.
>>
>> On 4/12/07, Ritesh Samanpure <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>> Hello Ppl,
>>>
>>> Sorry to bump the post back to the top but we are stuck with the
issue.
>>> Would really appreciate it if someone has faced this very same issue
and
>>> resolved it.
>>>
>>> Thanks
>>> --
>>> View this message in context:
>>>
http://www.nabble.com/ClassCastException-while-using-same-custom-jar-in-2-service-units-tf3506609s12049.html#a9949542
>>>
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> LogicBlaze
>> Principal Engineer, IONA
>> Blog: http://gnodet.blogspot.com/
>>
>>
>
>

--
View this message in context:
http://www.nabble.com/ClassCastException-while-using-same-custom-jar-in-2-service-units-tf3506609s12049.html#a10673318
Sent from the ServiceMix - User mailing list archive at Nabble.com.




--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/

Reply via email to