[jboss-dev-forums] [Design of OSGi Integration] - Re: JBOSGI-38 and bundle deployment order
thomas.diesler@jboss.com
do-not-reply at jboss.com
Thu Mar 5 09:24:03 EST 2009
If I remember correctly, we started of with the requirement that bundles can be deployed in any order.
I now made this configurable
| <!--
| If set to 'true' bundles can be deployed in any order. Deployed bundle will get started when their dependencies can be resolved.
| If set to 'false' bundles must be deployed in the order that is required to start them.
| -->
| <entry><key>org.jboss.osgi.deferred.start</key><value>true</value></entry>
|
If you set this to 'false' the dependency item is used and deployed bundles are expected to get resolved so that the start/stop deployer can start the bundle.
In case the bundle cannot get resolved you will get an exception (with the deployers in jboss-5.0.1)
I definitely agree with you, if MainDeployerImpl.checkComplete
would not throw an exception we could always use the DI based approach.
| 15:15:08,642 WARN [MainDeployer] Failed to deploy: file:/.../jbosgi38-bundleB.jar
| org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
|
| DEPLOYMENTS MISSING DEPENDENCIES:
| Deployment "vfszip:/.../jbosgi38-bundleB.jar/" is missing the following dependencies:
| Dependency "<UNKNOWN jbosgi38-bundleB>" (should be in state "ClassLoader", but is actually in state "** UNRESOLVED Bundle: jbosgi38-bundleB [10] **")
|
| DEPLOYMENTS IN ERROR:
| Deployment "<UNKNOWN jbosgi38-bundleB>" is in error due to the following reason(s): ** UNRESOLVED Bundle: jbosgi38-bundleB [10] **
|
| at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:869)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:858)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:833)
|
Perhaps, we can continue the discussion on the topic of what to do with that exception. Should it be thrown or should there be a warning instead?
In case an exception is no longer thrown it would change the behaviour of
| MainDeployer.deploy(URL)
|
on the client side.
In case the behaviour stays unchanged (i.e. MainDeployerImpl.checkComplete throw an exception) the client is forced to deploy the bundles in the correct order, which contradicts our initial requirement.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215319#4215319
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215319
More information about the jboss-dev-forums
mailing list