使用文件系统而不是数据库来存储jackrabbit中的pdf文件 [英] Using file system instead of database to store pdf files in jackrabbit

查看:559
本文介绍了使用文件系统而不是数据库来存储jackrabbit中的pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的项目中,我们使用带有spring和tomcat的jackrabbit来管理pdf文件。

In our project we use jackrabbit with spring and tomcat to manage pdf files.

目前MySql数据库用于存储blob文件(就jackrabbit而言,它被称为BundleDbPersistenceManager)。

Currently MySql database is being used to store blob files (in terms of jackrabbit it's called BundleDbPersistenceManager).

一旦生成的文件数量增加,我们就会考虑使用文件系统而不是数据库来提高性能并消除复制开销。
规范中,长耳大野兔团队建议使用BundleFsPersistenceManager而不是像这样的评论

As soon as the number of generated files grow we thought of using file system instead of database to boost performance and to eliminate replication overhead. In the spec jackrabbit team recommend using BundleFsPersistenceManager instead but with comments like this


不适合在生产环境中使用(只读用途除外)

Not meant to be used in production environments (except for read-only uses)

有没有人有使用BundleFsPersistenceManager的经验,并且可以引用从mysql数据库中的blob到文件系统中的文件的无痛迁移的任何资源?

非常感谢你提前

推荐答案

Jackrabbit中的持久性有点复杂,读起来很有意义首先配置概述文档

Persistence in Jackrabbit is a bit complicated, it makes sense to read the configuration overview documentation first.

在Jackrabbit中,二进制文件通过defa存储在数据存储中ult,而不是持久性管理器。即使您使用 BundleDbPersistenceManager ,大型二进制文件也会存储在数据存储中。您可以将(默认) FileDataStore BundleDbPersistenceManager 组合。

In Jackrabbit, binaries are stored in the data store by default, and not in the persistence manager. Even if you use the BundleDbPersistenceManager, large binary files are stored in the data store. You can combine the (default) FileDataStore with the BundleDbPersistenceManager.

我建议使用BundleFsPersistenceManager,因为如果程序在写入时被杀死,数据很容易被破坏。

I would recommended to not use the BundleFsPersistenceManager, because data can get corrupt quite easily if the program gets killed while writing.

这篇关于使用文件系统而不是数据库来存储jackrabbit中的pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆