Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 4 of 4
unRestrictedMethod() and partiallyRestrictedMethod2() methods.
unRestrictedMethod(), partiallyRestrictedMethod(), and partiallyRestrictedMethod2() methods.
fullyRestrictedMethod() method.
unRestrictedMethod() method.
AnnotationsTest class because the class was annotated with the SecurityPermission annotation SecurityPermission("All"). If All was changed to None, then neither thread could have created an instance of the class.
The best way to see what's going on is to play around with the code and change the values of the various SecurityPermission annotations that are sprinkled around the AnnotationsTest class.
Finally, an awesome exercise would be to use AspectJ to define and implement the appropriate pointcuts that would allow you
to completely remove the manual call to SecurityBlanket.checkPermission() from your code. Now that would be real "magic," and AspectJ makes it easy.
This concludes my three-part series on J2SE 5. Along the way, I have covered many interesting new language features, some more useful than others. I talked at length about the new Java metadata facility called annotations in this article. Annotations provide us with a host of new capabilities. Expect to see many tools in the next couple of years that capitalize on Java annotations to provide new value-added services either at compile time by code modification or at runtime.
Archived Discussions (Read only)