-
1. Re: Problems accessing a Forte/UDS IIOP service from a state
manu+ Sep 5, 2003 5:34 AM (in response to manu+)I investigated the problem further and it seems that problem occurs at the ORB initialization time (IOR.java sample with the constructor invoked)
public IOR(InputStream s)
{
super( s ) ;
this.factory = (ORB)(s.orb()) ;
cachedCodebase = false;
if (!is_nil()) {
// If there is no codebase in this IOR and there IS a
// java.rmi.server.codebase property set, we need to
// update the IOR with the local codebase. Note that
// there is only one instance of the local codebase, but it
// can be safely shared in multiple IORs since it is immutable.
if (uncachedGetCodeBase() == null) {
JavaCodebaseComponent jcc = LocalCodeBaseSingletonHolder.comp ;
if (jcc != null) {
IIOPProfileTemplate temp = getProfile().getTemplate() ;
temp.add( jcc ) ;
codebase = jcc.getURLs() ;
cachedCodebase = true;
}
}
}
makeImmutable() ;
}
where LocalCodeBaseSingletonHolder is an inner class of IOR.java defined as:
private static class LocalCodeBaseSingletonHolder {
public static JavaCodebaseComponent comp ;
static {
String localCodebase = JDKBridge.getLocalCodebase() ;
if (localCodebase == null)
comp = null ;
else
comp = new JavaCodebaseComponent( localCodebase ) ;
}
}
In JDKBridge the localCodeBase returned is not null, this provokes a modification of the IIOPProfileTemplate of the IOR instance (whereas in the simple Java Applic it is null).
This is the main difference I could find between the simple Java Applicaition and running in JBoss.
The problem is that this property seems to be loaded by the RMIClassLoader when JBoss gets started.
("java.rmi.server.codebase" property).
So is there a means to avoid the ClassLoader from loading this property??
Thanks a lot for your help,
Manuela