You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by Ruchith Fernando <ru...@gmail.com> on 2005/10/21 14:58:21 UTC

Picking up resources with a custom classloader

Hi All,

Dims made some changes recently to enable WSS4J to load the password
callback class from a given class loader. This allowed Axis2 security
module (which is a port of the WSDoAll* handlers) to be able to load
the password callback parameters from the service's class loader.

Axis2 services have their own classloader  and this is different from
the classloader available to the Axis2 module. Therefore we need to
supply the service's classloader to WSS4J to pickup the required
resources and classes.

Therefore we should also be able to load the other resources such as
crypto.propertes with a custom class loader (the service's classloader
in the case of Axis2), and we may have to load a different Crypto impl
from the Axis2 service archive. Right now this is not possible since
the CryptoFactory and the default Crypto impl (Merlin) is not capable
of accessing a custom class loader.

I made some changes and tried it out with Axis2 and it was able to
pickup the resources from the Axis2 service archive. Please have a
look at the attached diff.

Can we have this option in WSS4J? Or is there a better way to do it?
Thoughts? :-)

Thanks
--
Ruchith

---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: Picking up resources with a custom classloader

Posted by Ruchith Fernando <ru...@gmail.com>.
Oops missed the attachment.

On 10/21/05, Ruchith Fernando <ru...@gmail.com> wrote:
> Hi All,
>
> Dims made some changes recently to enable WSS4J to load the password
> callback class from a given class loader. This allowed Axis2 security
> module (which is a port of the WSDoAll* handlers) to be able to load
> the password callback parameters from the service's class loader.
>
> Axis2 services have their own classloader  and this is different from
> the classloader available to the Axis2 module. Therefore we need to
> supply the service's classloader to WSS4J to pickup the required
> resources and classes.
>
> Therefore we should also be able to load the other resources such as
> crypto.propertes with a custom class loader (the service's classloader
> in the case of Axis2), and we may have to load a different Crypto impl
> from the Axis2 service archive. Right now this is not possible since
> the CryptoFactory and the default Crypto impl (Merlin) is not capable
> of accessing a custom class loader.
>
> I made some changes and tried it out with Axis2 and it was able to
> pickup the resources from the Axis2 service archive. Please have a
> look at the attached diff.
>
> Can we have this option in WSS4J? Or is there a better way to do it?
> Thoughts? :-)
>
> Thanks
> --
> Ruchith
>


--
Ruchith

Re: Picking up resources with a custom classloader

Posted by Ruchith Fernando <ru...@gmail.com>.
Oops missed the attachment.

On 10/21/05, Ruchith Fernando <ru...@gmail.com> wrote:
> Hi All,
>
> Dims made some changes recently to enable WSS4J to load the password
> callback class from a given class loader. This allowed Axis2 security
> module (which is a port of the WSDoAll* handlers) to be able to load
> the password callback parameters from the service's class loader.
>
> Axis2 services have their own classloader  and this is different from
> the classloader available to the Axis2 module. Therefore we need to
> supply the service's classloader to WSS4J to pickup the required
> resources and classes.
>
> Therefore we should also be able to load the other resources such as
> crypto.propertes with a custom class loader (the service's classloader
> in the case of Axis2), and we may have to load a different Crypto impl
> from the Axis2 service archive. Right now this is not possible since
> the CryptoFactory and the default Crypto impl (Merlin) is not capable
> of accessing a custom class loader.
>
> I made some changes and tried it out with Axis2 and it was able to
> pickup the resources from the Axis2 service archive. Please have a
> look at the attached diff.
>
> Can we have this option in WSS4J? Or is there a better way to do it?
> Thoughts? :-)
>
> Thanks
> --
> Ruchith
>


--
Ruchith