Apache项目Research之Jackrabbit

    在介绍Jackrabbit 之前先介绍一下JCR JCR(Java Content Repository) 规范是在 Java Community Process 中作为 JSR-170 开发的。该规范在 javax.jcr 名称空间中提供了统一的 API 用以实现统一且标准化了Java 内容仓库接口。JSR-170 的一个主要优势就是没有捆绑到任何特定的底层架构上。所以JCR 的实现方法可以按照实际的需要而建立在不同的底层架构上。并同时标准化一些复杂的功能(例如版本管理、访问控制和搜索等等)

<o:p> </o:p>Apache-Jackrabbit就是目前支持JCR标准的最好的一个开源项目。他支持的底层架构有数据库,XML和操作系统的文件系统。开发者可以通过自己的需要在配置文件中定义所需的底层架构类型。

<o:p> </o:p><o:p></o:p>在以下情况中我们可以考虑使用JCR
JCR(”Java内容库”)从名字上就可以理解它是用于数据内容管理。而树型结构是JCR的标准结构,所以当我们的程序需要运用到树型结构来表现相关内容是我们就可以考虑使用 JCR

以下是JCR的具体运用

1.文件管理程序。其实所有的文件管理程序就是树型结构的一种使用方式,只不过增加了用户访问权限,空间限制,使用限制,以及文件复制,移动等操作。基本的CRUD操作实现方式见文http://maqujun.iteye.com/blog/136434,基本查询方式见文http://maqujun.iteye.com/blog/136437

2.多版本文件库。允许同一文件拥有多个版本,实现版本控制。版本控制的实现方式见http://maqujun.iteye.com/blog/136436

3.数据库的替代。JCR同样可以用作数据库来存储信息,他可以类似hibernate一样实现对象映射,但HibernateO/R Mapping是不适合面向内容的应用程序的。他是以Object/Content Mapping的形式来表述映射的。在apache中还有另一个孵化项目叫Graffito专门用于解决JCR的对象映射实现。具体的实现方式见我的另一篇文章http://maqujun.iteye.com/blog/136439。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提示错误[ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-webdav-jackrabbit:1.0-beta-6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: commons-httpclient:commons-httpclient:jar:3.1 (absent): Could not transfer artifact commons-httpclient:commons-httpclient:jar:3.1 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/146.75.112.215] failed: connect timed out @ @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project org.drools:droolsjbpm-integration:7.74.0-SNAPSHOT (D:\droolsjbpm-integration-main\droolsjbpm-integration-main\pom.xml) has 1 error [ERROR] Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-webdav-jackrabbit:1.0-beta-6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: commons-httpclient:commons-httpclient:jar:3.1 (absent): Could not transfer artifact commons-httpclient:commons-httpclient:jar:3.1 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/146.75.112.215] failed: connect timed out -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException
06-09

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值