Re: Scaling Reggie

Mark Brouwer <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
Dennis Reedy wrote:
>>
>> There is one case though I can think of where Reggie does create class
>> loaders and that is with the registration of the remote event
>> listeners
>> for receiving service discovery events [1]. So in case the service
>> with
>> a codebase referring to 90MB of JAR file(s) is registering for
>> receiving
>> events a class loader is created in the JVM Reggie is running
>
> After doing some digging into the proxy that is downloaded to the 800
> + clients, it appears that the proxy is creating a SDM along with  a
> LookupCache using:
>
> sdm.createLookupCache(template, null, null);
>
> The ServiceDiscoveryManager.LookupCacheImpl.LookupListener creates an
> exporter and exports itself:
>
> lookupListenerProxy = (RemoteEventListener)
> lookupListenerExporter.export(this);
>
> Is it possible that the codebase from the proxy is being used here?

Assuming no special exporter is configured it seems that the default
exporter utilized by the SDM uses the null class loader for the
ILFactory which means that the class loader will be utilized that is
associated with the class that implements RemoteEventListener, i.e.
LookupListener.

Therefore I think the answer depends on whether there is a preferred
list that prefers the SDM (in that case it will/might have the
90MB codebase) or that it is not preferred and actually defined in a
parent class loader of the client that obtained the smart proxy in which
case it will cary the codebase annotation associated with the class
loader the SDM is defined in for the client. Maybe there are some
details I forgot to take into account, but this is always nasty reasoning.

In any way I always discourage people from doing stuff such as service
discovery from specialized proxies mainly for configuration and security
reasons and to preserve resources.
--
Mark

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.