Hello guys,
We have just encounter strange "bug?" (is it bug or I am only dumb?)
We've implemented Custom Repo action - "SampleAction extends ActionExecuterAbstractBase()"
and call it with this sample (test call):
action = actionService.createAction(SampleAction.NAME)
action.setParameterValue(SampleAction.PARAM_QUERY, query)
action.setExecuteAsynchronously(true) // here is the problem when async is true
actionService.executeAction(action, null)
Strange thing happens with asynchronous execution.
In code we try to retrieve localized messages from I18NUtil:
I18NUtil.getMessage("action.sample.msg")
// or
messageService.getMessage("action.sample.msg") When action is called with asynchronous=false -> everything is alright.
But when asynchronous=true -> I18NUtil or even messageService can not find the message (returns null)
I've tried debug through I18NUtil.getMessage() - seems that budles are there with messages, but can not retrieve the exact message
Status report: we debugged I18NUtil a little bit more: when called from the asynchronous action - our custom budles are cached, but messages from this context are not (not even one message from our custom bundles)
Message budles are registered as follows:
<bean id="custom.base.dictionaryBootstrap"
parent="dictionaryModelBootstrap"
depends-on="dictionaryBootstrap">
<property name="labels">
<list>
<value>alfresco.module.${project.artifactId}.messages.customActions</value>
</list>
</property>
</bean>Any help would be appreciated.
Thanks