I have a Scheduler class that implements com.liferay.portal.job.Scheduler in one of my portlets. This scheduler class wakes up every few minutes and perform a webservice request to update data. This data is to be made available for all other portlets to share and use. My problem is that I don't know how to make this data available to the portlets. The first place I can think of is the portlet context, but I don't know how to access the context from my scheduler class. Anyone have any idea?
As of right now, I am dumping this xml file to the server, and the portlets read in the xml file when it wants to get an updated data. But this is obviously not efficient, especially if the data gets large. One other option I thought of is maybe to have a table in the database to store this data, and other portlets can query the database to get the result. But I don't really like this option considering that the data is very volatile, changing from minutes to minutes. I'd like to just keep it in memory.
Por favor, identifíquese para poder marcar esto como inapropiado