Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To EJB or not to EJB (II)

 
Alton Hernandez
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a stateless Session Bean that needs to call another java class. I am currently thinking if I should implement this other java class as a normal java class or as an EJB. So I wondering what are the advantages and disadvatages asuming if this java class will always be local (i.e. never remotely called)

Thanks
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alton,

I guess it depends. First you have to look at your class from a designing perspective. What are the responsabilities of this class. What are the relationships or associations with other classes in your system? Does it provide implementation for any of the use cases? Should this class be exposed to remote clients as well? On the other hand if this is only an utility class, I can see any reason why to make it an EJB.
Regards.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to check out this article.

Kyle
 
Alton Hernandez
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good article
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic