aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Utility Classes in EJB 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 "Utility Classes in EJB" Watch "Utility Classes in EJB" New topic
Author

Utility Classes in EJB

Thomas Andrewsen
Greenhorn

Joined: May 26, 2006
Posts: 7
Hai All,
In an EJB server side module, if there is small utility class is it advisable to write it using stateless session bean or as a normal java class. If it is a session bean the class cannot be reused anywhere else and if it is a normal java class it will not get the effeciency of Session Beans(pooling etc) but i can reuse it anywhere.


regards,
Siva


Thomas Andresen
James Kesari
Greenhorn

Joined: May 18, 2006
Posts: 16
If it is a utility class why do you need pooling?
Utility classes are generally static methods / Singleton, depending on the usage.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Dont write it as a Session bean , simple Java class would do.


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Utility Classes in EJB