File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Stateful EJB as WebService Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Stateful EJB as WebService" Watch "Stateful EJB as WebService" New topic

Stateful EJB as WebService

Souvik Dasgupta
Ranch Hand

Joined: Sep 24, 2009
Posts: 95

I am new to EJB. Could anyone help me for below case:

SEI as below:

SIB as below:

But I am getting compilation error as:
If a class is part of ejb-jar and annotated @WebService, then it must designated as Singleton or Stateless session bean. Someone please explain.

Thanks and Regards
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper

Joined: Apr 07, 2010
Posts: 2102

A Stateful Session Bean cannot expose a WebService (only a Singleton Session Bean or Stateless Session Bean)
Souvik Dasgupta
Ranch Hand

Joined: Sep 24, 2009
Posts: 95

Got it.

Thanks Frits.
I agree. Here's the link:
subject: Stateful EJB as WebService
It's not a secret anymore!