hi all, I have followed the last lifecycle thread, and as I am very interested in these topics, have thought about it:
I view the Creator and Accessor interfaces in the lifecycle package as contracts between a Lifecycle extension implementator and the container. In this sense a lifecycle extension, like for instance a Transaction lifecycle manager, registers itself with the container, to get notified when certain components are created/distroyed and accessed/released respectively. What it lacks is the interception of calls from the client to the component, since, once the reference is out of the container, the container can't control the use (except in an micro kernel design, but that is suboptimial here). So the notion of a call interceptor get's introduced, the client get's a proxy back that intercepts the method call and does some extra magic. To support proxies, as Leo pointed out, one could change the interface from void created( Object object, Context context ) to Object created( Object object, Context context ) but what I am missing here is how to state which kind of aspect the object supports, for isntance, take the example of a componetn configuration with a "standardized" transaction support: <component class="..." role="..." > <ts:transaction-supported>auto</ts:transaction-supprted> </component> if you change the Method and add a configuration instance, or something like that, it would be much more interesting: Object created( Obejct object, Context context, Configuration config ) ; so you can transparently use a proxy to implement the invocation handler and *know* which kind of transaction logic should be used. (naive question: is this the kind of transaction demarcation support Peter asked?) I hope I have explained my ideas understandable, and bear with me since I am currently trying to get a handle on all of the AOP, Call interception things. As Leo pointed out the implementation of AOP in Java using bytecode transformation, custom proxies and the like is relatively easy and well documented, but for me it is sometimes hard to transform the topic to practical use, so any discussion is appreciated. As a side node this brought up the question, what is a lifecycle extension and event respectively int the case of runtime containers to me? I mean is there a concise,precise definition of that. Am I right to say that in the current avalon containers, component lifecycle is hosted in the activity package, that is: - Initializable - Disposable - ... I am also interested, how other runtimes do their lifecycle managment, but haven't had the time to look at those yet. thanks, -- Jakob --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
