see ClassUtils.java

----- Original Message -----
From: Sagar Pidaparthi <[EMAIL PROTECTED]>
Date: Thu, 29 Jul 2004 11:29:39 -0700
Subject: Class Loaders and axis
To: [EMAIL PROTECTED]

 

Hi, 

I have a situation that requires the use of class loaders for loading
my service classes.
 

Reason for writing a class loader: 

In my application I have service identified by a tag name MyService
which points to MyServiceClass.  All the application has been
developed for MyServiceClass.  Our clients can extend MyServiceClass
to CustomServiceClass, with enhanced features and point tag name
MyService to CustomServiceClass.  Thus our clients will start using
features of CustomServiceClass, by changes in configuration.  (This
was required over and above the inheritance features provided by OO).

In the past we had a factory that used to vend the right MyService. 
However, with Axis we need to ensure that this trick of loading the
CustomServiceClass should now be done inside a class loader that vends
the right class, when ever MyService is requested using a default
constructor.

Question: 

I have two options, one to instantiate the class loader in the
initialization and inspect each class and see if it needs to be loaded
with customized classes.

Or 

Use the class loader when ever Axis makes a call to load the classes. 
Does axis give me a mechanism to use the class loader whenever it
tries to load classes to generate WSDLs or service the requests etc. 
i.e for all Axis work, I wish to use my class loader and not disturb
any of my existing (mammoth) legacy application.
 

I would appreciate your help. 

Regards 

Sagar 



-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

Reply via email to