axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepal Jayasinghe" <dee...@opensource.lk>
Subject Re: [Axis2] Loading axis module from a jar file
Date Fri, 27 May 2005 03:29:11 GMT
Hi Glen an all;
I tried to do so but I couldn't able , that is because the module archive 
file is inside the modules subdirectory inside the main jar file as below;
Axis2.jar
   META-INF
   org/apache/axis/.....
   modules/
      addressing.mar
      rm.mar

I can get an inputstream for the module archive file (say addressing.mar) 
and can read module.xml file and so on , but the problem comes to play when 
I tried to load the module handlers and module implementation class , it was 
very difficult to do so always it throws exceptions and intact I couldn't 
find a way to fix that. That is why I need to copy and paste only the 
corresponding module archive file in to what ever location and then treat 
that module as others.

Any way take a look at the following method
creatModuleArchivefromResource() in 
org.apache.axis.deployment.repository.utill.ArchiveReader class.

Thanks

Deepal


----- Original Message ----- 
From: "Glen Daniels" <glen@thoughtcraft.com>
To: <axis-dev@ws.apache.org>; "Srinath Perera" <hemapani@gmail.com>
Sent: Thursday, May 26, 2005 6:29 PM
Subject: Re: [Axis2] Loading axis module from a jar file


> Hi folks:
>
> Do we actually even need to "unpack" the mar file at all?  Can we just use 
> GetResourceAsStream() to read stuff out of it directly?
>
> --Glen
>
> ----- Original Message ----- 
> From: "Srinath Perera" <hemapani@gmail.com>
> To: <axis-dev@ws.apache.org>
> Sent: Wednesday, May 25, 2005 9:55 PM
> Subject: Re: [Axis2] Loading axis module from a jar file
>
>
> Deepal sounds good to me, may be we do not need looking up the home
> directory, and instead I prefer the current directory the code run.
>
> I am not a big fan of a any arbitroy code that runs, messes with my
> home direcotry :) even though they always to it ;). may be name should
> at lease be .axis2/.... so it is hidden
>
> Thanks
> Srinath
>
> On 5/25/05, Deepal Jayasinghe <deepal@opensource.lk> wrote:
>>
>> Hi all;
>>
>> At the last chat we decide to bundle ws modules into axis2 distribution 
>> and
>> without given the repository file name provide a way to engage modules. 
>> So
>> in that case axis2 distribution archive file might look like below;
>>
>> Axis2.jar
>>   META-INF
>>   org/apache/axis/.....
>>   modules/
>>      addressing.mar
>>      rm.mar
>>
>> In this case deployment will work as follows;
>>   when some one ask to engage a module first it check whether that module 
>> is
>> available in AxisConfiguration if it found then engage that module , else
>> it check inside   user.dir/Axis2Home/modules/    directory and if the
>> required module found deploye that module and engage that , if it dose 
>> not
>> available there then
>>
>> try to load the corresponding module.mar file form the classpath
>> (getResourceAsStream) if it found then read it and write that into
>> user.dir/Axis2Home/modules/  as new module archive file. next using that
>> module archive file first deploy the module and engage that module.
>>
>> In this  case I made some assumptions
>>  1. Assumed module archive file name equal to module + .mar
>>  2. If the module archive found in the classpath extract into
>> "user.dir/Axis2Home/modules/ "
>>
>>
>> Comments ?
>>
>> Thanks and regards
>> Deepal
>
> 


Mime
View raw message