现在的位置: 首页 > 综合 > 正文

从 WASCE v2.0 Server Adapter 2.0.0 迁移到 WASCE v2.0 Server Adapter 2.1.1

2013年01月10日 ⁄ 综合 ⁄ 共 1854字 ⁄ 字号 评论关闭
Eclpse中,WASCE v2.0的Server Adapter插件目前有两个版本:2.0.0和2.1.1。当把在2.0.0下开发的项目迁移到2.1.1时,需要做一下工作:
1.修改facet
修改项目.settings目录中org.eclipse.wst.common.project.facet.core文件,将其中的
<installed facet="org.apache.geronimo.facet" version="1.1"/>
改为
<installed facet="com.ibm.wasce.facet" version="1.2"/>

2.修改geronimo部署描述符
geronimo1.1的描述符实例如下:
<?xml version="1.0" encoding="UTF-8"?>
<application
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
application-name="TestApplication">
  <sys:environment>
    <sys:moduleId>
      <sys:groupId>default</sys:groupId>
      <sys:artifactId>TestApplication</sys:artifactId>
      <sys:version>1.0</sys:version>
      <sys:type>car</sys:type>
    </sys:moduleId>
  </sys:environment>
</application>
将其改为1.2的描述符格式,如下:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app:application
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2"
xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
xmlns:pers="http://java.sun.com/xml/ns/persistence"
xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
application-name="TestApplication">
    <dep:environment>
        <dep:moduleId>
            <dep:groupId>default</dep:groupId>
            <dep:artifactId>TestApplication</dep:artifactId>
            <dep:version>1.0</dep:version>
            <dep:type>car</dep:type>
        </dep:moduleId>
    </dep:environment>
</app:application>

*注意ear项目及其子项目都要做此修改。

3.将应用发布到服务器

抱歉!评论已关闭.