You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Iwan Memruk <im...@lohika.odessa.ua> on 2005/12/12 13:34:14 UTC

Re[4]: [Axis2] Axis2 0.93 doesn't find resources in .aar

Hello Deepal,

Friday, December 9, 2005, 5:00:57 AM, you wrote:

DJ> Hi Iwan ;

DJ> To load your resources the right way is get the class loader from 
DJ> AxisService and using that load your resources. As an example say your
DJ> archive file name is foo.aar then the step is as follows;
DJ>    1. If you are going to use that at the MessageReciever level , get the
DJ> axisService from msgContext and then
DJ>    2. axisService.getClassLoader(); will give you the class loader
DJ> corresponding to the service , and using that you can load your resources in
DJ> archive file.

DJ> If you are in a place that you do not have a msgContext , then you have to
DJ> get your service from AxisConfiguration and ask its class loader.

    How exactly can I do that?

    Thanks!

DJ> Note : Since axis2 service are isolated (they have their own class loader) ,
DJ> the resources you put into archive file can not be taken from CCL.

DJ> Thanks,
DJ>  Deepal
DJ> ................................................................
DJ> ~Future is Open~

DJ> ----- Original Message ----- 
DJ> From: "Iwan Memruk" <im...@lohika.odessa.ua>
DJ> To: "Chathura Herath" <ch...@gmail.com>
DJ> Cc: <ax...@ws.apache.org>
DJ> Sent: Thursday, December 08, 2005 8:12 PM
DJ> Subject: Re[2]: [Axis2] Axis2 0.93 doesn't find resources in .aar


>> Hello Chathura,
>>
>> Thursday, December 8, 2005, 4:08:15 PM, you wrote:
>>
>> CH> Well i am not sure whethe i got your question right, if you are
>> CH> talking about deploying an service then the .aar files should go to
>> CH> $CATALINA_HOME\webapps\axis2\WEB-INF\services
>>
>> CH> or pls use our nice admin interface to upload the aar.
>>
>> CH> Chathura
>>
>> Thanks for your concern. Here's a more detailed explanation:
>>
>> 1. My application loads Hibernate config file (an XML) as a resource.
>> 2. It works locally, e.g. when unit-testing.
>> 3. It works when the service is deployed in the extracted form, i.e.
>> classes AND
>> resources in axis2/WEB-INF/classes, service as a directory in
>> WEB-INF/services etc. My Hibernate config gets loaded OK.
>> 4. When deployed as an .aar, the resources are not found, even though
>> they are included in the .aar together with the classes.
>>
>> CH> On 12/8/05, Iwan Memruk <im...@lohika.odessa.ua> wrote:
>>>> Hello axis-user,
>>>>
>>>>   Axis2 version 0.93
>>>>
>>>>   ..doesn't load resources from .aar for me.
>>>>
>>>>   And so did 0.92.
>>>>
>>>>   If i deploy the resources to axis2/WEB-INF/classes, they get loaded
>>>>   OK.
>>>>
>>>>   Someone else faced this problem?
>>>>
>>>> --
>>>> Best regards,
>>>>  Iwan                          mailto:imemruk@lohika.odessa.ua
>>>>
>>>>
>>
>>
>> CH> --
>> CH> Chathura Herath
>> CH> http://www.bloglines.com/blog/chathurah
>>
>>
>>
>>
>> -- 
>> Best regards,
>> Iwan                            mailto:imemruk@lohika.odessa.ua
>>
>> 





-- 
Best regards,
 Iwan                            mailto:imemruk@lohika.odessa.ua