river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Firmstone <j...@zeus.net.au>
Subject PolicySpi & DynamicPolicyProvider & General Ramblings
Date Tue, 17 Nov 2009 03:37:06 GMT
During my play around with implementing ConcurrentPermissions, I've 
noticed that GrantPermission is not very thread friendly with some 
synchronization issues, it needs to be reimplemented.

To really open up the throttle for concurrency on DynamicPolicyProvider 
I need to re-implement it in a more concurrent manner too.

the Java 6 PolicySpi interface looks good, giving the option of 
pluggability.

Does anyone know if a Sun Proprietary version of PolicySpi existed prior 
to Java 6?

public class ConcurrentDynamicPolicyProvider extends PolicySpi 
implements DynamicPolicy {

    public boolean grantSupported() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void grant(Class cl, Principal[] principals, Permission[] 
permissions) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Permission[] getGrants(Class cl, Principal[] principals) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    protected boolean engineImplies(ProtectionDomain domain, Permission 
permission) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}


N.B. I haven't forgotten about the new River release, I will get to it 
shortly.

If another committer is reading this, could you upload Sim's two recent 
patches for me please, it'll save me some time.  The AR2 release won't 
contain my recent changes.  I'm looking forward to getting AR2 out so I 
can commit my recent work.

I'm starting to wonder if OSGi can assist us with managing different 
java platform dependencies, we might preserve some of the existing 
implementations for backward compatibility with older or more limited 
platforms so that these can still participate, without holding back 
future development?  If someone else has a good suggestion, I'm all 
ears.  Note I don't have any fixed idea of an implementation, I'm just 
looking to bounce around a few ideas.

Classdep is used in River's build system to package the dist jar files, 
I intend on extending our new implementation of Classdep to identify 
Package API for use with codebase services using ASM.  OSGi's bnd tool 
utilises static analysis to generate bundles, so I'm wondering if there 
might be some synergy there and whether Classdep can be extended to 
support generation of OSGi bundle metadata.

Cheers,

Peter.

Mime
View raw message