This discussion is archived
3 Replies Latest reply: Apr 2, 2012 10:10 AM by _blackjack RSS

How may I access remote persistent objects from web front client?

_blackjack Newbie
Currently Being Moderated
Hi all,
I have a doubt about how to design a web application which has their persistent objects in a service layer in a remote server, i mean a business application.
So, once we have a web application as a client of this remote business application, how those persistent objects should be mapped in web front?
Should I either pack all jpa annotated classes into the web front application or there is another neat way to do this?
I was intending in copy all persistent classes present in the remote business application into the web app package, i know it's not the best way to get what i need.
So, please, what is a more appropriate design for a web application which must get some objects from a remote business application and persist some other objects there?
thanks a lot.
  • 1. Re: How should I design an application with remote persistent objects ?
    _blackjack Newbie
    Currently Being Moderated
    I'm thinking about to create a service layer with EJBs and expose some operations as webservices. Thus, I'll be able to request for those objects in DB and receive them as xml. So, mapping the response to Value Objects (VOs) would be enough in web front application. In the case of request to services, i'd invoke the webservices and pass the VOs as input parameters. I won't have the same annotated POJOs at web client, however, i don't see this as a big issue. Am I right?
    Is there another way to achieve the same result in an easier of more appropriate approach?
    Thanks
  • 2. Re: How should I design an application with remote persistent objects ?
    gimbal2 Guru
    Currently Being Moderated
    _blackjack wrote:
    I'm thinking about to create a service layer with EJBs and expose some operations as webservices. Thus, I'll be able to request for those objects in DB and receive them as xml. So, mapping the response to Value Objects (VOs) would be enough in web front application. In the case of request to services, i'd invoke the webservices and pass the VOs as input parameters. I won't have the same annotated POJOs at web client, however, i don't see this as a big issue. Am I right?
    Is there another way to achieve the same result in an easier of more appropriate approach?
    No a Service Oriented Architecture is what you are looking for. What technology to use to expose the webservices is entirely up to you; if you like JAX-WS webservices go right ahead, you could also look into JAX-RS. What I wouldn't do is go for remote EJBs as that requires you to bundle a whole mess of (server specific) libraries with your client application just to be able to make it work.
  • 3. Re: How should I design an application with remote persistent objects ?
    _blackjack Newbie
    Currently Being Moderated
    I appreciate your help Gimbal, I think it's worth using that approach with JAX-WS. I'll go through this way.
    Thanks a lot

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points