导读:
Jetspeed2.0最终release版本发布于2005年12月,可以从以下网址下载源代码和捆绑tomcat的压缩文件:http://www.apache.org/dist/portals/jetspeed-2/
。
与Jetspeed1.x比较,Jetspeed2.0 (以下简称J2)的架构发生了很大变化, J1.x使用了Turbine,在J2中Turbine不再使用,
而是使用了Spring Framework作为默认的组件框架,从官方的资料介绍看,J2架构支持将一种组件架构替换为别的组建架构如Pico,Spring仅仅是J2默认的Component Framework,从本节下文的叙述中可以看到替换的方式。
portlet 之间可以通过session等来进行交互。所以谈不上
“JSR 168没有定义portlet之间的事件模型”。 由于Jetspeed不是基于JSF的,所以它的门户上的链接是无状态的,也许独立的AJAX可以让它更容易被集成。
Jetspeed-2使用pluto作为Portlet 容器。
Jetspeed-2组件框架(Component Framework)的装配是通过JetspeedServlet(org.apache.jetspeed.engine.JetspeedServlet)进行配置和实现的,见下图:
JetspeedServlet在web.xml中配置,门户应用启动时即执行JetspeedServlet。JetspeedServlet中initializeComponentManager方法为给定的组件框架装载assemply(见WEB-INF/assembly),initializeComponentManager将spring framework作为默认的组件框架。并装配WEB-INF/assembly下的xml文件来初始化spring引擎。然后组件框架来创建JetspeedEngin:
engine = new JetspeedEngine(properties, applicationRoot, config,
initializeComponentManager(config, applicationRoot, properties));
下面是initializeComponentManager方法的代码:
protected ComponentManager initializeComponentManager(ServletConfig servletConfig, String appRoot, Configuration configuration) throws IOException
{
ServletConfigFactoryBean.setServletConfig(servletConfig);
// String relativeApplicationRoot = getRealPath("/");
String relativeApplicationRoot = appRoot;
String absApplicationRoot = new
File(relativeApplicationRoot).getCanonicalPath();
final String assemblyDir =
configuration.getString("assembly.dir","/WEB-INF/assembly");
final String assemblyFileExtension =
configuration.getString("assembly.extension",".xml");
String[] bootConfigs = new String[] {"/WEB-INF/assembly/boot/*.xml"};
String[] appConfigs =
new String[] {assemblyDir+"/*"+assemblyFileExtension};
ServletContext servletContext = servletConfig.getServletContext();
SpringComponentManager cm = new SpringComponentManager(bootConfigs,
appConfigs, servletContext, appRoot);
return cm;
}
如果我们需要用别的组件框架替代Spring framework,就要覆盖initializeComponentManager方法,就是指用别的ComponentManager替代SpringComponentManager。下面是CompomentManager相关的类图:
从上面的分析说明Jetspeed2的基础组架构是基于Spring组件的可伸缩的架构,Jetspeed2还有什么其他新的特性?
l
Jetspeed 2.0 的final release版本完全兼容Portlet规范1.0(JSR-168)。Jetspeed2.0是Java Portlet API的完整实现。
l
支持SSO(Single Sign-On)单点登录, 单点登录技术是一种认证和授权机制,它允许注册用户只需要在任一成员网站上登录一次,而后授权访问其他连接的分支网站,无需再进行登录。
l
Jetspeed-Bridge使Jetspeed可以集成Struts,JSF,PHP,Perl,Velocity,WebWork开发的应用。可以将Struts Action、Velocity模板、Perl脚本、PHP脚本等以Portlet的形式展现,这对旧系统的移植将很有帮助。JetSpeed 2.0还实现了一组常用的示例Portlet,包括日历、书签等小工具。
l
可配置的管道请求处理器(Pipeline Request Processor)。管道可把一些访问的请求根据参数,分配给portlet的容器。
l
JAAS数据库安全策略。
l
Jetspeed支持AJAX XML API。
l
portlet应用的自动部署。
l
基于LDAP及数据库实现的安全组件。为用户认证提供LDAP支持。
l
开发者可使用Jetspeed PSML语言装配portlets。
l
门户内容管理和导航:页面、菜单、文件夹、链接。
l
多线程的聚合引擎。
l
集成主流的数据库:Derby, MySQL, MS SQL, Oracle, Postgres, DB2
l
国际化支持
l
统计日志引擎。
l
Portlet注册
l
使用Lucene对Portlet组件进行全文搜索。
l
用户注册功能
l
遗忘密码获取功能
l
丰富的登录和口令配置管理功能
l
基本页面定制
l
管理Portlet:
-
用户、角色、组、密码和Profile管理
-
JSR168 用户属性编辑器
-
Portlet应用和生命周期管理
-
Profiler系统管理
-
统计报表
门户设计的特征:
l
可部署Jetspeed Portlet和页面皮肤(Decorators)CSS组件。
l
可配置的CSS页面外观(Layouts)。
l
很容易为皮肤和Layouts组件使用Velocity宏语言
本文转自
http://soa.5d6d.com/redirect.php?fid=9&tid=9&goto=nextoldset
Jetspeed2.0最终release版本发布于2005年12月,可以从以下网址下载源代码和捆绑tomcat的压缩文件:http://www.apache.org/dist/portals/jetspeed-2/
。
与Jetspeed1.x比较,Jetspeed2.0 (以下简称J2)的架构发生了很大变化, J1.x使用了Turbine,在J2中Turbine不再使用,
而是使用了Spring Framework作为默认的组件框架,从官方的资料介绍看,J2架构支持将一种组件架构替换为别的组建架构如Pico,Spring仅仅是J2默认的Component Framework,从本节下文的叙述中可以看到替换的方式。
portlet 之间可以通过session等来进行交互。所以谈不上
“JSR 168没有定义portlet之间的事件模型”。 由于Jetspeed不是基于JSF的,所以它的门户上的链接是无状态的,也许独立的AJAX可以让它更容易被集成。
Jetspeed-2使用pluto作为Portlet 容器。
Jetspeed-2组件框架(Component Framework)的装配是通过JetspeedServlet(org.apache.jetspeed.engine.JetspeedServlet)进行配置和实现的,见下图:
JetspeedServlet在web.xml中配置,门户应用启动时即执行JetspeedServlet。JetspeedServlet中initializeComponentManager方法为给定的组件框架装载assemply(见WEB-INF/assembly),initializeComponentManager将spring framework作为默认的组件框架。并装配WEB-INF/assembly下的xml文件来初始化spring引擎。然后组件框架来创建JetspeedEngin:
engine = new JetspeedEngine(properties, applicationRoot, config,
initializeComponentManager(config, applicationRoot, properties));
下面是initializeComponentManager方法的代码:
protected ComponentManager initializeComponentManager(ServletConfig servletConfig, String appRoot, Configuration configuration) throws IOException
{
ServletConfigFactoryBean.setServletConfig(servletConfig);
// String relativeApplicationRoot = getRealPath("/");
String relativeApplicationRoot = appRoot;
String absApplicationRoot = new
File(relativeApplicationRoot).getCanonicalPath();
final String assemblyDir =
configuration.getString("assembly.dir","/WEB-INF/assembly");
final String assemblyFileExtension =
configuration.getString("assembly.extension",".xml");
String[] bootConfigs = new String[] {"/WEB-INF/assembly/boot/*.xml"};
String[] appConfigs =
new String[] {assemblyDir+"/*"+assemblyFileExtension};
ServletContext servletContext = servletConfig.getServletContext();
SpringComponentManager cm = new SpringComponentManager(bootConfigs,
appConfigs, servletContext, appRoot);
return cm;
}
如果我们需要用别的组件框架替代Spring framework,就要覆盖initializeComponentManager方法,就是指用别的ComponentManager替代SpringComponentManager。下面是CompomentManager相关的类图:
从上面的分析说明Jetspeed2的基础组架构是基于Spring组件的可伸缩的架构,Jetspeed2还有什么其他新的特性?
l
Jetspeed 2.0 的final release版本完全兼容Portlet规范1.0(JSR-168)。Jetspeed2.0是Java Portlet API的完整实现。
l
支持SSO(Single Sign-On)单点登录, 单点登录技术是一种认证和授权机制,它允许注册用户只需要在任一成员网站上登录一次,而后授权访问其他连接的分支网站,无需再进行登录。
l
Jetspeed-Bridge使Jetspeed可以集成Struts,JSF,PHP,Perl,Velocity,WebWork开发的应用。可以将Struts Action、Velocity模板、Perl脚本、PHP脚本等以Portlet的形式展现,这对旧系统的移植将很有帮助。JetSpeed 2.0还实现了一组常用的示例Portlet,包括日历、书签等小工具。
l
可配置的管道请求处理器(Pipeline Request Processor)。管道可把一些访问的请求根据参数,分配给portlet的容器。
l
JAAS数据库安全策略。
l
Jetspeed支持AJAX XML API。
l
portlet应用的自动部署。
l
基于LDAP及数据库实现的安全组件。为用户认证提供LDAP支持。
l
开发者可使用Jetspeed PSML语言装配portlets。
l
门户内容管理和导航:页面、菜单、文件夹、链接。
l
多线程的聚合引擎。
l
集成主流的数据库:Derby, MySQL, MS SQL, Oracle, Postgres, DB2
l
国际化支持
l
统计日志引擎。
l
Portlet注册
l
使用Lucene对Portlet组件进行全文搜索。
l
用户注册功能
l
遗忘密码获取功能
l
丰富的登录和口令配置管理功能
l
基本页面定制
l
管理Portlet:
-
用户、角色、组、密码和Profile管理
-
JSR168 用户属性编辑器
-
Portlet应用和生命周期管理
-
Profiler系统管理
-
统计报表
门户设计的特征:
l
可部署Jetspeed Portlet和页面皮肤(Decorators)CSS组件。
l
可配置的CSS页面外观(Layouts)。
l
很容易为皮肤和Layouts组件使用Velocity宏语言
本文转自
http://soa.5d6d.com/redirect.php?fid=9&tid=9&goto=nextoldset