Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stateful EJB as WebService

 
Souvik Dasgupta
Ranch Hand
Posts: 95
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2418
95
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Stateful Session Bean cannot expose a WebService (only a Singleton Session Bean or Stateless Session Bean)
 
Souvik Dasgupta
Ranch Hand
Posts: 95
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Got it.

Thanks Frits.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic