wood burning stoves 2.0
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
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Utility Classes in EJB" Watch "Utility Classes in EJB" New topic

Utility Classes in EJB

Thomas Andrewsen

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.


Thomas Andresen
James Kesari

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: 8927

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

I agree. Here's the link: http://aspose.com/file-tools
subject: Utility Classes in EJB
It's not a secret anymore!