Somewhat, but then how is this reflected in the profile and exposed via management interfaces? Its hard to deal with something that does not exist. There would have to be some unresolved bean notion that does not fail a deployment when its validated.
This has the same problem as the precedence.
When do you check that the class is available?
Under hotdeployment, the class could be added later and even removed and
When classloading dependencies are implemented (needs integration
between the classloader and the kernel - see other discussions)
a better feature might be to say:
<bean ... class="org.drools.Shit" optional="true"/>
So if the class doesn't exist we don't report it as a missing dependency.
We just don't start the bean until somebody deploys the class.
This would also extend to other dependencies, not just classes.
don't you have the same issue with "On Demand" stuff?
No because "On Demand" doesn't "On Undemand". :-)
If somebody references the bean we deploy it, but we don't undeploy it
when it is de-referenced.
That is mainly because it would wasted effort if the referencer is just redeloying.
For class dependencies the issue is different. You have to redeploy if the class changes
or undeploy if the class is removed.
It's not difficult, the semantics are just a bit more exacting.