seam的debug模式问题

<core:init debug="true" jndi-pattern="@jndiPattern@"/>, Seam creates the component.
<core:init debug="false" jndi-pattern="@jndiPattern@"/>, Seam does not create the component.

经过在网上查找发现了这句“This occurs because Seam uses hot deployment into the /WEB-INF/dev directory and hot deployment seems to be disabled when using the debug=false mode.”

在seam的官方文档中发现

But if you really want a fast edit/compile/test cycle, Seam supports incremental redeployment of JavaBean components. To make use of this functionality, you must deploy the JavaBean components into the WEB-INF/dev directory, so that they will be loaded by a special Seam classloader, instead of by the WAR or EAR classloader.

You need to be aware of the following limitations:

If you create a WAR project using seam-gen, incremental hot deployment is available out of the box for classes in the src/hot source directory. However, seam-gen does not support incremental hot deployment for EAR projects.

于是修改build.xml将dev更改为classes解决。
<property name="wa.dir" value="${war.web.dir}\dev\" /> 更改为 <property name="war.dir" value="${war.web.dir}\classes\" />

猜你喜欢

转载自v-vampires.iteye.com/blog/1528504