[jboss-dev] Classloading and partial deployments

Ales Justin ales.justin at gmail.com
Mon Oct 20 08:28:23 EDT 2008


> You can do this already in JBoss5 for those classes that are hot
> deployed, provided you use the OSGi classloading rules.
> 
> The classloading depenencies will automatically cause
> the importing applications to be redeployed when a 
> dependent jar changes.
> 
> But these classloading dependencies are not currently
> specified by our services (see an earlier post of mine
> on this list).
> 
> If the classes are not hotdeployed, e.g. 
> the jars in JBOSS_HOME/lib then you have to reboot the whole
> server.

I guess Mladen is more looking for a callback hook on when this happens.
And he's lucky there. :-)

Since imple detail of how this (Adrian's suggestion) works is completely 
based on MC state machine, which already has a notion of (lifecycle) 
callback.

See MC's ControllerContext --> DependencyInfo --> 
addInstallItem(CallbackItem) or addLifecycleCallback(LifecycleCallbackItem).

Where each deployment unit/bundle/jar is represented with 
(Deployment)ControllerContext, hence you can apply (Lifecycle)CallbackItem.

Perhaps move this discussion to MC user forum,
for more impl details / code samples.




More information about the jboss-development mailing list