金蝶Apusic中间件适配JetSpeed2过程记录:
1、安装金蝶并配置域,确保域运行正常。
2、参考《JetSpeed2部署至Apusic操作步骤记录》进行应用迁移。
https://www.cnblogs.com/xusweeter/p/9707444.html
3、修改金蝶域config目录下的security.xml配置文件,在<<realms>节点中添加如下内容:
<realm>
<realm-name>jetspeed</realm-name>
<provider-type>JAAS Realm</provider-type>
<authentication-provider>com.apusic.security.realm.JAASRealm</authentication-provider>
<authorization-provider>com.apusic.security.realm.JAASRealm</authorization-provider>
<attribute name="appName" value="Jetspeed" />
<attribute name="configFile" value="login.conf" />
<attribute name="userClassNames" value="org.apache.jetspeed.security.impl.UserImpl,org.apache.jetspeed.security.impl.TransientUser,org.apache.jetspeed.security.UserSubjectPrincipalImpl" />
<attribute name="roleClassNames" value="org.apache.jetspeed.security.impl.RoleImpl,org.apache.jetspeed.security.impl.TransientRole" />
<attribute name="useContextClassLoader" value="true" />
</realm>
4、修改金蝶域config目录下的vm.options配置文件,在最后添加如下内容:
apusic.session.checkValidity.throwEx.disabled=true
apusic.web.crosscontext=true
com.apusic.authenticator.local=true
apusic.include.useParentContext.enabled=true
5、编辑apusic-application.xml文件并将该文件放在JetSpeed2的META-INF目录下。
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE apusic-application PUBLIC '-//Apusic//DTD Apusic Application 3.0//EN'
'http://www.apusic.com/dtds/apusic-application_3_0.dtd'> <apusic-application>
<module uri="">
<web>
<context-root>portal</context-root>
</web>
</module>
<realm-name>jetspeed</realm-name>
<security-role>
<role-name>admin</role-name>
<principal>admin</principal>
<group>admin</group>
<group>user</group>
<group>manager</group>
</security-role>
<security-role>
<role-name>portal-user</role-name>
<principal>admin</principal>
<group>admin</group>
<group>user</group>
<group>manager</group>
</security-role>
</apusic-application>
其中,realm-name必须要和第3步定义的realm-name保持一致。
6、运行金蝶域以验证功能是否正常。
备注:金蝶域lib目录中的jar包列表如下: