skaterdav85 Posted August 27, 2010 Share Posted August 27, 2010 I keep seeing the term Enterprise Java Beans (EJB) when it comes to Java and JSP development. Can someone explain this in simple terms? From my understanding, a bean is just an object with a bunch of getters and setters. When I retrieve some rows of data from a database in Java, I typically create a new "bean" for each row to store the various fields of each row and then I store each bean in an array. So in the end, I have an array of "beans" to iterate over. Is this type of bean related to EJB in someway? Link to comment Share on other sites More sharing options...
trinistorm Posted August 28, 2010 Share Posted August 28, 2010 Hmmm beans beans everywhere. From what I gather the beans are a set of classes that as you mentioned come with the get and set methods. The way bean classes are organised they allow form some consistency. EJB (Enterprise Java Beans) I have never heard of or used but the Enterprise API's are geared at business so I'm guessing a heavy focus on databases and networking.There is a bean shell terminal project, the Netbeans, javabeans so it seems to many beans if you ask me. Link to comment Share on other sites More sharing options...
trinistorm Posted August 28, 2010 Share Posted August 28, 2010 To be more specific beans focus on reusable code and objects with consistent class structure. Beans are supposed to be simple to use so that EJB are simpler classes for enterprise edition java. Similar to BASIC and Visualbasic. Link to comment Share on other sites More sharing options...
jeffman Posted August 28, 2010 Share Posted August 28, 2010 I believe EJB is treated with Viagra. Link to comment Share on other sites More sharing options...
skaterdav85 Posted August 28, 2010 Author Share Posted August 28, 2010 To be more specific beans focus on reusable code and objects with consistent class structure. Beans are supposed to be simple to use so that EJB are simpler classes for enterprise edition java. Similar to BASIC and Visualbasic.I guess what I've been doing fits that description. But it doesn't seem like it would be just for Java EE. A reusable class w/ getters and setters could be used in Java SE.I believe EJB is treated with Viagra. nice one lol Link to comment Share on other sites More sharing options...
trinistorm Posted August 28, 2010 Share Posted August 28, 2010 Actually the JSE (1.4 and up i think) classes follow the beans setter and getters methods. That is why they have the netbeans ide to help in learning java programming. Personally I think java tries to be so simple that it complicates itself...... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.