[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Handling contexts in error
julien@jboss.com
do-not-reply at jboss.com
Wed Feb 20 11:28:26 EST 2008
Here is my use case:
I defined an SPI for that allow to integrate portlet applications / portlet container and portlet filter objects (which have a stop/start/failed life cycle and start() throws Exception / stop() callbacks) with kernel system (whether it is MC or something else).
I have two facade of objects:
1/ managed object which are exposed to admin and allow to know what exists, the state and life cycle trigger (managedStart() / managedStop())
base class is
| public interface ManagedObjet
| {
| ManagedObjectStatus getStatus();
| void managedStart() throws Exception;
| void managedStop();
| }
|
then for instance I have
| public interface ManagedPortletApplication extends ManagedObject
| {
| Collection<ManagedPortletContainer> getPortletContainers();
| }
|
| public interface ManagedPortletContainer extends ManagedObject
| {
| ManagedPortletApplication getPortletApplication();
| }
|
-----------------------------------
Then I have the internal API that is aimed at providing wiring capabilities and real start/stop activities
| public interface PortletContainerService
| {
| void setPortletApplication(PortletApplicationService pa);
| void start() throws Exception;
| void stop();
| }
|
| public interface PortletApplicationService
| {
| void addPortletContainer(PortletContainerService pc);
| void removePortletContainer(PortletContainerService pc);
| void start() throws Exception;
| void stop();
| }
|
-----------------------------------
Now I am trying to get an MC implementation of the Managed* stuff that uses JBoss MC to:
1/ manage the *Service objects (wiring and callbacks)
2/ provide a managed interface to know about what exists and managed their life cycle
3/ be integrated with other MC beans that may exist in the same Kernel (so it is possible to create dependencies between a portlet container and another service, etc...)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130850#4130850
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130850
More information about the jboss-dev-forums
mailing list