[jboss-dev-forums] [Design of OSGi Integration] - Re: JBOSGI-38 and bundle deployment order

adrian@jboss.org do-not-reply at jboss.com
Thu Mar 5 09:43:24 EST 2009


"adrian at jboss.org" wrote : 
  | If you don't want the exception then you need to control the "required state"
  | of the deployment such that it doesn't move to "Installed" and instead remains
  | the unresolved state (Described?).
  | 
  | There already is a method to change the "required state" of an existing deployment
  | DeployerClient.change(deploymentName, DeploymentState);
  | but there's nothing currently that lets you set it at initial deployment, e.g. something like
  | DeployerClient.deploy(Deployment, DeploymentState); // DOES NOT EXIST
  | 

In principle to reproduce what other OSGi implementations do, we should make
the OSGi bundle deployments "On Demand" and only move them to the Installed state
when somebody asks for a class in one of the packages they export.

This would require some notification from the classloading layer.

I personally don't like this behaviour because it means services are not registered
until somebody tries to load one of the classes or you somehow manually work out which
bundle provides which service(s) and explicitly activate them.

The "somebody tries to load one of the classes" is almost certainly not going to
happen since the classes are usually implementation details while the caller uses
an interface from some other bundle/deployment.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215336#4215336

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215336



More information about the jboss-dev-forums mailing list