-
init.properties configure is:
muc (class: tigase.muc.MUCComponent) {
admin (class: tigase.muc.modules.ModeratorModule3) {} disco (class: tigase.muc.modules.DiscoveryModule3) {} groupchat (class: tigase.muc.modules.GroupchatMessageModule3) {} presences (class: tigase.muc.modules.PresenceModuleImpl3) {} historyProviderPool (class: tigase.muc.history.HistoryProviderMDBean) { default (class: tigase.muc.history.HistoryProviderMDBean.HistoryProviderConfigBean) { name = 'mucHistoryProvider' 'repo-class' = 'tigase.mongodb.muc.MongoHistoryProvider' instance (class: tigase.mongodb.muc.MongoHistoryProvider) {} } } 'muc-dao' (class: tigase.muc.repository.MucDAOMDBean) { default (class: tigase.muc.repository.MucDAOMDBean.MucDAOProviderConfigBean) { instance (class: tigase.mongodb.muc.MongoMucDAO) {} } }
}
-
It would be good to state build number of Tigase XMPP Server and explain exactly what is not working, ie. what errors do you get?
At first I would suggest you to remove
@Bean
annotation from your class. It is only needed for automatic registration of beans and it is not needed at all if you are specifying bean class in a config file.Please attach
etc/config.dump
file with whole configuration dump which will contain information about registered beans (including beans from automatic registration). Moreover please check logs for any errors and warnings and attach them if there are any. -
Sorry, I describe not enough detailed.
When I override the ModeratorModule named of ModeratorModule3, the ModeratorModule3 is copy from ModeratorModule.java file.
then I configure it at the init.properties file.
muc (class: tigase.muc.MUCComponent) {
admin (class: tigase.muc.modules.ModeratorModule3) {}
}
I start the XMPPServer, the muc component use ModeratorModule class still, not is ModeratorModule3 class.
but, if I delete this line 'kernel.registerBean(ModeratorModule.class).exec();' from MUCComponent.java file at 146 line, then muc component use ModeratorModule3 class. when I debug the code can jump into my ModeratorModule3 pocess method.
-
I found that hardcoded modules (modules registered by
registerModules()
method) were being registered after configuration was applied, so they overwritten bean definition from a configuration file.I changed execution order and now
register()
method (and as a resultregusterModules()
method) is called before configuration is applied. That way bean definition from configuration will be more important than hardcoded bean definition as it should be.As a result of this change it is no longer possible to depend on bean configuration within
register()
andregisterModules()
methods, but it should not be done even before this change.Next snapshot build of Tigase XMPP Server 7.2.0-SNAPSHOT will contain fix for this issue.
Type |
Bug
|
Priority |
Major
|
Assignee | |
RedmineID |
5303
|
Version |
tigase-server-8.0.0
|
Estimation |
0
|
Spent time |
0
|
Hi, all
When I override the muc DiscoveryModule and configure it not effect?
My class is :
@Bean(name = DiscoveryModule3.ID, parent = MUCComponent.class, active = true)
public class DiscoveryModule3 extends tigase.component.modules.impl.DiscoveryModule {
.
.
.
}
init.properties configure is:
muc (class: tigase.muc.MUCComponent) {
}
'muc-dao' (class: tigase.muc.repository.MucDAOMDBean) {
}
}