• Post Reply Bookmark Topic Watch Topic
  • New Topic

A Very Basic Question About EJB...  RSS feed

 
Somnath Mallick
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I would like to know that is there any way of recognizing a Stateless session bean and Stateful session bean just by looking at the code.
 
Vijitha Kumara
Bartender
Posts: 3992
27
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean EJB code or xml ? In xml you can see from <session-type> under the <session>. Or @Stateful/@Stateless annotation in the session bean class in EJB3.
 
Somnath Mallick
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meant in the code...
 
Somnath Mallick
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bump!!! Haven't really got the answer to this question!
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bump!!! Haven't really got the answer to this question!


Vijitha is right about looking for the annotations in code or the ejb-jar.xml for the session type. Is there something else you are looking for?

 
Somnath Mallick
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well if its EJB 2.1 specifications then it wont have annotations right?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's where the ejb-jar.xml comes into picture. For EJB2.x there's nothing specific in code that will differentiate a stateless and stateful bean.
 
Somnath Mallick
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok! Thanks Vijitha and Jaikiran!!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!