This post originated from an RSS feed registered with Java Buzz
by Carlos Perez.
Original Post: The Forgotten Standard Java API
Feed Title: .:Manageability:.
Feed URL: http://www.manageability.org/blog/stuff/rssDisabled?portal_status_message=Syndication+is+Disabled
Feed Description: Random thoughts on the manageability of complex software.
Extensible Runtime Container and Services Protocol a.k.a. The BeanContext API. This has got to be the all time least understood and least remembered standard Java API. What's simply astonishing is that it's an API that tackles the issue of building reusable components and their respective containers.
In fact, all this work expended on dynamic AOP and microkernel containers could spend a lot of quality time reviewing the BeanContext API. Well that's just what I did, I went back and dug up a few ancient articles on the BeanContext API and here's what I've discovered.
Lifetimes of a Component. We all too often don't realize that a Component has a complex lifetime. We all aware of the distinction between the Compile time and Runtime states of a component, however we forget that there's also a Assembly time and a Design time. This is discussed here. (BTW, this is one reason why I want to throw away the concept of a Class altogether.)
The BeanContext API has a concept of a Service Provider and that Services can be added and removed dynamically with appropriate notification sent to the JavaBean. In essence it covers the concept of dynamic services as opposed to static ones. Meta information about the service is provided by the BeanContextServicesProviderBeanInfo class.
Finally it turns out that the BeanInfo class returns Event, Method and Property Descriptors all happen to be derived from FeatureDescriptor which happens allow generic attributes to be attached. Just the kind of thing that you find in Attribute Based Interception frameworks.
In computer science we continue to reinvent things. Our inherent weakness is to dismiss old inventions, and therefore throwing out the good design with the bad design. There are just too many cases of good ideas that have been thrown out simply because they are old and not new. The most classic example is the Relational model.
So as a word of wisdom. It's always wise to investigate old designs. You leverage the amount of time spent thinking about the subject (yes, they could think back then) and you approach their work from a new perspective. So, if we look at the BeanContext and the JavaBeans API's we realize that there's a lot of useful things in here. It's just up to us to evolve it into the new ways of thinking.