The Source for Java Technology Collaboration
User: Password:
Register | Login help    

Search

Online Books:
java.net on MarkMail:


Invoke

Posted by editor on November 1, 2005 at 7:09 AM PST

AOP made DIY

One of the knocks against Aspect-Oriented Programming may be the inexplicable hand-waving voodoo that is used by some frameworks to implement the concept. Some AOP implementations extend the Java language, others require their own JVM. It's only natural that you may feel you're losing control of your code by handing it over to AOP this way.

So here's a thought: do the AOP yourself. Through the use of dynamic proxies (and other approaches), you can intercept method calls and apply cross-cutting concerns yourself. This is the theme of today's Feature Article, Implement Your Own Proxy-Based AOP Framework by Jason Zhicheng Li:

To help you understand and demystify AOP, this article shows you how to create a simple AOP framework using both JDK dynamic proxy and CGLIB. This framework supports declarative transaction management. This article uses Java 5 features, including annotations and generics. Since JDK dynamic proxy is simpler, this article starts with dynamic proxy.


In case you missed yesterday's announcement of the Crack the Verifier initiative, today's Weblogs features Graham Hamilton's Help Crack The Java Verifier: "Sun is asking the developer community to help attack the new bytecode verifier in Mustang. Here's some background on how and why the community can help here."

Zarar Siddiqi has written The ultimate toString() method: "I can't remember the times I had to dump a crude toString() method into one of my classes and have it return the properties of the class just so I could track down a blasted Exception. It had previously occurred to me that perhaps creating all these toString() methods was not only cumbersome, but also a waste of time."

In RFID in passports: bad idea, Bruce Boyes writes: "The US State Department tries to patch up a poorly conceived application of technology which is inappropriate for the task."


Suggestions for Planning JavaOne 2006 kick off today's Forum entries. According to Re: Mobile and Embedded Devices, "The session (TS-7091) on Java for the Blu-Ray Disc player last year was sold out and wasn't broadcast to another room or repeated. There's clearly a great deal of interest in this, and the players should be on the market by the time of JavaOne. I'd like to see a session specifically on how to get a BD-J SDK and develop interactive media content for the platform."

toshe has a question about annotations and GlassFish: "Does anyone have examples using annotations in the web contaner of GlassFish? I need examples how to annotate servlet, JSP page ot tag handler (java or tag file). Using the old schema (2.4) seems that no annotations are used. When i try to specify 2.5 schema in web.xml i receive this exception: Caused by: org.xml.sax.SAXParseException: TargetNamespace.1: Expecting namespace 'http://java.sun.com/xml/ns/j2ee', but the target namespace of the schema document is 'http://java.sun.com/xml/ns/javaee'."

On Wednesday, we'll be re-launching our Book Club forum, with an extended discussion and analysis of Bruce Tate's thought-provoking and controversial Beyond Java. If you want to read ahead to be ready for the discussion, but you don't have the book, you can check it out as part of the Safari Bookshelf, our online book service, which also offers a 14-day free trial.


In Projects and Communities, the Java Communications Community project Bluesock offers a lightweight Windows Bluetooth Socket API implementation of JSR-82. The current version supports RFCOMM, over-the-air encryption and full authentication, with OBEX to follow in the next release.

The Jdon project has just released version 1.3 of its framework. Jdon describes itself as a RAD tool for writing a small-to-medium size J2EE application, and as an IOC and AOP framework that is so componentized that everything is replacable... even the framework itself.


In Also in Java Today: "Life moves quickly for the technologist, so it's imperative to stay young and vital in one's tech career." This is the key to Avoiding Oblivion in Your Tech Career Using the analogy of Shakespeare's renowned soliloquy from As You Like It on the seven phases of life, Michael Havey (author of Essential Business Process Modeling) offers tips on how you can sustain technology excellence well into your golden years.

When you type a link into a text editor, it will automatically convert into a hyperlink, a standard feature in most rich text editors. Java Swing provides support for HTML mainly through the JEditorPane class. Though the default implementation does not provide the capability for automatic link detection, the API does provide the required hooks to implement this feature. In Add automatic link detection to your Swing apps, the authors describe how to extend JEditorPane functionality to automatically detect and update hyperlinks and respond to hyperlink events.


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



AOP made DIY
Comments
Comments are listed in date ascending order (oldest first)