• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting Document in an Entity EJB via HTTP vs. Web Services

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear developers and architects:

There is Entity Bean's persistenced via JDBC . Each of them has an attribute holding a document. This document can be accessed either via HTTP or Web Services (WS) on an other Application Server (AS) . There is some questions concerning architect:
1. Is it recommended / allowed to write the HTTP or WS client code within the EJB ? If not, what kind of design is recommended ?
2. If both AS's reside within an Intranet (DMZ), shoud be preferred the HTTP solution ?

I'm very thankful for any suggestion.

Warm regards,

Laszlo
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I would definitely seperate the call to either Http or Web Service outside of the EJB. Keep the responsibilities in seperate classes. So make a single class for accessing each type, and a Facade in front of it so the EJB doesn't need to know which assessing way is occuring.

Mark
 
Laszlo Mihalka
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you mean with facade + single class, that there is no need to use of EJB, it is suitable using the mentioned combination ?

Laszlo
[ July 23, 2006: Message edited by: Laszlo Mihalka ]
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No I didn't mean that there was or wasn't a need for the EJB. I was saying that the sooner you get to Plain Old Java Objects the more extensible it will be and the least coupled.

If you need managed Transactions, Security, CMP then you need to use EJBs. I just think that EJBs are just an interface to the outside world, a Facade so to speak. There should be zero, no business logic in EJBs. The EJB will delegate that to POJOs.

Mark
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic