Skip to main content

RESTful Service (JavaEE6 + Spring + Jackson)

5 replies [Last post]
k_nak
Offline
Joined: 2008-02-24

I'm looking for the way which creates RESTful web servicies using JavaEE6 + Spring + Jackson.
I wish this method doesn't depend on Jersey, and is available on any JavaEE container.
Would you mind telling me this method?

I will be grateful for any help you can provide.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jan Algermissen

Hi

On Oct 11, 2012, at 11:15 AM, forums@java.net wrote:

> I'm looking for the way which creates RESTful web servicies using JavaEE6 +
> Spring + Jackson. I wish this method doesn't depend on Jersey, and is
> available on any JavaEE container. Would you mind telling me this method? I
> will be grateful for any help you can provide.
>

I suggest you stick with plain Java EE6 and JAX-RS. That should give you all you need.

No need to pull in Spring and also no need to use non JAX-RS Jersey-features.

If you are looking at Spring for GUI reasons, this[1] might interest you - it is pretty
simply to roll your own, non proprietary, templating with JAX-RS 2.0 (due Nov. 2012)

Jan

[1] http://jalg.net/2012/10/jax-rs-2-0-mvc/

> --
>
> [Message sent by forum member 'k_nak']
>
> View Post: http://forums.java.net/node/891360
>
>

rjdkolb
Offline
Joined: 2006-07-20

On 11 October 2012 15:20, Jan Algermissen wrote:

> Hi
>
> On Oct 11, 2012, at 11:15 AM, forums@java.net wrote:
>
> > I'm looking for the way which creates RESTful web servicies using
> JavaEE6 +
> > Spring + Jackson. I wish this method doesn't depend on Jersey, and is
> > available on any JavaEE container. Would you mind telling me this
> method? I
> > will be grateful for any help you can provide.
> >
>
> I suggest you stick with plain Java EE6 and JAX-RS. That should give you
> all you need.
>
> No need to pull in Spring and also no need to use non JAX-RS
> Jersey-features.
>

Yes mixing Spring and JavaEE is like mixing your wine and beer. Both are
much better separate.

Tomee uses CXF and is JavaEE 6 certified.
http://openejb.apache.org/apache-tomee.html
Just remember to get the Full or JaxRS version.

>
> If you are looking at Spring for GUI reasons, this[1] might interest you -
> it is pretty
> simply to roll your own, non proprietary, templating with JAX-RS 2.0 (due
> Nov. 2012)
>

JAX-RS 2.0 and GUI ?
Please explain, thanks.

regards
Richard

Jan Algermissen

On Oct 11, 2012, at 3:27 PM, Richard Kolb wrote:

>
>
>
> JAX-RS 2.0 and GUI ?
> Please explain, thanks.

I do not separate technical and User APIS, instead use JAX-RS for both.

Details in http://jalg.net/2012/10/jax-rs-2-0-mvc/

I saw RESTeasy having pretty sophisticated integration of JAX-RS, CDI and templating and with JAX-RS 2.0 that should not be too hard to build on your own to avoid being dependent on a proprietary JAX-RS extension.

How you could do that with the new filter API I explain in the blog. What's left would be to make the managed beans available in the template engine context (e.g. subclass VelocityContext and make it access the BeanManager - though I only have vague CDI knowledge there).

Jan

>
>
> regards
> Richard

rjdkolb
Offline
Joined: 2006-07-20

On 11 October 2012 15:33, Jan Algermissen wrote:

>
> On Oct 11, 2012, at 3:27 PM, Richard Kolb wrote:
>
> >
> >
> >
> > JAX-RS 2.0 and GUI ?
> > Please explain, thanks.
>
> I do not separate technical and User APIS, instead use JAX-RS for both.
>
> Details in http://jalg.net/2012/10/jax-rs-2-0-mvc/
>
> I saw RESTeasy having pretty sophisticated integration of JAX-RS, CDI and
> templating and with JAX-RS 2.0 that should not be too hard to build on your
> own to avoid being dependent on a proprietary JAX-RS extension.
>
> How you could do that with the new filter API I explain in the blog.
> What's left would be to make the managed beans available in the template
> engine context (e.g. subclass VelocityContext and make it access the
> BeanManager - though I only have vague CDI knowledge there).
>

I had no idea :)
It may have some possibilities for some simple apps. I guess rest can drop
out HTML with hooks back into other restful methods. PUT, DELETE and in
other restful contexts.

thanks Jan

regards
Richard.

k_nak
Offline
Joined: 2008-02-24

Thank you very much for many answers. The article shown for reference was very interesting.

I think that I should not mix "Spring" and "JavaEE". That's what I think too.
However, other requirements of the system require Spring.
Because this line has been already decided, there's nothing I can do about it.
So, I'm looking for the way which creates RESTful web servicies using JavaEE6 + Spring.

But now, I understand it is difficult.