This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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