Alfresco 2.0 解读
关键字: AlfrescoAlfresco 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 包里,晕,不是很好的做法啊。
......................
在这里编辑太慢了而且比较乱,索性还是自己做成PDF上传了
评论
1、把相关的JMX删除或者进行某种方式的变通;
2、修改模板文件的引入方式后可以了。
WebLogic也真的是弄巧成拙啊。把Web的其它相关的文件打成jar,导致访问出错,呵呵,比较有意思,而且发现在Windows与Solaris下都不一样。
先点着位,有事。。。完整的待续。
不好意思,现在才整理好了,放上来,内容如下:
WebLogic生成的_wl_cls_gen.jar只是把Web应用程序里的classes目录下的内容都进去成一个jar包,为了读取二进制文件更加快速?
你可以在%DOMAIN_HOME%/servers/AdminServer/tmp/_WL_user 目录下相应的Web应用程序里的/war/WEB-INF/lib/目录中找到它,打开它来看就知道里面的内容了。
正由于这样,而导致了ClassLoader.gtResource("...")之类的取不到值了。
ClassLoader loader = Thread.currentThread().getContextClassLoader();
loader.getResource("xxx").toURI().getPath(); // 这里的取值就为null了。
我跟踪到SUN的JDK里,里面的RMI实现是:
FileInputStream fin = new FileInputStream(fname);
于是产生了异常:
java.io.FileNotFoundException: class path resource [alfresco/templates/api] cannot be resolved to absolute file path because it does not reside in the file system: zip:C:/BEA92/user_projects/domains/sdpf_cms_test/./servers/AdminServer/tmp/_WL_user/_appsdir_alfresco2.0.0_war/kvnyug/war/WEB-INF/lib/_wl_cls_gen.jar!/alfresco/templates/api/
这样造成是从_wl_cls_gen.jar!/alfresco/templates/api/里面去找文件,哪里找得到?
但是,如果是目录部署的话,就可以找到。
所以你可以去修改JDK里的RMI实现去。。。,哈哈哈,不可能的吧:)为了这个。
private static Properties propertiesFromFile(String fname) throws IOException
{
FileInputStream fin = new FileInputStream(fname);
Properties p = new Properties();
p.load(fin);
fin.close();
return p;
}
这是JDK里面的实现com.sun.jmx.remote.security.MBeanServerFileAccessController.java的实现
权宜之计有两步骤要做:
一、模板文件加载的问题
1、org.alfresco.web.api.TemplateClassPathSet.java 中 afterPropertiesSet() 方法注释掉所有的代码
2、org.alfresco.web.api.APITemplateProcessor.java 中 initConfig() 方法,在
config.setCacheStorage(new MruCacheStorage(20, 100));
下增加如下代码
config.setClassForTemplateLoading(this.getClass(),"../../../../alfresco/templates");
二、JMX的问题
1、org.alfresco.util.RuntimeSystemPropertiesSetter.java 中 postProcessBeanFactory()
修改它的实现,先把文件InputStream出来,存到一个临时的物理文件,再将这个路径传回给它。
要不然,默认的JMX实现是根据绝对路径来取的,就产生了错误。
2、直接在配置文件里去掉JMX相关的服务,就没有问题了。
重新编译打包部署即可。
so, we should run < jar xvf alfresco.war > to alfresco directory first, then deploy it. Don't deploy alfresco.war directly.
After that, start WebLogic server, will be work smoothly.
FYI.
Resource:
http://wiki.alfresco.com/wiki/Install_BEA_Weblogic
- 浏览: 581409 次
- 性别:

- 来自: 福建莆田@广州

- 详细资料
搜索本博客
我的相册
共 146 张
最近加入圈子
链接
- 超越黎明
- CJSDN
- CSDN
- JavaWorld@TW
- JavaEye
- Spring中文论坛
- Matrix
- BEA dev2dev
- Agile Tao Forum
- Flickr
- developerWorks
- TheServerSide
- Sun Java Forum
- JavaRanch
- 满江红开源
- del.icio.us
- Sun中国技术社区
- 希赛网中国软考
- AJAX Design Patterns
- CSS: The Missing Manual
- Java Persistence with Hibernate
- Script in Java
- Building Spring 2 Enterprise Applications
- Tuscany中文社区
- 我爱人开的购物店,欢迎光临
最新评论
-
如何正确地在Axis、Axis2 ...
xly_971223 写道问一下用多少网站在真正的用web sevice?有多少 ...
-- by 咖啡舞者 -
如何在JavaScript中实现某 ...
afcn0 写道首先js是单线程的,lz的想法就不对,那是多线程,现在基本除了X ...
-- by andyhu1007 -
Script in Java中文版Java ...
司令很强大啊,呵呵
-- by fantasybei -
BEAer Last Day, Tomorrow ...
祝福司令, Bea亲密接触快一年了吧? 有什么感言呢? 和大家share一下吧 ...
-- by beckdim -
再叫我“小英雄”,我就揍 ...
有个小英雄好像被保送清华了
-- by beckdim






评论排行榜