Title: RE: Class Loaders and axis

Do you have any examples of ClassUtils usage.

 

sagar

 

-----Original Message-----
From: Sagar Pidaparthi
Sent: Thursday, July 29, 2004 4:51 PM
To: [EMAIL PROTECTED]
Subject: RE: Class Loaders and axis

 

Thanks for your message.  After reading the APIs in this class, I come to the conclusion that I need to do the following.  Please comment if this is right.

 

1.  Write  myjava2wsdl tool in which I first set the class loader to be myClassLoader, using setClassLoader Method.

2.  Then call java2wsdl program which will convert a java program to wsdl

3.  Similarly for wsdl2java follow the steps described above.

Is this right?

Secondly how do objects get instantiated during the run time.

I am sure that there is a better mechanism then the one I described above.  If there is a configuration file that can be used to specify a class loader and a bunch of classes that need to be picked up by Axis, it should work with minimal work.

I would appreciate your answer.  Is there an example of the usage of this class.

Regards

Sagar



-----Original Message-----
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 29, 2004 11:31 AM
To: [EMAIL PROTECTED]
Subject: Re: Class Loaders and axis

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