On Aug 24, 2012, at 5:53 AM, Simon IJskes - QCG <[email protected]> wrote:
> On 24-08-12 03:38, GREGG WONDERLY wrote: >> I want to use the netbeans modular application framework as my >> service UI host. > >> As I said, what I needed was to set the parent class loader for the >> downloaded codes context class loader, specifically for netbeans. > > To make things simple for me: What you want, is another classloader that is > currently used in jini, and currently it is not 'pluggable'/configurable? The specific instance of ClassLoader that the URLClassLoader is created with, should be controllable. What PreferredClassProvider did as part of its activities related to RMIClassLoaderSPI, was create a new URLClassLoader for the "annotation" that the serialized data contained, and specify null as the parent class loader, so that in effect, the system class loader was to be used as the parent. In netbeans, the most likely choice would be the ClassLoader of the module which the calling class (the one that is doing service lookup and thus causing the unmarshalling of the service object to occur. > > Does the material in jira solve the problem? It does provide the plug-in point for implementations of the new "interface" to be used. From my perspective, it works for what I want to do. The default is to providing the previously existing behavior. With the proper policy specified by the SecurityManager, code running in the VM, can replace that default implementation with a new one. Because there is a certain bit of "exploitation" that is always possible, anytime that the code can "change" something that other classes are using, we need to vet that code out. > Can we make it pluggable? If so, shall we change the specs to include this > plugin 'interface'. Once it's in place, there should be specs that detail how it is designed to be used, so that we can help people understand the power and limits of the features provided. It functions at a very basic, low level part of the system, but its features are essential to moving service lookup and unmarshalling into a modular JVM environment such as that which Netbeans and other such environments provide. Gregg
