commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1513673 - in /commons/sandbox/weaver/trunk/src/site: markdown/ site.xml
Date Tue, 13 Aug 2013 22:10:21 GMT
Author: mbenson
Date: Tue Aug 13 22:10:21 2013
New Revision: 1513673

site work


Modified: commons/sandbox/weaver/trunk/src/site/markdown/
--- commons/sandbox/weaver/trunk/src/site/markdown/ (original)
+++ commons/sandbox/weaver/trunk/src/site/markdown/ Tue Aug 13 22:10:21 2013
@@ -1,49 +1,17 @@
-# Commons Privilizer
+# Commons Weaver
-Provides machinery to automate the handling of Java Security access
-controls in code.  This involves wrapping calls that may trigger
-`java.lang.SecurityException`s in `PrivilegedAction` objects.
-Unfortunately this is quite an expensive operation and slows code
-down considerably; when executed in an environment that has no
-`SecurityManager` activated it is an utter waste.
-The typical pattern to cope with this is:
+Provides a general framework for the application of transformations
+to compiled Java bytecode. Commons Weaver provides:
-if (System.getSecurityManager() != null) {
-  AccessController.doPrivileged(new PrivilegedAction<Void>() {
-    public Void run() {
-      doSomethingThatRequiresPermissions();
-      return null;
-    }
-  });
-} else {
-  doSomethingThatRequiresPermissions();
+* [Core Framework](commons-weaver/index.html)
+* [Weaver Modules](commons-weaver-modules-parent/index.html)
+* [Maven Plugin] (commons-weaver-maven-plugin/index.html)
+* [Antlib] (commons-weaver-antlib-parent/index.html)
-This becomes tedious in short order.  The immediate response of a
-typical developer:  relegate the repetitive code to a set of
-utility methods.  In the case of Java security, however, this
-approach is considered risky.  The purpose of the Privilizer, then,
-is to instrument compiled methods originally annotated with our
-`@Privileged` annotation.  This annotation is retained in the
-classfiles, but not available at runtime, and there are no runtime
-### With Privilizer
+* *Q*: Why not just use AspectJ?
-private void doSomethingThatRequiresPermissions() {
-  ...
-Commons Privilizer provides both a Maven plugin and an Antlib for
-weaving your compiled, annotated classes. You can control the weaving
-behavior by parameterizing the Maven goals and Ant task with
-the [Policy][policy] and [AccessLevel][accessLevel] `enum`s.
-[policy]: apidocs/org/apache/commons/privilizer/weave/Privilizer.Policy.html
-[accessLevel]: apidocs/org/apache/commons/privilizer/weave/AccessLevel.html
+    *A*: The original motivation to develop the codebase that evolved into
+         Commons Weaver instead of simply using AspectJ was to avoid the
+         runtime dependency, however small, introduced by the use of AspectJ.

Modified: commons/sandbox/weaver/trunk/src/site/site.xml
--- commons/sandbox/weaver/trunk/src/site/site.xml (original)
+++ commons/sandbox/weaver/trunk/src/site/site.xml Tue Aug 13 22:10:21 2013
@@ -33,6 +33,5 @@
       <item name="SVN" href="/source-repository.html"/>
       <item name="Building" href="/building.html"/>
-    <menu ref="modules" />

View raw message