users@glassfish.java.net

Re: Jersey or Servlet ?

From: Felipe Gaúcho <fgaucho_at_gmail.com>
Date: Tue, 31 Mar 2009 16:05:05 +0200

ok, I will bet on Jersey, in a hope I can update my project in late
2009 to be fully Java EE compliant..

please provide me clever references to EJB injection in the Jersey
code.. (without the old fashion lookup would be nice)

On Tue, Mar 31, 2009 at 4:00 PM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>
> On Mar 31, 2009, at 3:43 PM, Felipe Gaúcho wrote:
>
>> so, I will create a new Restfull service.. than I have this doubt: to
>> adopt Jersey or to go with pure Servlet ????
>>
>> from Jersey I got JSON and XML formats handling and a lot of cool
>> features, but I loose EJB dependency injection and other Java EE
>> features...
>>
>
>
> It will be supported when EE 6 is ready. However, there are ways to get you
> boot strapped for what you require in the interim using a plugable injection
> mechanism in Jersey.
>
> See here for an example:
>
> http://markmail.org/search/?q=list%3Anet.java.dev.jersey.users+EJB#query:list%3Anet.java.dev.jersey.users%20EJB%20order%3Adate-backward+page:1+mid:catyvvrocdk2h4gx+state:results
>
>
> We have recently got "prototype" support working for JAX-RS resource classes
> that are no-interface view session beans deployed in the war with the latest
> Glasssfisg v3 nightly builds. I will send another email to this list when it
> is fully integrated and working with Jersey. This is interesting because it
> can reduce the layers you need e.g. the business objects are resources.
>
> Another approach is to extend the Jersey servlet and inject what you require
> on that, and make those injected instances available to the resource classes
> e.g. via ServletContext or via some custom injectable provider.
>
>
>> from servlet I have a fully Java EE compliant technology, but I miss
>> the cool annotations of Jersey..
>>
>> so, what is the best option ?
>>
>
> Jersey :-), ,but i am biased,
>
> It really depends on what you require. As you said Jersey can provide the
> ease of use w.r.t. to JAXB XML/JSON support, and also matching request URIs
> to methods.
>
> Paul.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>



-- 
Please help to test this application:
http://fgaucho.dyndns.org:8080/cejug-classifieds-richfaces