You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by Adrian Gonzalez <ad...@yahoo.fr> on 2012/12/06 12:20:52 UTC
Deltaspike REST module
Hello,
Seam 3 has a REST module (see [1]).
Is there any plans on integrating this module into deltaspike ?
Most notably the jax-rs exception handling bridge to deltaspike.
Thanks
P.S.
Meanwhile, I've just made a copy/paste of seam 3 rest module into my own github repo [2] (and butched the unit tests provided by seam 3 ;( )
Sample usage :
@org.apache.deltaspike.core.api.exception.control.annotation.ExceptionHandler
public class RestExceptionHandler {
@Inject
@RestResource
private ResponseBuilder builder;
public void handleException(
@Handles @RestRequest ExceptionEvent<RuntimeException> event) {
builder.status(500).entity("Error handled by deltaspike");
event.handled();
}
}
[1] http://docs.jboss.org/seam/3/rest/latest/reference/en-US/html/
[2] https://github.com/gonzalad/incubator-deltaspike/tree/ds-rest
Re: Deltaspike REST module
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,
+1, i like http://docs.jboss.org/seam/3/rest/latest/reference/en-US/html/rest.templating.html
too
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2012/12/6 Adrian Gonzalez <ad...@yahoo.fr>:
> Hello,
>
> Seam 3 has a REST module (see [1]).
>
> Is there any plans on integrating this module into deltaspike ?
>
> Most notably the jax-rs exception handling bridge to deltaspike.
>
> Thanks
>
> P.S.
> Meanwhile, I've just made a copy/paste of seam 3 rest module into my own github repo [2] (and butched the unit tests provided by seam 3 ;( )
>
> Sample usage :
>
> @org.apache.deltaspike.core.api.exception.control.annotation.ExceptionHandler
> public class RestExceptionHandler {
>
> @Inject
> @RestResource
> private ResponseBuilder builder;
>
> public void handleException(
> @Handles @RestRequest ExceptionEvent<RuntimeException> event) {
> builder.status(500).entity("Error handled by deltaspike");
> event.handled();
> }
> }
>
> [1] http://docs.jboss.org/seam/3/rest/latest/reference/en-US/html/
> [2] https://github.com/gonzalad/incubator-deltaspike/tree/ds-rest