Thanks Greg,

Much appreciated, will get back to you tomorrow.

Cheers,

Peter.

Gregg Wonderly (JIRA) wrote:
     [ 
https://issues.apache.org/jira/browse/RIVER-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gregg Wonderly updated RIVER-314:
---------------------------------

    Attachment: ClassLoading.java

Here's my copy of ClassLoading with the never prefer changes in them.  Notice 
that I am using a HashSet that is unsynchronized.  In my use, synchronization 
was not required.  This code, in production use for random applications, should 
use synchronization to control concurrent access.

Here is an example set of classes that I can specify as never preferred and 
keep codebase jars from being downloaded.  This is specific to my application, 
and others might need more or less than this to operate correctly.

                ClassLoading.neverPrefer( Name.class.getName() );
                ClassLoading.neverPrefer( ServiceInfo.class.getName() );
                ClassLoading.neverPrefer( ServiceType.class.getName() );
                ClassLoading.neverPrefer( ConsistentMap.class.getName() );
                ClassLoading.neverPrefer( URL.class.getName() );
                ClassLoading.neverPrefer( URI.class.getName() );
                ClassLoading.neverPrefer( UIDescriptor.class.getName() );
                ClassLoading.neverPrefer( MarshalledObject.class.getName() );
                ClassLoading.neverPrefer( 
java.lang.reflect.Proxy.class.getName() );
                ClassLoading.neverPrefer( 
net.jini.jeri.BasicInvocationHandler.class.getName() );
                ClassLoading.neverPrefer( 
net.jini.jeri.BasicObjectEndpoint.class.getName() );
                ClassLoading.neverPrefer( 
net.jini.jeri.BasicInvocationHandler.class.getName() );
                ClassLoading.neverPrefer( 
net.jini.jeri.ssl.SslEndpoint.class.getName() );
                ClassLoading.neverPrefer( 
net.jini.jeri.tcp.TcpEndpoint.class.getName() );
                ClassLoading.neverPrefer( 
net.jini.id.UuidFactory.class.getName() );
                ClassLoading.neverPrefer( net.jini.id.Uuid.class.getName() );
                ClassLoading.neverPrefer( 
com.artima.lookup.util.ConsistentSet.class.getName() );
                ClassLoading.neverPrefer( Object[].class.getName() );
                ClassLoading.neverPrefer( byte[].class.getName() );


Enhanced codebase download
--------------------------

                Key: RIVER-314
                URL: https://issues.apache.org/jira/browse/RIVER-314
            Project: River
         Issue Type: New Feature
           Reporter: Tom Hobbs
        Attachments: ClassLoading.java


Direct copy from the mailing list:
"I'm also thinking that if we add support of compression to the http codebase (and 
serialization), we can download individual class files over the network individually 
instead of entire jar files (repeatedly compressed class files would be cached, to reduce 
CPU overhead).  This might make performance a bit snappier when only requiring a few 
classes from a large library that would normally be stored in a jar for instance."
http://mail-archives.apache.org/mod_mbox/incubator-river-dev/200907.mbox/%[email protected]%3e


Reply via email to