在我们的门户项目中,使用了BEA Portal 9.2 的内容库作为信息发布系统,9.2版本中有工作流审批,但需要启动库服务,由于内容库库服务默认情况是不启动的,所以每次服务器重启后,还要到portalAdmin console中启动它,为此感觉到很不方便,为了能够使它默认启动,可以设置它的库服务属性。
首先要在你的工程ear\EarContent\META-INF中找到一个叫content-config.xml的文件,它是内容库的配置文件,在其中添加如下红色部分,即可实现库服务随服务器启动。
<?xml version="1.0" encoding="UTF-8"?>
<content-config xmlns="http://www.bea.com/ns/portal/90/content-config">
<!-- This is a default content repository applications can use.
The IDE should copy this to META-INF/content-config.xml of the
application.
This repository is not required for WLP services, so you can remove
it or change it as needed. -->
<content-store>
<name>BEA Repository</name>
<description>Default Content Repository Configuration</description>
<class-name>com.bea.content.spi.internal.ExtendedRepositoryImpl</class-name>
<repository-property>
<description>Data source to use.</description>
<name>CG_DATA_SOURCE</name>
<value>cgDataSource-nonXA</value>
</repository-property>
<repository-property>
<description>Enable repository events for search.</description>
<name>cm_fireRepositoryEvents</name>
<value>true</value>
</repository-property>
<repository-property>
<description>Library Services Enabled</description>
<name>MANAGEMENT_ENABLED</name>
<value>true</value>
</repository-property>
<read-only>false</read-only>
<binary-cache-max-entry-size>1024</binary-cache-max-entry-size>
<search-is-enabled>true</search-is-enabled>
<fulltext-search-is-enabled>true</fulltext-search-is-enabled>
<search-indexing-is-enabled>true</search-indexing-is-enabled>
</content-store>
</content-config>
其实content-config.xml还可以有很多项配置,比如跟autonomy相关的搜索选项,详细的文档可以到bea的edocs网站查看。