Devoxx slides and examples for the JAX-RS presentation

A PDF of my Devoxx presentation can be found here.

The simple example project i used to demonstrate some JAX-RS features can be found here. This is a maven project. It can be loaded into NetBeans 6.5 if using the maven plugin.

The EJB example can be found here. This is a NetBeans 6.5 project using Jersey 1.0 as shipped with NetBeans 6.5. Note that this currently relies on Glassfish only specific behaviour and is intended as a demostration of where JAX-RS EE 6 functionality is heading.

The simple Security example leveraging Web container security, that i had no time to present, can be found here. This is a NetBeans 6.5 project using Jersey 1.0 as shipped with NetBeans 6.5. I wish i had time to present this as it would have given me the opporunity to have a great rant at the limited support for HTTP authentication in browsers such as Firefox. The user could be so much more in control of authenticated sessions...

Comments:

Paul,

thanks for your great presentation at Devoxx and for sharing the material here. It was a real eye opener, and I have to admit that I finally seem to have fallen in love with JAX-RS / Jersey.

- René

Posted by René Gielen on December 18, 2008 at 09:30 AM CET #

Hi Rene, thanks, glad you enjoyed the presentation. Paul.

Posted by Paul Sandoz on December 19, 2008 at 06:27 AM CET #

hey,
is this an example of use of JAX-RS with EJB 3.0 ?

I am looking for an example that works with EJB 3.0, not EJB 3.1

Thanks.

Posted by Celinio Fernandes on December 05, 2009 at 03:55 PM CET #

@Celinio: yes it is using EJB 3.0 where the EJBs are deployed in the ear.

Posted by Paul Sandoz on December 07, 2009 at 03:58 AM CET #

Thanks.
I have a question about the client. How do you call that stateless session bean that you have exposed as a RESTful Web Service ?

In my Enterprise application, all my EJBs are inside a specific EJB project (no web.xml).
I do have a Web project though.

What URL do you use then to call that GET resource on the RESTful (stateless session bean) web service ?

Thanks.

Posted by Celinio Fernandes on December 10, 2009 at 10:51 AM CET #

Hi,
I got it working.
However, in your example, how come you put the JSR-311 annotations @GET, @Produces etc in the interface ?

Jersey cannot instantiate it and then cannot declare it as a ressource.

I moved these annotations to the bean class and it works.

Posted by Celinio Fernandes on December 11, 2009 at 02:28 AM CET #

I have another question :
in EJB 3.0, can you inject resources in the stateful session beans if you expose them as RESTful webservices ?

Injection does not seem to work in that case ...
I am using JBoss and Eclipse.

Posted by Celinio Fernandes on December 11, 2009 at 04:16 AM CET #

See the following link for my reply to your email you sent to the Jersey users list:

http://markmail.org/search/?q=list%3Anet.java.dev.jersey.users#query:list%3Anet.java.dev.jersey.users+page:1+mid:zn2vrn6dybjixjnw+state:results

If you move the annotations to the class then Jersey will instantiate the class as a normal POJO hence why injection does not work.

Posted by Paul Sandoz on December 11, 2009 at 05:43 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

sandoz

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today