Ron Bodkin's complete blog can be found at: http://rbodkin.blogs.com/ron_bodkins_blog/

Items:   1 to 5 of 19   Next »

Thursday, August 23, 2007

I'm looking forward to speaking at The Rich Web Experience conference in San Jose next month. The event runs from September 7th through 9th. I'll be presenting on Rich Web App Performance and Scalability and Managing Client State Across Domains. I'd love to hear comments on specific topics or questions that are of interest.

I hope to see you there! Also, there's a special $200 discount available if you use the promotion code nfjs2007speaker200 when registering.


Wednesday, May 9, 2007

This is just a quick note to let everyone know that MaxPoon and Paul Cheung are doing a lab session with hands on Glassbox content at JavaOne today from 1:30pm to 3:30pm. I'll be there also to answer questions. Here are the details:
Nonintrusive Monitoring of Java Technology-Based Applications with Java Management Extensions (JMX) Technology, JConsole, and Aspect-Oriented Programming: Using a Spring Application as an Example

This is at Moscone Center - Hall E 130-132

I hope to see you there!
Ron


Wednesday, November 15, 2006

Sometimes it's refreshing to write a useful little aspect. Just last night I was reviewing some code that colleagues wrote for thread safety and I found this to be a really efficient way to find likely danger spots:

public aspect TrackCollectionAccess {

    declare warning: set(java.util.Collection+ *.*) || get(java.util.Collection+ *.*): "collection field access";

    declare warning: set(java.util.Map+ *.*) || get(java.util.Map+ *.*): "map field access";

}

I was able to weave this into the project and quickly review places in the code where fields containing collections and maps were being used to see if they were used in a way that wasn't thread safe. This is a nice example of a development-time aspect: using them to help you develop without using them in production.

On the other extreme, I recently extended Glassbox to allow for various kinds of application-specific plugins. There are a number of points where plugins need to interact with the underlying system, and it turns out to be a good example of how you can use aspects to modularize a feature variation. For example, here is how the DefaultPluginManager aspect allows a plugin to define new kinds of operations:

    Object around() : getOperations() {

        Collection result = (Collection)proceed();

        for (Iterator it=operationPlugins.values().iterator(); it.hasNext();) {

            OperationPlugin plugin = (OperationPlugin)it.next();

            Collection added = plugin.getOperations();

            if (added != null) {

                for (Iterator inner=added.iterator(); it.hasNext();) {

                    OperationSummary summary = (OperationSummary)inner.next();

                    summary.getOperation().setPlugin(plugin);

                }

                result.addAll(added);

            }

        }

        return result;

    }


Wednesday, November 15, 2006

I enjoyed being back at a couple of No Fluff Just Stuff conferences this fall (including the Rocky Mountain Software Symposium this past weekend). Jay Zimmerman continues to do a great job of providing fresh technical content with great speakers and it's always fun to talk the audiences at these about topics like Glassbox, AOP, and AJAX.

For those who are interested in digging in to aspects more deeply, I highly recommend the Aspect Leadership Program (ALP), which will be held in Vancouver this March 14th and 15th.

The ALP is an opportunity to learn from seven of the world's leading experts, who will provide a two-day crash course on everything you need to know to figure out what aspect-oriented programming (AOP) is all about; identify whether and how you can use it to add value, drive quality and improve productivity in your enterprise; and provide practical guidance on implementing AOP. I'm also proud to be part of the presenters at this event. Please pass on the word about this to others who might be interested, too!


Wednesday, October 25, 2006

I'm enjoying another year of presenting at the Colorado Software Summit. One of my talks is about AOP with Spring 2.0, covering both the use of Spring AOP and of AspectJ within Spring. I've really enjoyed some of the dialog with attendees when I give this talk and afterwards: it's great to hear how people are making real use of AOP and new ideas for additional uses.

At one bank, they are using Spring AOP with Spring MVC to scan incoming Web requests for SQL injection attacks. In another department they are using AspectJ to implement use cases separately such as sending email notifcations after business events, supporting state-specific regulations in a Web application, handling encrypted fields and white space trimming on Web requests. Another group is looking to detect resource failures and short-circuit requests that would use them to avoid tying up threads (while checking for restored availability periodically). This is an interesting scenario for integrating with Glassbox to detect the outages, with custom logic to manage requests when there are outages.

Another interesting use case I heard about is audting data when committing transactions using Spring AOP. It turns out you can use the Spring ordered interface to ensure the audit logic can set up just before the transaction commits (so it can be included in the transaction!). However I don't see how you specify the order of the transaction aspect in @AspectJ aspects in the relevant Spring docs as of today (Oct. 25): it is shown in the XML schema-defined .

In my talk I also give an example of how to use Spring AOP to proxy persistent objects after a DAO returns them by executing advice after they are returned, say by a finder method in a DAO. Now this isn't as nice as using AspectJ to configure and otherwise advise these objects, but it can be a useful approach for those using Spring AOP but not yet AspectJ.  This code uses the ability to explicitly create @AspectJ proxies in Spring AOP code, which is also fine.

It's been interesting working a bit with @AspectJ with Spring: you can get good tools support by turning on AJDT while being ableto preserve very natural incremental development in Eclipse. I'm still continuing to use traditional AspectJ syntax for my projects, but like Spring AOP it can be very useful in projects that are starting to adopt AOP:

...
        @Pointcut("execution(music.model.Playable music.model.PlayableDao.find*(..))")
void createPlayable() {
}

@Around("createPlayable()")
public Playable proxyPlayable(ProceedingJoinPoint pjp) throws Throwable {
Playable created = (Playable)pjp.proceed();
return proxyPlayable(created);
}

public Playable proxyPlayable(Playable playable) {
AspectJProxyFactory factory = new AspectJProxyFactory(playable);
factory.addAspect(this);
if (playable instanceof PlayList) {
proxyChildren((PlayList)playable);
}

return (Playable)factory.getProxy();
}

void proxyChildren(PlayList playList) {
for (ListIterator

it = playList.getEntries().listIterator(); it.hasNext();) {
Playable child = it.next();
Playable proxy = proxyPlayable(child);
it.remove();
it.add(proxy);
}
}


Items:   1 to 5 of 19   Next »