Wednesday, September 12, 2007

Migrating SEAM Applications from Glassfish V1 to Glassfish V2

I've come up with some simple steps for migrating a JBoss SEAM application from Glassfish V1 to Glassfish V2. Actually, you can configure all SEAM applications which you plan on deploying to Glassfish in this manner, and they will be deployable on either V1 or V2.

Keep in mind that I am also integrating Ajax4Jsf into my SEAM applications.

1) Update faces-config.xml (if needed) to ensure that you are using SeamFaceletViewHandler

<view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>

2) Update web.xml

- Add context-param for org.ajax4jsf.VIEW_HANDLERS

<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
</context-param>


- Add SUN Faces Listener

<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>

- If using Ajax4JSF, update the filter to include dispatchers

<filter-mapping>
<filter-name>ajax4jsf</filter-name>
<url-pattern>*.seam</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>

3) Ensure that all database drivers are installed on the new server.
4) If using Ajax4Jsf, you will want to ensure that you are packaging Apache Commons 3.2

No comments:

Post a Comment

Please leave a comment...