aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes To EJB or not to EJB (II) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "To EJB or not to EJB (II)" Watch "To EJB or not to EJB (II)" New topic
Author

To EJB or not to EJB (II)

Alton Hernandez
Ranch Hand

Joined: May 30, 2003
Posts: 443
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

Joined: Feb 17, 2005
Posts: 704
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.


I think, therefore I exist -- Rene Descartes
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
You might want to check out this article.

Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Alton Hernandez
Ranch Hand

Joined: May 30, 2003
Posts: 443
Thanks
Daniel Rhoades
Ranch Hand

Joined: Jun 30, 2004
Posts: 186
Good article


Drinking more tea is the key...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: To EJB or not to EJB (II)