Hi,
So first of all it depends on requirements. You can use only RESTful
webservice or only EJB or you can combine both technologies (e.g.
Jersey for transport between client and server and EJB as a layer to
database).
But in any case I don't want to return EJB or something like that.
It's not possible. In my opinion the first idea of returning entities
is good (you might think about JSON over XML). Further more using
Jersey is more simple than EJB and it's more scalable.
You can look at Jersey samples for more details.
Regards,
Petr
2011/3/13 raid3n <andrea.deruvo_at_hotmail.com>:
> Hi all,
>
> I'm very new with the JEE architecture. I have created a rest server project
> with jersey + jpa (not ejbs). Now I want realize a new rest client project
> that access the resources of the first project.
>
> So my first idea was to create the same jpa entities on the rest client, get
> the xml and marshall/unmarshall it with the jpa entities with jaxb.
>
> But I was reading the JEE 6 tutorial about EJBs. So if I understood the
> pattern, it's possible to create EJBs entities and access them everywhere
> with the remote interface. So, my idea is to create the rest server project
> with Jersey + EJBs + JPA (the ejbs manage the jpa) and the rest client
> project with only Jersey client libraries access the EJBs on the rest server
> project.
>
> My questions are: Is right to do so? Is possible that jersey returns a ejb?
> If yes, is there a jersey example that helps me to realize it? I use
> glassfish 3.1.
>
> Excuse my english.
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Jersey-and-EJBs-tp6166380p6166380.html
> Sent from the Jersey mailing list archive at Nabble.com.
>