users@jersey.java.net

RE: [Jersey] Issue with Routes and Collections using JAXB

From: Basmajian, Raffi <rbasmajian_at_oppenheimerfunds.com>
Date: Fri, 9 Jul 2010 12:36:31 -0400

 
Ok, thanks for the tip.

One other question, if I decide to annotate at the POJO level, is it
required to set the @Path("") configuration in each resource to reflect
the object hierarchy, or is that handled automatically by Jersey?



-----Original Message-----
From: Jason Winnebeck [mailto:gillius-ml_at_gillius.org]
Sent: Friday, July 09, 2010 12:07 PM
To: users_at_jersey.dev.java.net
Subject: Re: [Jersey] Issue with Routes and Collections using JAXB

Keep in mind that in Jersey a resource is just a POJO/bean that just
happens to have methods annotated with @Path.

It very well may be possible, but I haven't tried yet (being new to
Jersey) to have a class with both JAXB and Jersey annotations, such that
the data model and resource classes are the same. If that works out well
I would think then that the resulting REST service would just be a huge
XML file where you can select a subset of it via URLs.

You would need some kind of root resource that would be used to spawn
everything, I think. And it might not work out because the data model
beans would get too complex, or maybe you want to expose only part of
the information to the web, or maybe it would hurt your ability to load
data incrementally/lazily (i.e. if you can't hold everything at once).

Jason

On 7/9/2010 12:01 PM, Basmajian, Raffi wrote:
> Hi Jason,
>
> Thanks for the quick reply.
>
> I also felt that adding getCustomerIncident(cid,iid) in
> CustomerResource was putting too much in that one class.
>
> It feels more natural placing the routes in the classes relative to
> the resources they are serving.
>
> I'll give it a shot with the CustomersResource class.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net



------------------------------------------------------------------------------
This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately by return e-mail and delete all copies. OppenheimerFunds may, at its sole discretion, monitor, review, retain and/or disclose the content of all email communications.
==============================================================================