基于seam-gen的热部署(hot deploy)相关问题
使用seam-gen生成的seam项目是支持热部署的。
?
服务器参数配置
-Dprogram.name=run.bat -Djava.endorsed.dirs="C:/manaty/jboss/jboss-4.2.3.GA/bin/../lib/endorsed" -Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m -noverify -javaagent:C:\manaty\javarebel-2.0-M1a\javarebel.jar
黑体是相关的热部署包javarebel.jar
?
热部署效果
类:方法内部的任意修改都可以,但是修改方法体、增加方法、增加类都是不可以的。
页面:使用facelet的 xhtml页面默认是可以的。
?
1)Caused by: javax.resource.ResourceException: You are trying to use aconnection factory that has been shut down: ManagedConnectionFactory isnull.
热部署时报上面的异常一个可能的原因是由于数据源被重置了,将build.xml文件中datasource部分按如下修改。
<target name="datasource">
????????<fail unless="jboss.home">jboss.home not set</fail>
????????<copy file="${basedir}/resources/${project.name}-${profile}-ds.xml"
????????????tofile="${deploy.dir}/${project.name}-ds.xml"
????????????overwrite="true"/>
????</target>
to
<target name="datasource">
????????<fail unless="jboss.home">jboss.home not set</fail>
????????<copy file="${basedir}/resources/${project.name}-${profile}-ds.xml"
????????????tofile="${deploy.dir}/${project.name}-ds.xml"
????????????overwrite="false"/>
????</target>
参见 https://jira.jboss.org/jira/browse/JBSEAM-3844
1 楼 bianqioujin 2009-07-15 seam 的热部署是个头疼的问题,LZ有空写些这方面的经验!!!