[Design of OSGi Integration] - Current roadmap
by alesj
With JBoss5 out, it's time to get back to OSGi impl work. ;-)
Taking it step-by-step, let's first check what we have and how to move fwd from this.
OSGi = classloading + core frmwrk + services
1) Classloading
Adrian already did most of the work,
it's just a few details left to polish.
Since new CL is metadata driven,
all we need to do is provide a proper:
* OSGi manifest.mf parsing
* OSGi manifest metadata --> JBoss CL metadata transformation
1a) OSGi manifest parsing
Currently it's based on JavaCC and I'm not very happy with it. :-(
* Do we proceed with fixing/enhancing current impl?
* Or do we check some existing - Felix, Equinox, ... (what license do we need to re-use it)?
1b) OSGi manifest metadata --> JBoss CL metadata transformation
This step mostly needs thorough testing,
OSGi's feature by feature --> mapping it to JBoss CL metadata.
This way we'll also see if we cover all features in our CL.
2) Core OSGi framework as a facade
First step: enable OSGi TCK env
Next steps:
a) BundleContext and services
This needs proper impl on top of DeploymentUnit/Context.
Services need proper registry - simple/smart api behind maps.
b) BundleActivationPolicy
This is a new feature - from 4.2 spec.
I guess we'll need some sort of a hook into Classloaders?
e.g. the spec says to only enable BundleActivator if some class from the bundle is accessed
c) listeners and events
I did some work, but I think it needs more wiring inside the MC Kernel itself.
OSGi eventing should drive the listener/event introduction in the MC Kernel.
d) BundleActivator
This is a simple deployer - which already exists.
It's the previous tasks that need to be done before to make this run.
e) DeclarativeServices
Perhaps we can use similar concept to what we've done with MC-Spring-int?
Mapping Spring's schema to MC beans metadata,
where here we would map DS schema to MC beans schema.
In any case, this is optional.
We should eventually support the new OSGi RFC 124.
3) Services
No intention of impl it.
Dunno how much the OSGi TCK tests this things.
I think we should at least test the main services - logging, http, ... -
how well they run in our frmwrk impl.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203198#4203198
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203198
17 years, 2 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: XML configuration
by jmesnil
i've committed XML schema for all our configuration files.
Validation occurs in XmlDeployer subclasses.
Some tidbits about the XML schema:
== order matters ==
I've not found how to provide a "bag" of elements with a XML schema. Elements must now be ordered for the configuration to be valid
== ID/IDREF ==
I took advantage of ID & IDREF in the schema to validate our conf. E.g. if the backup-connector-ref element references a "blah" connector, there MUST be a connector element with the "blah" attribute. I did not change the code but we can now remove some validation done in Java and now handled by XSD.
However this does not apply to cross-configuration files (e.g. jbm-jms.xml connection-factory can not IDREF an element from jbm-configuration.xml).
This still must be done in Java
== Minimal configuration ==
The minimal valid configuration file is
| <deployment>
| <configuration>
| <acceptor>...</acceptor>
| </configuration>
| </deployment>
|
there MUST be at least 1 declared acceptor. All other elements are optional.
== Default values ==
The XML schemas DOES NOT define any default values. The defaults are taken from Configuration interface if the corresponding XML element is not present in the configuration
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203165#4203165
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203165
17 years, 2 months