incubator-imperius-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@SUN.com>
Subject Re: Unnecessary class load in JavaActuator
Date Wed, 17 Mar 2010 17:40:14 GMT
Hi David,

It's a mystery to me as well. It's probably wrong, too.

But the corner case would be two classes with the same name from  
different class loaders, and the subject code itself looks like it's  
broken.

Craig

On Mar 17, 2010, at 9:41 AM, David Wood wrote:

> Hi All,
>
> I've got a situation in which my Java-bound policy imports an  
> interface,
> but the implementation is provided by a class in a package I do not  
> have
> access to.  This leads to problems in the JavaActuator.invokeMethod()
> method which does the following:
>
>
> c = Class.forName(instance.getClass().getName());
>
>
> Class.forName() is throwing ClassNotFoundException, which on the  
> face of
> it seems strange since we already have the class in  
> instance.getClass().
> So, this is my question,  "why doesn't this code just do
> c=instance.getClass()?'  This is probably some subtly of Java that  
> I'm not
> aware of.  Your teachings  will be much appreciated.  thanks.
>
>
> David Wood
> Policy Technologies Group
> IBM TJ Watson Research Center
> dawood@us.ibm.com
> 914-784-5123 (office), 914-396-6515 (mobile)

Craig L Russell
Architect, Oracle
http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@oracle.com
P.S. A good JDO? O, Gasp!


Mime
View raw message