This content has been marked as final.
Show 3 replies
-
1. Re: RESTeasy 1.0.GA upgrade
jharting Jan 21, 2009 3:36 PM (in response to fernando_jmt)There is already a JIRA for RESTEasy upgrade. See https://jira.jboss.org/jira/browse/JBSEAM-3449
I'll soon upgrade to RESTEasy 1.0 GA so you can definitely expect it in Seam 2.1.2.CR1 -
2. Re: RESTeasy 1.0.GA upgrade
fernando_jmt Jan 21, 2009 4:03 PM (in response to fernando_jmt)Great news! Thanks.
-
3. Re: RESTeasy 1.0.GA upgrade
beep Feb 20, 2009 10:11 AM (in response to fernando_jmt)Hi,
I just tried the jboss-seam-2.1.2-SNAPSHOT from yesterday and indeed it includes a newer version of RESTEasy but, for example, the JAXB providers (generating JSON, for example) are missing from this edition. But at least we have @FormParam support. :-)
However, I feel that something else is still missing in the Seam+RESTEasy integration: I could not create a custom @Provider and get it loaded.
I have this simple Date provider convertign Strings containing timestamp to Date:
package mypackage.resteasy;
import java.util.Date;
import javax.ws.rs.ext.Provider;
import org.jboss.resteasy.spi.StringConverter;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.ScopeType;
@Provider
@Name("mypackage.DateConverter")
@Scope(ScopeType.APPLICATION)
public class DateConverter implements StringConverter<Date>
{
public Date fromString(String dateString) {
return new Date(Long.parseLong(dateString));
}
public String toString(Date arg) {
return String.valueOf(arg.getTime());
}
}
I also set these in web.xml to make sure it gets loaded (as per the RESTEasy documentation: http://www.jboss.org/file-access/default/members/resteasy/freezone/docs/1.0.2.GA/userguide/html/Installation_Configuration.html):
...
<context-param>
<param-name>resteasy.scan.providers</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>resteasy.scan</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>resteasy.providers</param-name>
<param-value>mypackage.resteasy.DateConverter</param-value>
</context-param>
...
I debugged some of teh loading mechanism of Seam and it seems that ResteasyBootstrap does load my DateConverter in its registerProviders() method, however this registration doesn't seem to get to the org.jboss.seam.resteasy.Application instance where it is actually loooked up org.jboss.resteasy.core.StringParameterInjector - if I understood correctly.
So, could anyone confirm that @Provider loading is broken or not in the latest sources and whether it would be fixed in the upcoming CR release.
By the way, any hints on when CR1 will be available?
I would really appreciate any hints.
Regards,
---
balazs