• 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

Consuming a web service from an EJB

 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Consuming a web service from an EJB
Hi people,
Are there any considerations to take when consuming a Web service from an EJB. I can not think of any really, but would like to ask you guys about your opinion of moving a standalone WS Client to run under an application container? Any �patterns� for clients?
Any help will be very much appreciated.
Thanks in advance!
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Tonny Tssagovic:
Any "patterns" for clients?


Do you mean something like a ServiceLocator?
 
Tonny Tssagovic
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I was rather talking about WS clients, not their clients . The WS client will consume the service statiscally, and dow not need any fancy stuff. So running the WS client under an EJB container would not need any change?
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Tonny Tssagovic:
So running the WS client under an EJB container would not need any change?

In most cases, no. However, I could imagine a need for piping access to the web service through an EJB (i.e. the web service is called by calling an EJB instead of calling the static method directly) due to limited number of available sockets etc.
 
Tonny Tssagovic
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the quick reply Lasse
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
What happens if the method which consume in the EJB rollback. Can the changes done in the web services be rollback?
If not, does using web services within EJB "defeats" the transaction mechanism provide by the container?
Best Regards
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, the EJB container does not extend the transaction over the network to the service side. There's a specification called WS-Transaction, but I'm pretty sure it'll take plenty of time before it is included into the EJB specification...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic