Alfresco 2.0 解读

Alfresco 2.0 解读

 

一、介绍

http://www.alfresco.com

Alfresco is the Open Source Alternative for Enterprise Content Management (ECM), providing Document Management, Collaboration, Records Management, Knowledge Management, Web Content Management and Imaging.

 

采用的技术

Java

Spring Aspect-Oriented Framework

ACEGI – Aspect-Oriented Security Framework

MyFaces JSF Implementation

Hibernate ORM Persistence

Lucene Text Search Engine

JLAN

POI File Format Conversion

PDFBox – PDF Conversion

OpenOffice

jBPM

Rhino JavaScript engine

支持的接口

CIFS/SMB Microsoft File Share Protocol

JSR-168 Portlet Specification

JSR-127 Java Server Faces

FTP

WebDAV

Web Services

REST

更多的技术规范详见: http://www.alfresco.com/products/ecm/specifications/

 



二、配置解读

1、从web.xml开始入手

其它的略过,在 web.xml 中可以看到加载了如下 Spring 配置文件

<context-param>

            <param-name>contextConfigLocation</param-name>

            <param-value>

     classpath:alfresco/web-client-application-context.xml

     classpath:web-services-application-context.xml

     classpath:alfresco/web-api-application-context.xml

     classpath:alfresco/application-context.xml

 </param-value>

            <description>Spring config file locations</description>

</context-param>

web client 层

alfresco/web-client-application-context.xml

打开它可以看到它引入了所有的 alfresco/web-client*.xml & alfresco/extension/web-client*.xml & jar:*!/META-INF/web-client*.xml

web api 层

alfresco/web-api-application-context.xml

打开它可以看到它引入了 alfresco/web-api-config.xml & alfresco/extension/web-api-config-custom.xml

web service 层

web-services-application-context.xml

刚开始找这个文件时,居然没有找到,怪事!not exist???why?

于是后来才发现这个文件是在 remote-api.jar 包里,晕,不是很好的做法啊。

bean 配置定义关键的文件

alfresco/application-context.xml

    <import resource="classpath:alfresco/core-services-context.xml"/>

    <import resource="classpath:alfresco/public-services-context.xml"/>

    <import resource="classpath:alfresco/model-specific-services-context.xml"/>

    <import resource="classpath:alfresco/action-services-context.xml"/>

    <import resource="classpath:alfresco/rule-services-context.xml"/>

    <import resource="classpath:alfresco/node-services-context.xml"/>

    <import resource="classpath:alfresco/scheduled-jobs-context.xml"/>

    <import resource="classpath:alfresco/network-protocol-context.xml"/>

    <import resource="classpath:alfresco/content-services-context.xml"/>

    <import resource="classpath:alfresco/hibernate-context.xml"/>

    <import resource="classpath:alfresco/ownable-services-context.xml"/>

    <import resource="classpath:alfresco/template-services-context.xml"/>

    <import resource="classpath:alfresco/script-services-context.xml"/>

    <import resource="classpath:alfresco/index-recovery-context.xml"/>

    <import resource="classpath:alfresco/authority-services-context.xml"/>

    <import resource="classpath:alfresco/authentication-services-context.xml"/>

    <import resource="classpath:alfresco/policy-context.xml"/>

    <import resource="classpath:alfresco/import-export-context.xml"/>

    <import resource="classpath:alfresco/bootstrap-context.xml"/>

    <import resource="classpath:alfresco/workflow-context.xml"/>

    <import resource="classpath:alfresco/jcr-api-context.xml"/>

    <import resource="classpath:alfresco/avm-services-context.xml"/>

    <import resource="classpath:alfresco/audit-services-context.xml"/>

    <import resource="classpath*:alfresco/patch/*-context.xml"/>

    <import resource="classpath*:alfresco/domain/*-context.xml"/>

 

    <!--

         Import all modules and related components.

         Extensions are explicitly imported after this so that the default

         mechanism can still be used to override module-specific beans.

    -->

    <import resource="classpath*:alfresco/module-context.xml"/>

 

    <!--

         Import of general extensions and bean overrides.

 

         To give developers final control over the tuning

         of their own local build, the dev-context.xml file

         is processed last (note: dev-context.xml isn't

         part of the source tree itself). 

        

         For details, see:

         http://wiki.alfresco.com/wiki/Developer_Runtime_Configuration

    -->

    <import resource="classpath*:alfresco/extension/*-context.xml"/>

    <import resource="classpath*:alfresco/extension/dev-context.xml"/>

 

可以看到分层次地进行加载不同的 bean ,并且在后面提供可扩展的 bean 定义的引入,方便进行扩展,而不需要更变这个配置文件

 

继续一个个往下看,并把一些重要的 bean 配置拿出来:

core-services-context.xml 核心 bean 的配置

看到配置了 JMX 的服务

<!-- Custom MBeanServer -->

<bean id="alfrescoMBeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"/>

 

<bean id="registry"   class="org.springframework.remoting.rmi.RmiRegistryFactoryBean">

    <property name="port" value="${avm.remote.port}"/>

</bean>

<!-- MBeanServer Connector (registers itself with custom alfrescoMBeanServer) -->

<bean id="serverConnector"

      class="org.springframework.jmx.support.ConnectorServerFactoryBean"

      depends-on="registry">

 

    <property name="server"      ref="alfrescoMBeanServer"/>

    <property name="objectName" value="connector:name=rmi"/>

    <property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:${avm.remote.port}/alfresco/jmxrmi"/>

 

    <property name="environment">

        <map>

            <!-- The following keys are only valid when sun jmx is used -->

            <entry key="jmx.remote.x.password.file" value="${alfresco.jmx.dir}/alfresco-jmxrmi.password"/>

            <entry key="jmx.remote.x.access.file"   value="${alfresco.jmx.dir}/alfresco-jmxrmi.access"/>

        </map>

    </property>

</bean>

<!-- MBeans registered with alfrescoMBeanServer -->

<bean id="VirtServerRegistry"

      class="org.alfresco.mbeans.VirtServerRegistry"

      init-method="initialize">

 

JMX 服务暴露

<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">

  <property name="server" ref="alfrescoMBeanServer"/>

   <property name="beans">

     <map>

       <!-- MBeans to register with alfrescoMBeanServer -->

       <entry key="Alfresco:Name=VirtServerRegistry,Type=VirtServerRegistry" value-ref="VirtServerRegistry"/>

       <entry key="Alfresco:Name=FileServerConfig,Type=FileServerConfig" value-ref="FileServerConfig"/>

     </map>

   </property>

</bean>

 

同时暴露了 RMI 的服务

RMI

<!-- The RMI export of the repo remote transport. -->

<bean id="repoRemoteTransportRMI" class="org.springframework.remoting.rmi.RmiServiceExporter">

            <property name="service">

                        <ref bean="repoRemoteTransport"/>

            </property>

            <property name="serviceInterface">

                        <value>org.alfresco.service.cmr.remote.RepoRemoteTransport</value>

            </property>

            <property name="serviceName">

                        <value>repo</value>

            </property>

            <property name="registryPort">

                        <value>${avm.remote.port}</value>

            </property>

</bean>

 

验证 bean 配置,也是同时暴露了 RMI 的服务

authentication-services-context.xml

<!-- Here for now. Probably want remote-context.xml file. -->

<!-- The AuthenticationService exported as an RMI service. -->

<bean id="rmiAuthenticationService" class="org.springframework.remoting.rmi.RmiServiceExporter">

            <property name="service">

                        <ref bean="AuthenticationService"/>

            </property>

            <property name="serviceInterface">

                        <value>org.alfresco.service.cmr.security.AuthenticationService</value>

            </property>

            <property name="serviceName">

                        <value>authentication</value>

            </property>

            <property name="registryPort">

                        <value>${avm.remote.port}</value>

            </property>

</bean>

 

avm 里也暴露了 RMI 的服务

avm-services-context.xml

<!-- The RMI wrapper around the AVM remote interface. -->

 

<bean id="avmRemoteService" class="org.springframework.remoting.rmi.RmiServiceExporter">

            <property name="service">

                        <ref bean="avmRemoteTransport"/>

            </property>

            <property name="serviceInterface">

                        <value>org.alfresco.service.cmr.remote.AVMRemoteTransport</value>

            </property>

            <property name="serviceName">

                        <value>avm</value>

            </property>

            <property name="registryPort">

                        <value>${avm.remote.port}</value>

            </property>

</bean>

                       

<bean id="avmSyncServiceTransport" class="org.alfresco.repo.avm.AVMSyncServiceTransportImpl">

    <property name="authenticationService">

        <ref bean="AuthenticationService"/>

    </property>

    <property name="avmSyncService">

        <ref bean="AVMSyncService"/>

    </property>

</bean>

                       

<bean id="avmSyncServiceTransportRMI" class="org.springframework.remoting.rmi.RmiServiceExporter">

    <property name="service">

        <ref bean="avmSyncServiceTransport"/>

    </property>

    <property name="serviceInterface">

        <value>org.alfresco.service.cmr.remote.AVMSyncServiceTransport</value>

    </property>

    <property name="serviceName">

        <value>avmsync</value>

    </property>

    <property name="registryPort">

        <value>${avm.remote.port}</value>

    </property>

</bean>

 

通过上面的 JMX 与 RMI 暴露在不同的配置文件里可以看到,如果我要去掉 JMX 或 RMI 服务的话,需要修改 N 个的配置文件,实在是麻烦。

建议要二次开发时根据需要进行整理,合并到一个文件里进行暴露即可,或者没有需要的话就直接 delete 掉这些:)

 

而且这个 JMX RMI 服务的暴露,导致你不能仅重启应用就可以,而非得重启整个应用服务器才行,要不然会报服务已启动,即默认的端口50500被占用了,而整个应用启动不了,麻烦。除非你在重启应用之前再去修改一下配置文件里的端口号,呵呵。

 

不过,最终的解决办法是象我在 Jmx4Log4J 里那样自己去再封装一个获取端口号的类,发现有人用了,就找下一个:)这样就OK了。

 

core-services-context.xml

<!-- Datasource bean -->

数据库连接池用的居然是 org.apache.commons.dbcp.BasicDataSource ,大家自己改吧 c3p0 等等

 

邮件

<!-- MAIL SERVICE           -->

<bean id="mailService" class="org.springframework.mail.javamail.JavaMailSenderImpl">

 

Lucene 索引和搜索 API

     <!-- Indexing and Search API -->

    <bean id="indexerComponent" class="org.alfresco.repo.search.IndexerComponent">

    <bean id="searchService" class="org.alfresco.repo.search.SearcherComponent">

 

    <!-- Indexer and searchers for lucene -->

    <bean id="luceneIndexerAndSearcherFactory"

        class="org.alfresco.repo.search.impl.lucene.LuceneIndexerAndSearcherFactory2">

 

    <!-- Indexer and searchers for lucene -->

    <bean id="luceneCategoryService" class="org.alfresco.repo.search.impl.lucene.LuceneCategoryServiceImpl">

 

    <!-- Lock Service           -->

    <bean id="lockService" class="org.alfresco.repo.lock.LockServiceImpl" init-method="initialise">

 

版本控制

    <!-- Version Service   -->

    <bean id="versionService" class="org.alfresco.repo.version.VersionServiceImpl" init-method="initialise">

 

数据库

    <!-- Data Dictionary -->

    <bean id="dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="resourceBundles">

        <property name="models">

            <list>

                <!-- System models -->

                <value>alfresco/model/dictionaryModel.xml</value>

                <value>alfresco/model/systemModel.xml</value>

                <value>org/alfresco/repo/security/authentication/userModel.xml</value>

 

                <!-- Content models -->

                <value>alfresco/model/contentModel.xml</value>

                <value>alfresco/model/bpmModel.xml</value>

                <value>alfresco/model/wcmModel.xml</value>

                <value>alfresco/model/forumModel.xml</value>

 

                <!-- Content models -->

                <value>alfresco/model/applicationModel.xml</value>

                <value>alfresco/model/wcmAppModel.xml</value>

               

                <!-- Implementation models -->

                <value>org/alfresco/repo/action/actionModel.xml</value>

                <value>org/alfresco/repo/rule/ruleModel.xml</value>

                <value>org/alfresco/repo/version/version_model.xml</value>

               

                <!-- Deprecated types -->

                <value>alfresco/model/deprecated/deprecated_contentModel.xml</value>

            </list>

        </property>

        <property name="labels">

            <list>

                <value>alfresco/model/dataTypeAnalyzers</value>

                <value>alfresco/messages/system-model</value>

                <value>alfresco/messages/dictionary-model</value>

                <value>alfresco/messages/content-model</value>

                <value>alfresco/messages/bpm-messages</value>

                <value>alfresco/messages/application-model</value>

                <value>alfresco/messages/forum-model</value>

            </list>

        </property>

    </bean>

 

拷贝

    <!-- Copy Service    -->

    <!-- Note this uses the node service that enforces permissions so you can only copy what you can see -->

    <bean id="copyService" class="org.alfresco.repo.copy.CopyServiceImpl" init-method="init">

 

检出 / 检入

    <!-- CheckOut/CheckIn Service -->

    <bean id="checkOutCheckInService" class="org.alfresco.repo.coci.CheckOutCheckInServiceImpl">

 

全文搜索

    <!-- Bean to support full text search -->

    <bean id="LuceneFullTextSearchIndexer"

        class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">

 

Lucene 索引文件备份

    <!-- Bean to backup Lucene indexes -->

   <bean id="luceneIndexBackupComponent"

          class="org.alfresco.repo.search.impl.lucene.LuceneIndexerAndSearcherFactory2$LuceneIndexBackupComponent">

 

    <!-- Registry service -->

    <bean id="registryService" class="org.alfresco.repo.admin.registry.RegistryServiceImpl" init-method="init">

 

    <!-- A Simple Filesystem like API for the repo implementation.

                 Unfinished, experimental, and probably ephemeral. -->

    <bean id="repoRemoteService" class="org.alfresco.repo.remote.RepoRemoteService">

 

            <!-- Transactionally wrapped version of above. -->

    <bean id="RepoRemoteService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">

public-services-context.xml

当中引入了

    <import resource="classpath:alfresco/public-services-security-context.xml"/>

public-services-security-context.xml 安全认证相关

使用的是 Acegi 组件,当中引入了

    <import resource="classpath:alfresco/cache-context.xml" />

 

cache-context.xml Cache 相关的,使用的是 EHCache

   <bean name="transactionalEHCacheManager" class="org.alfresco.repo.cache.EhCacheManagerFactoryBean">

      <property name="configLocation">

         <value>classpath:alfresco/ehcache-transactional.xml</value>

      </property>

   </bean>

public-services-context.xml

    <!-- Service Registry -->

    <bean id="ServiceRegistry" class="org.alfresco.repo.service.ServiceDescriptorRegistry"/>

 

基本上服务都从这里注入并从中获取,树结构,当中有Spring Bean Factory

 

model-specific-services-context.xml

   <!-- File/folder specific service -->

   <bean name="fileFolderService" class="org.alfresco.repo.model.filefolder.FileFolderServiceImpl" init-method="init">

 

   <bean name="tempFileMarkerInterceptor" class="org.alfresco.repo.model.filefolder.TempFileMarkerInterceptor">

 

   <!-- Multilingual specific service -->

   <bean name="multilingualContentService" class="org.alfresco.repo.model.ml.MultilingualContentServiceImpl">

action-services-context.xml Action 相关的

用 Thread local containing the current action chain

    <!-- Action Service -->

    <bean id="actionService" class="org.alfresco.repo.action.ActionServiceImpl">

rule-services-context.xml 规则、触发规则服务

<!-- Rules Service -->

<bean id="ruleService" class="org.alfresco.repo.rule.RuleServiceImpl">

<!-- Rules Aspect -->

<bean id="rulesAspect" class="org.alfresco.repo.rule.RulesAspect" init-method="init">

<!-- Rule triggers -->

<bean id="rule-trigger-base" abstract="true" init-method="registerRuleTrigger">

node-services-context.xml 节点相关服务

<!-- Beans pertinent to node persistence and services -->

scheduled-jobs-context.xml 定时任务

<!-- Task scheduler -->

<!-- Triggers should not appear here - the scheduler should be injected into the trigger definition -->

<!-- This bean should not need to apear else where in extension configuration -->

<bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">

    <property name="waitForJobsToCompleteOnShutdown">

        <value>true</value>

    </property>

    <property name="configLocation">

        <value>classpath:alfresco/domain/quartz.properties</value>

    </property>

    <property name="schedulerName">

        <value>DefaultScheduler</value>

    </property>

</bean>

 

# Quartz thread settings 默认的线程优先级为 3

org.quartz.threadPool.threadPriority=3

network-protocol-context.xml 网络相关的服务

需要相关的文件配置信息在 file-servers.xml

content-services-context.xml 内容相关的服务

MIME OpenOffice PDF Mail MP3 ...

hibernate-context.xml Hibernate 的映射配置文件

<!-- load hibernate configuration properties -->   

<bean id="hibernateConfigProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">

    <property name="locations">

        <list>

            <value>classpath:alfresco/domain/hibernate-cfg.properties</value>

        </list>

    </property>

</bean>

<!-- load hibernate entity cache strategies -->   

<bean id="cacheStrategiesPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">

    <property name="ignoreUnresolvablePlaceholders">

        <value>true</value>

    </property>

    <property name="locations">

        <list>

            <value>classpath:alfresco/domain/cache-strategies.properties</value>

        </list>

    </property>

</bean>

 

<!-- Hibernate session factory -->

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" parent="sessionFactoryBase">

 

<!-- Hibernate session factory -->

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" parent="sessionFactoryBase">

    <property name="dataSource">

        <ref bean="dataSource"/>

    </property>

</bean>

<bean id="sessionFactoryBase" abstract="true">

    <property name="hibernateProperties" ref="hibernateConfigProperties"/>

    不同的Cache策略

    <property name="entityCacheStrategies">

    <property name="collectionCacheStrategies">

ownable-services-context.xml

Ownership service support. Use in permissions framework as dynamic authority.

<bean id="ownableService" class="org.alfresco.repo.ownable.impl.OwnableServiceImpl">

template-services-context.xml 模板引擎 freemarker

script-services-context.xml 脚本引擎 Rhino JavaScript engine.

index-recovery-context.xml 索引校验与恢复

<!-- index recovery and validation -->

<!--

 Recovery types are:

     NONE:     Ignore

     VALIDATE: Checks that the last transaction for each store is represented in the indexes

     AUTO:     Validates and auto-recovers if validation fails

     FULL:     Full index rebuild, processing all transactions in order. The server is temporarily suspended.

-->

<bean

     id="indexRecoveryComponent"

     class="org.alfresco.repo.node.index.FullIndexRecoveryComponent"

     parent="indexRecoveryComponentBase">

 <property name="recoveryMode">

      <value>${index.recovery.mode}</value>

 </property>

</bean>

 

<!-- Bean that attempts to index content that was previously missing -->

<bean

     id="missingContentReindexComponent"

     class="org.alfresco.repo.node.index.MissingContentReindexComponent"

     parent="indexRecoveryComponentBase">

</bean>

authority-services-context.xml 授权服务

<!-- The configuration of the Authority Service Implementation -->

<!-- This implementation supports the identification of users as admin users. -->

<!-- It also supports groups and allows groups and users to be arranged into -->

<!-- hierarchies.                                                             -->

 

<bean id="authorityService" class="org.alfresco.repo.security.authority.AuthorityServiceImpl">

    <!-- A list of users with admin rights.                               -->

    <!--                                                                  -->

    <!-- If the security framework is case sensitive these values should -->

    <!-- be case sensitive user names. If the security framework is not   -->

    <!-- case sensitive these values should be the lower-case user names. -->

    <!--                                                                  -->

    <!-- By default this includes:                                        -->

    <!--    admin (the user name of default alfresco admin user)          -->

    <!--    administrator (the windows default admin user)                -->

    <!--                                                                  -->

    <!-- This assumes that user names are not case sensitive.             -->

    <!--                                                                  -->

    <property name="adminUsers">

        <set>

                                    <value>admin</value>

                                    <value>administrator</value>

                        </set>

    </property>

 

<!-- Authority DAO that stores group information along with user information, -->

<!-- in the repository.                                                       -->

<!--                                                                          -->

<!-- This bean uses the userToAuthorityCache configured in cache-context.xml -->

<!--                                                                          -->

<bean id="authorityDAO" class="org.alfresco.repo.security.authority.AuthorityDAOImpl">  

authentication-services-context.xml 验证 Acegi

<!-- This file contains the bean definitions that support authentication -->

policy-context.xml 策略服务

<!-- Policy Support -->

import-export-context.xml 导入导出服务

bootstrap-context.xml 系统启动的初始化工作

如:数据库、AVM、文件服务器、FTP、NFS、CIFS等等。。。

Repository Bootstrap Sequence.

<!-- ensure that the schema is bootstrapped -->

<bean id="schemaBootstrap" class="org.alfresco.repo.domain.schema.SchemaBootstrap">

 <property name="localSessionFactory">

     <ref bean="&amp;sessionFactory"></ref> <!-- inject the actual factory, not a session -->

 </property>

workflow-context.xml 工作流相关的服务,JBPM

<!-- Workflow Service Implementation -->

 

jcr-api-context.xml 实现JCR 170相关的API,即1.0版本的API

Alfresco implementation of a JCR Repository

avm-services-context.xml AVM相关服务,以及一堆的DAO

<!-- ID Issuers. -->

 

<!-- DAOs for persistent data types -->

<!-- Issuers are not actual entities. More like pseudo entities. -->

avm-console-context.xml

<!-- Use substitution values in this config. -->

 

avm-console.properties 默认配置为本地MySQL的数据库

# Database specifics.

db.driver=org.gjt.mm.mysql.Driver

db.url=jdbc:mysql://127.0.0.1/avm

db.username=root

db.password=

db.pool.initial=4

db.pool.max=32

# Hibernate properties

hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect

hibernate.current_session_context_class=thread

hibernate.connection.isolation=2

hibernate.default_batch_fetch_size=16

hibernate.jdbc.batch_versioned_data=true

hibernate.cache.use_second_level_cache=true

hibernate.hbm2ddl.auto=update

# AVM specific properties.

 

    <import resource="file:config/alfresco/avm-base-context.xml"/>

audit-services-context.xml

<!-- Base audit service - non TX -->

<bean id="auditService" class="org.alfresco.repo.audit.AuditServiceImpl">

    <property name="auditComponent">

        <ref bean="auditComponent"/>

    </property>

</bean>

 

<!-- Audit component -->

<bean id="auditComponent" class="org.alfresco.repo.audit.AuditComponentImpl">

其后在 application-context.xml 还加载了

<import resource="classpath*:alfresco/patch/*-context.xml"/>一堆Patch,呵呵

patch-services-context.xml

<import resource="classpath*:alfresco/domain/*-context.xml"/>其它的。。。

 

<import resource="classpath*:alfresco/module-context.xml"/>

module-context.xml 加载其它的模块Bean

最后加载一些扩展与二次开发的Bean

<import resource="classpath*:alfresco/extension/*-context.xml"/>

<import resource="classpath*:alfresco/extension/dev-context.xml"/>

 

同时覆盖掉想覆盖的Bean,后面覆盖前面的,Map嘛。比如: custom-repository-context.xml 里的属性配置、资源配置、事务配置等



三、配置安装时的注意事项

1、要将 Alfresco 默认安装使用的数据库HSQL转换为MqSQL的话,只需要删掉三个 HSQL 使用的文件:

这三个文件分别是 tomcat/shared/classes/alfresco/extension 目录下的

            custom-db-and-data-context.xml

            custom-db-connection.properties

            custom-hibernate-dialect.properties

为了产生一个MySQL数据库,执行 <alfresco_installation_folder>/extra/database/mysql ,运行 db_setup.bat 文件,或者打开文件,手工输入命令也一样。

就会产生一个与一个使用者一起命名 alfresco 的 MySQL 数据库帐户和一个 alfresco 的密码。

 

2、国际化

alfresco的文件路径为: WEB-INF/classes/alfresco/messages 下面包含了一堆文件,一个个去国际化吧,当然用插件、Native2ASCII或配合ANT都可以。

Eclipse 的 PropertiesEditor 插件不错。

 

3、无论从一种数据库切换到另一种数据库,都要记得把 repository.properties 配置文件里 dir.root 所在的目录下的文件删除干净,要不然会出问题。

比如:Caused by: org.alfresco.repo.search.SearcherException: More than one root node in index: 2

#dir.root=./alf_data

 

4、将 Win32NetBIOS.dll 拷贝到 %JAVA_HOME%/jre/bin/ 目录下 或者 %TOMCAT_HOME%/bin 目录下

 

5、不要 ScriptService 的话,可以在 public-services-context.xml 中

注释掉 ScriptService 和 ScriptService_transaction

<!-- Script Service -->

<!--

<bean id="ScriptService" class="org.springframework.aop.framework.ProxyFactoryBean">

...

<bean id="ScriptService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">

...

-->

 

6、查看 Hibernate 的 SQL

            修改 log4j.properties

            在 log4j.logger.org.hibernate 下增加一行,即可

            log4j.logger.org.hibernate.SQL=debug

 

7、发现启动报 "Ensure that the 'dir.root' property is pointing to the correct data location." ... 之类的错误时可以在 repository.properties 配置文件里将 strict 设置为 false

# Change the failure behaviour of the configuration checker

system.bootstrap.config_check.strict=false

不过,设置后很有可能可以启动,但是仍是登录不了之类的,要小心。

如果用的是HSQL的话,最好把 alf_data/hsql_data 下面的 alfresco.propertiesalfresco.script 恢复成原来的,并删除其它的文件,再重启就可以了。

 

8、第 7 条,仍报错 ERROR [repo.admin.ConfigurationChecker] CONTENT INTEGRITY ERROR: Indexes not found for 5 stores. 的话,设置为全部索引,并按第 3 条所说的删除文件,或者直接就换个文件夹,不要用默认的文件夹名称,并删除数据库的内容(所有的表以及HIBERNATE_SEQUENCE),并重启即可。

在 repository.properties 中设置

index.recovery.mode=FULL

 

9、如果是强行关闭掉Tomcat之类后,马上启动Tomcat的话,有可能会报错

IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.alfresco.web.ui.common.component.UIListItem

过一会儿再启动就没有问题了。

 

10、Alfresco 2.0 需要 JDK 1.5_07 以上的版本,这个也要注意。

 

11、用户名大小字问题,可以在 repository.properties 进行设置

# Are user names case sensitive?

user.name.caseSensitive=true

设置为 true ,大小写敏感,默认为 false

 

12、关闭FTP服务,在 bootstrap-context.xml 配置中注释掉它就可以了。file-servers.xml里保存相关的配置信息

<!-- FTP Server -->

<!--

<bean id="ftpServer" class="org.alfresco.filesys.FTPServer" destroy-method="stopServer">

    <constructor-arg>

       <ref local="fileServerConfiguration"/>

    </constructor-arg>

</bean>

-->

或者也可以在 file-servers.xml 文件中设置 <serverEnable enabled="false"/>

 

13、关闭CIFS服务

在 file-servers.xml 文件中设置 <serverEnable enabled="false"/> 即可。

四、数据库模型

可以看附件,有包含JBPM的与不包含JBMP的两个数据库

五、相关资料

Java Content Repository API 简介 学习 JSR-170 如何使构建 CMA 变得轻而易举

http://www.ibm.com/developerworks/cn/java/j-jcr/

 

国外厂商纷纷投入开源界 自述其中原因,此文重点介绍 Alfresco 的相关信息。

http://dotnet.csdn.net/n/20060206/86350.html

六、开发与代码分析

1、换 Web Services 的实现方式由 AXIS 换到 XFire

  Codehaus XFire is a next-generation java SOAP framework. Codehaus XFire makes service oriented development approachable through its easy to use API and support for standards. It is also highly performant since it is built on a low memory StAX based model.

 

==============================================================

代码分析有时间再继续整理上来

 

Category由id,title,description组成

            public Category(org.alfresco.webservice.types.Reference id,java.lang.String title,java.lang.String description)

 

Classification

            public Classification(java.lang.String classification,org.alfresco.webservice.types.Category rootCategory,java.lang.String title,java.lang.String description)

 

Reference

            public Reference(org.alfresco.webservice.types.Store store,java.lang.String uuid,java.lang.String path)

 

AppliedCategory

            public AppliedCategory(java.lang.String classification,org.alfresco.webservice.types.Reference[] categories)

 

ClassDefinition

            public ClassDefinition(java.lang.String name,java.lang.String title,java.lang.String description,java.lang.String superClass,boolean isAspect,org.alfresco.webservice.types.PropertyDefinition[] properties,org.alfresco.webservice.types.AssociationDefinition[] associations)

 

 附件下载:

1、Alfresco Database Model

2、Alfresco2.0

时间: 2024-09-19 09:57:08

Alfresco 2.0 解读的相关文章

可口可乐在线火炬传递活动的营销2.0解读

受众互动参与·品牌蔓延扩散 ----可口可乐在线火炬传递活动的营销2.0解读 ★曹芳华(厦门大学2006级广告与品牌硕士) 2008年3月24日,北京奥运圣火在奥运会的发源地--距离雅典370公里处的古奥林匹亚遗址上点燃.就在同一天,笔者的QQ突然弹出一个火炬形的消息,习惯性的打开对话框,发现是好友在邀请参加可口可乐的在线奥运火炬传递活动.毫不犹豫的接受了邀请后,笔者发现,自己又可以向另一位在线的好友发出邀请.凭借如此循环的邀请参与方式,截至2008年3月31日20时19分,已经有8,271,0

专访张伟钦:趋势科技云计算安全5.0解读

本文讲的是专访张伟钦:趋势科技云计算安全5.0解读,9月2日消息,日前,趋势科技在京发布了其云计算安全5.0解决方案,趋势科技全球研发长暨大中华区执行副总裁张伟钦接受了媒体的采访,并就趋势科技云计算安全5.0.虚拟化安全等问题回答了媒体的提问. ▲趋势科技全球研发长暨大中华区执行副总裁张伟钦 张伟钦首先介绍到,趋势科技从2004年开始做的时候根本没有云这个概念,那时候就是因为资料太大.病毒太多有没有方法解决,是很单纯的概念.我们就想如何能帮客户抓到病毒而且更快,那时候病毒的数量太多了.有没有一种

可口可乐奥运火炬接力营销方案的营销2.0解读

奥运圣火激情传递,可口可乐红遍全球----可口可乐奥运火炬接力营销方案的营销2.0解读 ★曹芳华(厦门大学2006级广告与品牌硕士) 2008年3月24日,北京奥运圣火在奥运会的发源地--距离雅典370公里处的古奥林匹亚遗址上点燃.奥运会圣火火种于3月31日上午抵达中国首都北京,当天在天安门广场举行圣火抵达北京欢迎仪式暨火炬接力启动仪式.奥运火炬从2008年4月1日起,开始从境外19个国家传递,最终将于8月6日回到北京. 随着奥运圣火的点燃以及2008北京奥运会的临近,人们在关注奥运火炬传递活动

PostgreSQL 10.0 解读

背景 本文参考当前的release notes以及git, committe fest编写,10.0还没有正式release,部分内容在正式release时可能会修改,同时会新增新的内容. 迁移到10.0的注意事项 迁移时,请注意不兼容的地方. 1. 使用pg_upgrade升级时,hash index 需要重建.(因为10.0为了支持hash index WAL,存储结构改变了.) 2. $PGDATA/pg_log, pg_xlog, pg_clog目录分别重命名为log, pg_wal,

蓝牙5.0解读 挑战ZigBee抢夺IoT市场

Bluetooth 5预计于2016年末至2017年初发布,其在低功耗连接的距离与速度将各自提升4倍和2倍,而无连接式的广播数据传输量將提升八倍. 蓝牙技术联盟(BluetoothSIG)一举将BT5的峰值传输速率从1Mbits/s提高到2Mbits/s,连接范围也从30公尺延伸到100公尺.根据BluetoothSIG在正式发布BT5与网状网络规格时指出,这些增强的功能以及更大的广播数据传输量,将使"我们从「app与设备配对」(app-paired-to-device)的模式转向「非联机式」(

绿萝算法2.0也许只是手动工作的一个行动代号

前两天看到百度站长平台lee在7月5日发布了绿萝算法2.0解读,文中说明了绿萝算法2.0针对的重点对象以及惩罚的方式,   最后还罗列了一些软文发布站和软文交易平台,其中包括比较有名的链接和软文交易平台阿里微微以及非常常见的软文发布站千龙网.那么,绿萝算法2.0到底是个什么东西?算法的运行会给站长们带来什么影响?我也来说说我的看法. 新网站的推广以及种种网络营销方式几乎离不开软文.通过在大量高权重高PR的网站发布软文能快速让网民了解到要推广的内容,迅速扩大推广内容知名度.但是这对搜索引擎的工作是

百度绿萝算法2.0更新 外链数降低分析

自百度绿萝算法2.0更新后,引来了很多站长对这次算法的讨论.重点是如何做外链.网站内部优化是否会全权代替外链.软文外链是否还要坚持做下去.正当站长们讨论的热火朝天的时候,以为百度打击的是那些以发布推广性软文的新闻源站点,不以为然的相信像我们这种中小型站点不会受到影响. 今天发现运营的网站中有被降权的,除了震惊之外,更多的是思考,立即就查了一下网站收录数.外链数.site是否在首页.快照.关键词排名,发现外链数下降,关键词排名下降.笔者就外链这一点来跟大家探讨下,百度绿萝算法2.0更新,影响外链数

企业2.0的三重境界

作者@王宝明(智士联合创始人) 引言: 互联网已经完全地改变了我们的生活习惯,特别是Web2.0的应用,已经深入的渗透进了我们的购物.娱乐.学习等方方面面.同时随着社交网站.智能终端.云计算的普及,越来越多的企业开始尝试.实践互联网优秀实践的企业商业化应用. 安德鲁·麦卡菲(Andrew McAfee)在2006年提出企业2.0(Enterprise2.0)一词,并且定义为:企业2.0是企业自发性社会化软件平台,或者企业与其客户.合作伙伴及供应商之间的自发性社会化软件平台. 经过四年多个国际化企

百度绿萝算法2.0更新 重点打击推广性软文

中介交易 http://www.aliyun.com/zixun/aggregation/6858.html">SEO诊断 淘宝客 云主机 技术大厅 站长网(www.admin5.com)7月2日消息,昨日百度发出绿萝算法2.0更新公告.这次绿萝算法2.0主要是针对推广性软文,对于一些软文交易区会带来一些影响.具体公告如下: 亲爱的站长朋友们: 大家好! 针对一些网站到处发布推广性软文的现象,一直以来我们都在通过各种方式进行处理.一方面,过滤清理这种垃圾外链;另一方面,对目标站点进行适当惩