Trying to externalize Messages, LSDS in TS preview

Using this bean for a messages file (messages_en.properties ans messages_es.properties)

 

<bean id="messageSourceWrapper" class="com.tms.bat.livesite.runtime.page.MessageSourceWrapper">
<property name="messageSource">
<ref bean="messageSource"/>
</property>
</bean>


<bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>WEB-INF/conf/livesite_customer/messages</value>
<!--
<value>file:///opt/interwoven/TeamSite/custom/properties/webapps/messages</value>
-->

</list>
</property>
</bean>

 

When I use the value in the WAR it works,  when I try the external path, it does not.  This means I need a UI rebuild every time there is a change to the messages file.  

 

I get Key not found in the UI and see this in the logs:

 

2016-01-28 16:52:18,053 INFO [STDOUT] 16:52:18,053 WARN [ResourceBundleMessageSource] ResourceBundle [file:///opt/interwoven/TeamSite/custom/properties/webapps/messages] not found for MessageSource: Can't find bundle for base name file:///opt/interwoven/TeamSite/custom/properties/webapps/messages, locale en

 

 

I also tried file://localhost/opt/.....  no luck

 

What is really strange is that the next bean down works (using the same syntax):

 

<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>file://localhost/opt/interwoven/TeamSite/custom/properties/bat/webapps/external-client.properties</value>
</list>
</property>
</bean>

 


Both work correctly on the runtimes. 

 

WTF am I missing ? 

Comments

  • OK, so I changed the class from org.springframework.context.support.ResourceBundleMessageSource to org.springframework.context.support.ReloadableResourceBundleMessageSource.  That seems to accept an external path.  

     

     

TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs