jeudi 20 novembre 2008

Support for Seam 2.1

Support for Seam 2.1 is now in available the trunk and in the latest
GDS nightly builds
(http://www.graniteds.org/bamboo/browse/GDS-SHOTS/latest). Don't
hesitate to give it a try if you are interested to help us testing it
before the stable release.

As a few parts of the API have changed, there are some little
differences of configuration and deployment.

First you will need to use the granite-tide-seam21.jar instead of
granite-tide-seam.jar. The swc library is the same granite-tide-seam.swc.

Most implementation classes are different :

<granite-config scan="true">
<!--
! Use Seam 2.1 based security service.
!-->
<security type="org.granite.seam21.security.Seam21SecurityService"/>

<!--
! Enable Seam components for Tide
!-->
<tide-components>
<component instanceof="org.jboss.seam.security.Identity"/>
<component instanceof="org.jboss.seam.framework.Home"/>
<component instanceof="org.jboss.seam.framework.Query"/>
<component annotatedwith="org.granite.tide.annotations.TideEnabled"/>
</tide-components>
</granite-config>

services-config.xml is exactly the same.

The good news is that you can completely remove all dependencies on
Faces if you don't use it. Thus web.xml can be as simple as :

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<display-name>GraniteDS Seam 2.1</display-name>

<!-- Seam -->

<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>

<filter>
<filter-name>AMFMessageFilter</filter-name>
<filter-class>org.granite.messaging.webapp.AMFMessageFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>AMFMessageFilter</filter-name>
<url-pattern>/graniteamf/*</url-pattern>
</filter-mapping>

<servlet>
<servlet-name>AMFMessageServlet</servlet-name>
<servlet-class>org.granite.messaging.webapp.AMFMessageServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>AMFMessageServlet</servlet-name>
<url-pattern>/graniteamf/*</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>


More complete details are here :
http://www.graniteds.org/confluence/display/DOC/3.+Configuration

Remember that if you remove Faces, you will not be able to use
FacesMessages any more (of course) and you will have to use the new
Seam 2.1 StatusMessages API. By default, Tide comes with a basic
implementation of it but it's not necessary to refer explicitly to the
concrete Tide implementation class and you can just use
@In StatusMessages statusMessage;

If you need to use a html view layer side by side with Flex/Tide, this
default TideStatusMessages will be overriden by the view-specific
implementation and you won't have to change anything in the components.

8 commentaires:

Seto a dit…

A suggestion, make this site with another domain?
The blogspot domain is blocked in the daytime and accessed in the nighttime in China.
So it should be helpful if this blog can be access with another domain.

William Draï a dit…

We are going to try to set an alternative domain for the site. Hopefully this will help with access from China, but the filtering is probably done by IP address and not by domain name.

Pedro Sena a dit…

Hi,

I would like to know WHERE may I find the granite-tide-seam21.jar file, since it is not in download area.

Thanks!

Olvin a dit…

Marble City Company is an expert installer and fabricator of granite countertops, also is the largest importer of granite in the Bay Area, CA.

Olvin a dit…

granite tops, coarse-grained igneous rock of even texture and light color, composed chiefly of quartz and feldspars. It usually contains small quantities of mica or hornblende, and minor accessory minerals may be present.

squad a dit…

Great list of resources! I also recommend http://www.squadhelp.com for finding great domain names. This site uses the "wisdom of crowds" allowing users across the world to submit domain name suggestions. The best suggestion wins a prize that is setup in advance by the contest holder, creating a win win situation for every one. Contests start at $50 and users typically receive 200+ good name suggestions within 2 days

david a dit…

Granite worktops at http://dalstone.co.uk/

Gexton a dit…

Thanks, you guys that is a great explanation. keep up the good work in your granite blog.
granite edmonton
granite countertops edmonton