codebase classes loading on their own?
I have been tracking down a performance issue. So I am tracing the classes loaded by my clients VM. I have a class defined like so
[code]
public final class GraphicFactory implements IGraphicFactory, Serializable{
private static final long serialVersionUID = 1L;
public IDSComponentInstance createComponentInstance(Point location, Dimension size){
if (location == null || size == null) {
throw new NullPointerException();
}
return new DBComponentInstance(location,size);
}
public IDSFunctionConnection createFunctionConnection(Point sourceLocation, Point targetLocation) {
if(sourceLocation == null || targetLocation == null){
throw new NullPointerException();
}
return new DBFunctionConnection(sourceLocation,targetLocation);
}
}
[code]
I want to pass this class to the client. So the client calls a method, and this class is returned. When that happens, the client immediately loads this class via the codebase. The thing I can not see is when the client loads the "DBFunctionConnection" and "DBComponentInstance" classes. These classes are also in jar files which can be found by the codebase. Obviously the client is getting them because its working. And they are definitely coming from the server. But I do not see any log of them being loaded.
Its like they get loaded in secret. I bet they do too. I think classes loaded as a result of another class loading are not logged.
But at the same time, I thought a class would not be loaded until it is needed!? If its loading it right away, then this is a good thing because otherwise the RMI system could throw an exception at a most unusual place when the class gets loaded because a method is called.
I can't quite figure out what is happening here :(

