Liferay 集群中在一个节点上上传照片另外一个节点(2)

Liferay 集群中在一个节点上上传照片另外一个节点


 

The default one is FileSystemStore, and it was configured in portal.properties:

 

Set the name of a class that implements            # com.liferay.portlet.documentlibrary.store.Store. The             # document library server will use this to persist documents.              #             #dl.store.impl=com.liferay.portlet.documentlibrary.store.AdvancedFileSystemStore             #dl.store.impl=com.liferay.portlet.documentlibrary.store.CMISStore             #dl.store.impl=com.liferay.portlet.documentlibrary.store.DBStore             dl.store.impl=com.liferay.portlet.documentlibrary.store.FileSystemStore             #dl.store.impl=com.liferay.portlet.documentlibrary.store.JCRStore    #dl.store.impl=com.liferay.portlet.documentlibrary.store.S3Store 


If we use the FileSystemStore ,the default location that store the file(such as image) is in each nodes $liferay_home/data/document_library, once a node is shutdown ,although the session is replicated to other node ,but the resource can’t be copied to other node (Which means ,the location of resource is not a Single point), so when the backup node need resource ,but the resource is in a shutdowned server ,how can this backup node get it?

That’s the reason.

 

So we changed it to DBStore ,since all nodes share the same database(Database is a Single point in cluster environment) ,so if we use database to store the resource ,all nodes can access it .so it work as our expected. In this way ,the resource (image for example) are stored in the form of “Blob”  ,and stored in “DLCONTENT” table:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/6c1bd4cea160688057e7461b4f982c72.html