Portions of this are offtopic, but it will be hard to get a non-disjointed answer without the background. I'm about to go on a journey to try and make JBMS a bit more manageable but I want to make sure I'm not duplicating work. I would like to:
0. Have a decent admin GUI (competitive with existing mail offerings)
1. allow hot deployment of services
2. allow changes to service configuration w/o redeploying said service yet have those available at restart
3. allow decoupling of metadata and persistence of metadata to repositories (such as ldap, file based, database, windows registry, whatever)... It should still be able to read/write to a hand-editable config file (decoupled from instance descriptor)
JBMS has these types of data essentially:
1. Declarative instance information (name, existence)
aka "mbean name="
2. Declarative structural information (operations/attributes)
aka has an attribute called, has an operation called
3. simple instance attribute settings (strings, ints, etc)
aka jboss-service.xml style attribute settings
4. simple dependency declarations (static to class, name)
i.e. ALWAYS depends on transaction service
5. complex dependency declarations (dynamic to instance, proxies)
for example my "server" has an injected proxy to the "protocol" which it exposes. I may have N instances of SERVER and N instance of PROTOCOL but each SERVER depends/exposes ONE protocol. (The server answers the port and passes off to the protocol)
1. There is an attribute persistence service pre-existing. Is it usable for this purpose?
2. About the deployment-service
1. expose all existing MBeans as "service" beans
2. mark up case #5 attributes with @injectConfig and provide a generic aspect which retreives from a persistence service
3. create a custom deployer which reads the dependency tree from the persistence service, finds holes and deploys in the correct order (this is a duplication of the ServiceController, is it possible to push the data to the service controller?)
4. create a configuration persistence service
5. create a wrapper for MBeanServer which sets attributes, creates instance, etc and also sends the info to the configuration service.
6. create a scanner which scans the decoupled config file and applies changes but does not restart/redeploy the service.
1. I'll be able to change attributes at runtime, have them persisted and set. They will not be lost after restart. They will be set before "start" and set once.
2. i'll be able to dynamically create instance and their dependencies with data
<mbean name="jboss.jbms:service=Server,protocol=SMTP"> </mbean> <mbean name="jboss.jbms:service=Protocol,protocol=SMTP"> </mbean>
server/default/conf/jbms.xml (or ldap or whatever)
<service name="jboss.jbms:service=Server,protocol=SMTP"> <!-- proxy implied by @ tag --> <attribute name="protocol">jboss.jbms:service=Protocol,protocol=SMTP</attribute> <attribute name="port">25</attribute> </service> <service name="jboss.jbms:service=Protocol,protocol=SMTP"> ... </service>
Does the microcontainer buy me anything here? What are the mismatches?