Message-Id: <s5458695.086@novell.com>
Date: Tue, 28 Apr 1998 07:34:09 -0600
From: "Vishal Goenka" <vgoenka@novell.com>
To: java-security@web4.javasoft.com, jdk-comments@web4.javasoft.com
Subject: Re : Loading Security Provider Classes via ClassLoader
In addition to what I wrote in my earlier mail (copied below for reference)=
, the following can be assumed.
The caller of getInstance(...) method (the one who consumes the security =
object returned by getInstance(...) is itself loaded by my own classloader.=
Hence, I would assume that the Class.forName(..) would call myclassLoader.=
load(...) method to load the implementation class that we need.
----------------------------- My previous message follows -----------------=
-----------
The getInstance(algorithm, provider) method of various security algorithms =
(MessageDigest et.al.) invoke the Security.getImpl(...) method, which in =
turn instantiates the required class (after mapping the actual implementati=
on class name via the security provider) using Class.forName(className), =
where className is the implementation class that we require to load.
If the implementation class ("className") is not available in the class =
path, but is accessible only through my own classloader (say), the =
Class.forName method returns error (obviously).
My question is :=20
How to get the security implementation classes loaded via my classloader, =
through the standard interface (MessageDigest.getInstance(...) for =
example).=20
I understand that since the java.security.Security and java.lang.Class =
classes are loaded by the default classloader, the forName method will =
query the default classloader only for loading the security implementation =
class. Does this mean, I *must* make the implementation classes available =
in the classpath to be read by the default class loader ??
Many thanks in advance.
Regards,
Vishal