geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gianny DAMOUR" <gianny_dam...@hotmail.com>
Subject [JSR77] kernel and model glue strategy
Date Thu, 14 Aug 2003 22:32:53 GMT
Hello,


I wrote "[JSR77] Workplan proposal":
>2. Define the global strategy to plug this implementation.
>
>It seems that the current strategy is to expose this implementation via 
>inheritance. Indeed, the AbstractComponent extends AbstractStateManageable.
[...]
>However, what do you think of trying to plug the components via a Strategy 
>pattern?
>
>Consider the following example:
>
>public class interface J2EEManagement { public void 
>setStateManagement(StateManageable); public void 
>setStatisticsProvider(StatisticsProvider); public void 
>setEventProvider(EventProvider); }
>
>public class EJBComponent extends <whatever> implements J2EEManagement{
>
>  EventProvider m_eventProvider;
>
>// partial J2EEManagement implementation. public void 
>setEventProvider(EventProvider anEventProvider) {   m_eventProvider = 
>anEventProvider;   m_eventProvider.setSource(this); // for callbacks. }
>
>doStart() {     m_eventProvider. doNotification(<a starting notification 
>here>);     // perform the state update     m_eventProvider. 
>doNotification(<a started notification here>); } … }

The intend is to implement a model (JSR Managed Objects), which is decoupled 
of the kernel (Component in charge of the deployment for instance). The 
kernel provides the pieces of information required by the JSR models via a 
"glue". This "glue" is divided into three interfaces:

- StateManageable: state instrumentation/collection;
- StatisticsProvider: statistics instrumentation/collection; and
- EventProvider: event collection.

The flow should be:

kernel <-> glue <-> JSR77 model

The glue is passed to the kernel via the J2EEManagement interface (see above 
for more details). The kernel uses the provided glue in order to register 
its activity.

I think that this "architecture" is superior because it allows us to 
implement a re-usable component which could be used by other containers. 
Indeed, the glue + the JSR77 model can be packaged independantely.

I will not be able to consult the mailing list on saturday. However, I plan 
to work on this design and submit a patch on sunday (may-be, or monday for 
sure) implementing the foundation of this mechanism.

So, here is the deal: could you please validate/discard this design during 
the day?

Thanks for feedback,
Gianny

_________________________________________________________________
MSN Search, le moteur de recherche qui pense comme vous !  
http://search.msn.fr/


Mime
View raw message