[jboss-dev-forums] [Design of OSGi Integration] - Re: Facade Questions
johnbailey
do-not-reply at jboss.com
Sun Feb 24 20:55:53 EST 2008
Assuming the DeploymentControllerContext is always available to the Bundle, can we also assume the DeploymentControllerContext has also been installed into the Controller? Looking through the DeployersImpl the DeploymentControllerContext is created, installed into the controller, attached to the DeploymentContext, and moved through all known states for the DeployersImpl.
So if the Bundle.start method delegates to the DeploymentControllerContext.changeState(...), would it look something like this:
| public void start() throws BundleException
| {
| DeploymentControllerContext deploymentControllerContext = getControllerContext();
| DeploymentContext deploymentContext = deploymentControllerContext.getDeploymentContext();
|
| // Go through the states in order
| List<ControllerState> states = getControllerContext().getController().getStates();
| for (ControllerState state : states)
| {
| if (DeploymentState.ERROR.equals(deploymentContext.getState()) == false)
| {
| try
| {
| deploymentControllerContext.getController().change(getControllerContext(), state);
| }
| catch (Throwable t)
| {
| deploymentContext.setState(DeploymentState.ERROR);
| deploymentContext.setProblem(t);
| }
| }
| }
|
| }
|
Also, I have completed some other work on the Facade, should I document it on the existing 'OSGI Facade' JIRA http://jira.jboss.com/jira/browse/JBOSGI-8, or create a more detailed task?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131726#4131726
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131726
More information about the jboss-dev-forums
mailing list