• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stateless Session Beans & Web Services  RSS feed

 
Jeffies Shah
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I came across the below message when learning Enterprise Beans thru' Sun's Tutorials.
"A stateless session bean can implement a web service, but other types of enterprise beans cannot."

Can anyone explain me the reason behind this?
What does a web service implementation have to do with sessions?

Thanks,
Jeffies.
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically, I can take an EJB3 Stateless Session bean and make one of the methods be a Web Service call. That is all. Having a Stateful Session bean as a class for a Web Service just wouldn't make sense. A Web Service by its definition is just one method call, and not anything for a bean to hold state for subsequent requests. Just a one time call.

Mark
 
Jeffies Shah
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark

I understand that: A Web Service by its definition is just one method call, and not anything for a bean to hold state for subsequent requests.

Thanks again !
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!