• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

About Webservices with EJB

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rancher,
I want ask about the webservices and EJB, the Mastering EJB 3.0 book have one chapter for this issue.
Indeed the book talk about stateless session bean, they didn't mention more about stateful session bean.
I need to know if we can develop stateful session bean as web services or not.

anyone have information for this issue.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nope, Web Services are implemented as stateless session beans. When you think about it, this would make sense. When you submit to a web service, all of the information it needs to perform the task is received at once. It does not need to keep state, and any future submission to the Web Service will result in a brand new "session".

There is one other way to define a Web Service through J2EE however, namely a servlet. This also makes sense, as a servlet follows a similar lifecycle as a stateless session bean. Neither should have instance variables to hold the state of the client, as with each invocation the client may get a different instance. But for SCBCD, we obviously would only contain about the stateless session bean version.

Hope that helps.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic