Reproduce the procedure:
The last time they had a cluster problem was to upload a picture from the Control Panel of Node 1, and then close Node 1, which is not visible from Node 2. The process of this problem is as follows:
Following are the steps for the clustering issues
Go to control Panel.
Click on the "Documents and Media" from the left Nav.
Add folder
ADD Basic document. Browse Image
ADD The Web content port let
and configure it to use the above add image.
I later solved the problem after delving into the process:
Workaround 1: Use the database to store media resources in blob form:
Solution:
(1) In each node, add the following lines in ${liferay_home}/portal-ext.properties:
#added by Charles to use the Dbstore instead of default filesystemstore when configuring the document library
Dl.store . Impl=com.liferay.portlet.documentlibrary.store.dbstore
#added by Charles to fix the Dbstore problem and use the new Por Tal Hibernate mapping file
hibernate.configs=\
meta-inf/mail-hbm.xml,\
meta-inf/portal-hbm-new.xml,\
Meta-inf/ext-hbm.xml
In each node, copy the Portal-hbm-new.xml from the attachment to/root/web-inf/classes/meta-inf/folder.
Reason for this solution:
When we add "Basic Document" to created folder in Control Panel, the Liferay system'll do the following tasks:
You can read my article http://supercharles888.blog.51cto.com/609344/921761 for the very detailed analysis process.
A. Add a entry in "dlfileentry" table to stand for the new added document.
B. Add an entry in "dlfileentryversion" table to record the version information of the new added document, it would r Elated to "dlfileentry" table by foreign key "Fileentryid"
C. Update the new posted timestamp in "Dlfolder" table, which means the latest timestamp-this folder has been P osted by some file.
D. Add an entry in "assetentry" table, because the file is also one kind of asset. This table is related to "dlfileentry" table by foreign key "CLASSPK"
E. Upload the "file to" store based on the Liferay server configuration:
In Dlstoreimpl class AddFile method:
public void AddFile (
long CompanyID, long Repositoryid, String FileName,
boolean validatefileextension, File File)
throws Portalexception, SystemException {
validate (fileName, validatefileextension, file);
if (propsvalues.dl_store_antivirus_enabled) {
antivirusscannerutil.scan (file);
}
Store.addfile (CompanyID, Repositoryid, fileName, file);
Actually, the Liferay framework has supplied 5 kinds of implementations for Store: