Dashboard > SpringSide Wiki > ... > Quickstart > Server Migrate
  SpringSide Wiki Log In | Sign Up   View a printable version of the current page.  
  Server Migrate
Added by SpringSideTeam, last edited by Anonymous on 2007-12-18  (view change)
Labels: 

一、数据库移植

1.参数修改 

1. 替换WEB-INF/lib 中的JDBC Driver的jar。 

2. 修改生成项目的/src/resources/config/jdbc.properties,修改JDBC连接参数,文件中已列出常用数据的连接参数示例,去除#注释后设定。

3. 修改项目的/src/resources/spring/dataAccessContext-hibernate.xml,修改sessionFactory的hibernateProperties的hibernate.dialect。

 各种数据库的JDBC连接参数 与 Hibernate Dialect见/components/orm/hibernate/meta/hibernate.properties。

2. 数据库Schema

   SpringSide会对AcegiSecurity 数据库版这样的可重用数据库结构会提供常用数据库的DDL。(参考http://www.blogjava.net/junky/archive/2007/07/03/127936.html)

   而对仅作演示用途的数据结构如Book、 Order等表就不提供多数据库版本了,大家可以自己通过hibernate的hbm2ddl 从hbm文件生成,或者使用PowerDesigner做转换,也可以自行转换,HSQLDB采用SQL标准语法,只需留意主键策略即可。

二、应用服务器移植

1.Tomcat 5.5

  无需特别设置,直接部署war 或部署应用目录。

2.Jboss 4.0.4

  无需特别设置,直接部署war。

3. Geronimo 1.1

  需要将Web.xml中的中文注释全部删除,直接部署war

4. Weblogic 9.2

  如果是hbm式映射,修改ApplicationContext-db.xml 中 hbm定义的部分,从目录式定义改为逐个列举hbm。

5. Weblogic 8.1.4

  因为weblogic 8.1.4 即不支持JDK5,也不支持JSP2.0,暂时不能直接部署在此服务器上。

6. Resin3.0.21

  resin对中文注释比较敏感,所以要把web.xml里面出现换行的中文注释全部删除,最好删除全部中文注释。

  其次在resin中使用spring2.0会遇到一些读取xml的问题,根据网友Marc Huang提供的方法,在resin配置文件<server>中添加以下配置: 

<system-property javax.xml.parsers.DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
 <system-property javax.xml.parsers.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 2006-09-07) - Bug/feature request - Contact Administrators
Get SpringSide at SourceForge.net. Fast, secure and Free Open Source software downloads