Projects tigase _server server-core Issues #600
List of components/processors loaded by default (#600)
Andrzej Wójcik (Tigase) opened 9 years ago
Due Date
2016-03-13

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

Artur Hefczyc commented 9 years ago

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.

Andrzej Wójcik (Tigase) commented 9 years ago

I changed due date as it is idea to work on. I will talk with Bartosz about this idea and how to implement it to make it work properly with new configuration framework.

Andrzej Wójcik (Tigase) commented 9 years ago

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.

issue 1 of 1
Type
Task
Priority
Normal
Assignee
RedmineID
3691
Version
tigase-server-8.0.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#600
Please wait...
Page is in error, reload to recover