File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes what is pojo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is pojo" Watch "what is pojo" New topic

what is pojo

bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
hi ranchers,

i stumble onthis. it want to ask about this point:

i t is a Java object that doesn't extend or implement some specialized classes and interfaces respectively require by the EJB framework. Therefore, all normal Java objects are POJO’s only. The following classes are not POJO classes shown as:

class MyServlet extends HttpServlet {}
class MyRemote implements SessionBean {}

is the above true?

writing the subject as what is pojo so that people can find this post easily...

Steve Luke

Joined: Jan 28, 2003
Posts: 4181

Yeah, a POJO is a 'Plain Old Java Object'. As happens a lot with that site, they interpret it rather narrowly as if 'POJO' had something to do with EJBs. Really, a POJO would be any normal Java Object, one that you create, manage, and call. The alternative would be any Java Object whose lifecycle you don't really control, or are required to be run in a particular environment. For example, Servlets, JSPs, EJBs, Midlets, or Objects in any other of a number of frameworks which require special behavior/lifecycle/environment.

I agree. Here's the link:
subject: what is pojo
It's not a secret anymore!