-
This is a very good idea. We can do this for 7.2.0 as you suggested. I wonder if this could/should be part of the configuration framework Bartosz is working on.
I am assigning this back to you but if you think Bartosz is a better candidate to implement it, please reassign.
-
After discussions with %bmalkow we found a way to do this using new features from 7.2.0 - kernel and beans.
I added new feature to @Bean annotations. Now if any class ie. MobileV3 is annotated with @Bean(parent=XYZ.class) then this kernel will create bean from class MobileV3 and inject it to instance of class XYZ created by kernel. This way we can force injection of instance any class by default to to any bean.
It is also possible to register class as bean for other class but not to enable it by default - this is done for other plugins/processors which are not enabled by default.
This new feature is ready in branch
task_4001
- not every thing works in this branch as to make it work 100% we need to port Tigase XMPP Server to use beans.I tested this feature in local tests and it worked (beans - processors/component - were created as needed and injected as needed.
Type |
Task
|
Priority |
Normal
|
Assignee | |
RedmineID |
3691
|
Version |
tigase-server-8.0.0
|
Right now we have to manually specify list of components and processors which are loaded by Tigase XMPP Server by default (see MessageRouterConfig and SessionManagerConfig).
I think it would be good to allow us to add ie.
@Default
or@Config(default=true)
annotation and implement code which would create list of processors or components which should be started by default.This way it would be possible to remove static lists of default processors and components from MessageRouterConfig and SessionManagerConfig making this classes cleaner and making it easier to change list of default components/processors